Last month, we announced the general availability of Bitbucket Deployments, a new feature within Bitbucket to help you keep track of the status of your shared deployment environments. With Deployments in Bitbucket, your team has every capability they need, from code hosting, code review, built-in CI/CD and now deployment tracking, to build and ship great products from within Bitbucket.
But there’s still a lot of uncovered potential for Deployments. Imagine, for example, that you push some code which triggers a pipeline that deploys to production. Halfway through, your colleague pushes more changes that also trigger a deployment – two deployments are now running! What will your production environment end up looking like?
We’ve received feedback from teams that it’s important only a single deployment is in progress to an environment at any given time. This gives teams confidence about the status of their environment and eliminates any uncertainty about whether deployments are running in the right order. We’ve listened to your feedback and realise how important it is for Bitbucket to just do the right thing.
So we’re excited to announce that Bitbucket Deployments is the first CI/CD tool to automatically enforce deployment concurrency control. Simply by adding deployment tracking to your pipeline, we will automatically ensure that only one deployment is in progress per environment at a time.
“This is amazing! There’s nothing more frustrating than a 35min build failing because the environment is still updating”
– Ken Greeff, Software Engineer at Realhub Systems
How does the concurrency control work?
Deployment concurrency control requires you to first enable Bitbucket Deployments for your repository. With deployment tracking enabled, Pipelines will then check whether there is already a deployment in progress before starting a new one to the same environment. If there is already a deployment in progress, later deployment steps will be paused. You can then manually resume the deployment once the in-progress deployment has completed.
This feature is hugely valuable to teams who deploy regularly – by letting the in-progress deployment to finish executing before allowing a later deployment to be run, the status of your environment will always be known and your deployment won’t fail due to unavailable resources. Keep in mind that Bitbucket Deployments tracks the status of shared environments in the repository, and that developer’s individual test environments don’t need to be tracked.
We’re super excited to share this addition to Bitbucket with you. If you have any feedback to share, tweet us @Bitbucket. Happy deploying!