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
- name: NAME
- git tag -a CIDrone -m "to skip the execution"
- git push --follow-tags origin BRANCH
As I understand, this should be on step level, not pipeline level.
- name: NAME
- git tag -a CIDrone -m "to skip the deployment"
- git push --follow-tags origin release/dev
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?
I am not sure I fully understand the question, however, if you want to ignore tags you would add the following section to your yaml:
or instead of excluding tags, you could include specific events you want the system to process:
If you see a pipeline execute and this is not expected, you should post a copy of your yaml and a copy of the build information). These issues are generally caused by misconfiguration, so we need to see both the yaml and the build information to help you correct your pipeline configuration.
In simple words, I want to skip the execution when specific tag available in the branch.
In my yaml code above “git tag -a CIDrone -m "to skip the deployment” adds the tag into the branch, and on the base of this tag, I want drone not to execute it.
As [ci skip] is not working. I want an alternative.
You instruct Drone to skip pipeline execution if the reference in the webhook payload (example here) matches any of the references in the exclude list. Here is some simple pseudo code that demonstrates how this is evaluated: