https://pulumi.com logo
#general
Title
# general
w

white-cat-90296

09/15/2021, 10:23 AM
Does anybody have a working example for a
Bitbucket Pipelines
yml file working with pulumi? I've integrated pulumi with GitHub Actions before which was super straight forward, but I can't seem to find a good reference for Bitbucket Pipelines. My first thought is using the pulumi/pulumi docker image and building on top of that, but I'd love to see some examples if you have any. Thanks!
Figured it out in case anybody is wondering here is a simplistic example to get you started
Copy code
image: node:10.15.3

pipelines:
  branches:
    master:
      - step:
          name: Deploy with Pulumi
          deployment: test
          image: pulumi/pulumi
          script:
            - npm run <YOUR_INSTALL_SCRIPTS>
            - cd <FOLDER_WHERE_PULUMI_IS>
            - pulumi stack ls
            - pulumi stack select <YOUR_STACK_NAME>
            - pulumi up -y
You should set a few environment variables under Repository Settings/Deployments
Here are a few relevant variables on the pulumi docker page https://hub.docker.com/r/pulumi/pulumi
l

little-cartoon-10569

09/15/2021, 8:32 PM
Tip for using pulumi in scripts like this: use the
--stack
option, instead of
pulumi stack select
.
And tip for using scripts always use long options like
--yes
instead of short ones like
-y
.
w

white-cat-90296

09/16/2021, 7:26 AM
Thank you for the tips!!