I added two custom pipelines in order to manually trigger them: One for deployment to test and the other for deployment to prod.
Unfortunately, it is possible to run both pipelines on every branch, e.g. I could run "deployment to prod" on the development branch, which should only be possible on the master branch.
Is there a way to limit custom pipelines to specific branches?
If you want to follow @Steve Taylor's answer you can also check the BITBUCKET_BRANCH environment variable in the pipeline. https://confluence.atlassian.com/bitbucket/environment-variables-794502608.html
Alternatively, you could set up a pipeline that runs on master only and has manual steps that do the deployments. i.e. Steps that will only trigger with manual input. You will also need to be using artifacts for this.
Something like this:
name: "Deploy to Staging"
name: "Deploy to Production"
Then you can also set up Bitbucket Deployments (if you're in the alpha programme) to track the status of your environments https://confluence.atlassian.com/bitbucket/bitbucket-deployments-940695276.html
Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs