Hi
is it possible to lock a single step? here's an example of what I need:
is it possible to lock step1, so when step 1 is triggered but "locked", the pipeline will wait until it is unlocked
Hi Oliver,
At the moment, it is possible to do this using Bitbucket Deployments. Deployment environments can be configured via Repository settings > Deployments. There are 3 default ones, so you can use any of them.
If e.g. you have a bitbucket-pipelines.yml file like the following:
pipelines:
default:
- step:
name: Testing
script:
- <commands_here>
You can add the deployment keyword along with the name of the environment, as follows:
pipelines:
default:
- step:
name: Testing
deployment: Test
script:
- <commands_here>
If a deployment step to "Test" is already running because of a commit to branch A, and another developer pushes a commit to branch B, then the build triggered by the second commit will be paused.
I'm afraid that the paused build doesn't get resumed automatically though, someone will need to resume the build manually after they open it from the Pipelines page of the repo (we have a feature request for automatic resuming of paused deployment steps: https://jira.atlassian.com/browse/BCLOUD-16304).
If you have a different definition for each branch, then you could do the following, and the behavior will also be the same:
pipelines:
branches:
master:
- step:
deployment: Test
script:
- <commands>
develop:
- step:
deployment: Test
script:
- <commands>
Is this something that works for you?
We don't have any concurrency control for non-deployment steps at the moment, however, that's a feature that has been requested by others as well https://jira.atlassian.com/browse/BCLOUD-16262.
If you're interested in any of the features I mentioned, I would suggest that you add your vote there (by selecting the Vote for this issue link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.
Please feel free to let me know if you have any questions.
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.