According to
https://support.atlassian.com/bitbucket-cloud/docs/deployment-concurrency-control/
It says: " By tracking your deployments using Bitbucket Deployments, Pipelines will automatically check if there is a deployment in progress before starting a new one to the same environment. If there is already a deployment in progress, later pipelines deploying to the same environment will be paused. "
Steps I've taken:
1. I have set up Deployments and created the staging (and production) environments in Deployments.
2. In my bitbucket_pipelines.xml I have added "deployment: staging" to my pipeline step for "Deploy to staging"
However, still, if 2 pipelines are started around the same time, both of the Deployment steps run at the same time in the 2 separate pipelines.
Only one of the deployments shows up in the Deployments tab for that environment, which ever one starts first, but, the other/second pipeline is still running the steps for the Deploy step too for the same environment.
Am I misunderstanding that the second pipeline's "Deploy to staging" step shouldn't be starting because Deployments is set up and a deployment is already running?
On this page:
https://support.atlassian.com/bitbucket-cloud/docs/set-up-and-monitor-deployments/
it also says:
"Note: you can only have one in-progress deployment in each environment. Any later pipelines that deploy to the same environment will be automatically paused. You can manually resume the paused deployment step once the in-progress deployment completes."
That's what I want to happen, but that's not what is happening in the Pipelines. What have I missed?
Hi Jackie and welcome to the community!
This is the expected behavior:
By tracking your deployments using Bitbucket Deployments, Pipelines will automatically check if there is a deployment in progress before starting a new one to the same environment. If there is already a deployment in progress, later pipelines deploying to the same environment will be paused.
I cannot reproduce the issue you are reporting, so I am going to need some additional info to better help you:
1. You mention in your post a bitbucket_pipelines.xml file. The file where you specify Pipelines behavior needs to be named bitbucket-pipelines.yml, and not bitbucket_pipelines.xml.
Can you please confirm if you have a file named bitbucket-pipelines.yml in the repo?
2. Can you please provide a screenshot of the bitbucket-pipelines.yml file in your repo? You can blur the commands of each step's script in the screenshot, I just want to see the structure, keywords used etc.
3. I don't see a Bitbucket Cloud account in our system with the email of your community account. Are you using Bitbucket with a different account?
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.