-
Type:
Suggestion
-
Resolution: Low Engagement
-
Component/s: Pipelines - Deployments
-
1
It would be helpful for some workflows to be able to skip builds that are triggering a commit with the same head.
For example a commit is I pushed to a feature branch and there is build triggered for it. Then the commit is merged to master. If someone merges master to their branch after the original push to the commit, when they push that commit to their branch the same step is getting triggered for that commit. In this implementation, the step will fail as it is attempting to push an image to ECR and it will fail if the same tag is used. The tag will not change unless there was a change in the code so it fails under this workflow.
Workaround, however it includes manual steps
If you have locally commits that change your application, push those first, so a pipeline will get triggered.
Then, create a separate commit include [skip ci] anywhere in the commit message of this commit, push it and the pipeline won't get triggered. You can also change the bitbucket-pipelines.yml file from Bitbucket website and include [skip ci] in the commit message so that no build will run.
If you push multiple commits that change your application and [skip ci] is included in the commit message of the last commit, then no pipeline will run for any of the previous commits either.