As mentioned in one of the previous posts that Bitbucket Serve does not include the commit message in the webhook payload because of that execution step can’t be skipped.
I was thinking to make use of Conditions or Triggers. In docs I saw that we can use “exclude” property.
I tried implementing both
steps: - name: NAME image: node:12.16.2-alpine commands: - git tag -a CIDrone -m "to skip the execution" - git push --follow-tags origin BRANCH trigger branch: - release/dev event: - push ref: exclude: - refs/tags/CIDrone
As I understand, this should be on step level, not pipeline level.
steps: - name: NAME image: node:12.16.2-alpine commands: - git tag -a CIDrone -m "to skip the deployment" - git push --follow-tags origin release/dev when: ref: exclude: - refs/tags/CIDrone
Pushing tags, in either case, triggers the execution and ends up in in-finite loop scenario.
What I want to achieve is, I need to push tags to git branch while the pipeline is running, as a trigger of the pipeline is push, it starts executing again, which I don’t want of course.
Is there any better approach?
Does my understanding of exclude is wrong?