Say, I have a tag based pipeline on bitbucket like this
pipelines:
tags:
v*:
- step:
I don't want to run pipelines on PATCH version changes semver.
For example when going from tag v1.0.0 to v1.0.1 I don't want to run pipelines. Pipelines should only run when there is a MINOR or MAJOR change like. v1.0.0 to v1.1.0 or v2.0.0.
How do I do this?
Is there a [skip ci] equivalent when pushing tags to indicate I don't want pipeline to run for this tag?
[skip ci] cannot be used during push but in a commit message.
You can include [skip ci] in the commit message of commits with a tag that you don't want to trigger the pipeline for, and the pipeline will be skipped when you push the tags.
In your example, include [skip ci] in the commit message of the commit with tag v1.0.1
Please note that if you have additional pipelines, e.g. a default pipeline or a branch pipeline, these will not get triggered either for the commit that has [skip ci] in its commit message.
Kind regards,
Theodora
Hi just to clarify,
If I do a commit message like:
[skip ci] This commit message will have tag v1.0.1
And do a git tag v1.0.1 and git push --tags no pipeline will be triggered? Is this documented somewhere?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is correct, no pipelines builds will get triggered for the commit that has [skip ci] in its commit message.
The [skip ci] feature is documented here:
Can I commit without triggering the pipeline?
Yes. If you don't want to run a pipeline on a commit that would normally trigger one, you can include [skip ci] or [ci skip] anywhere in your commit message of the HEAD commit. Any commits that include [skip ci] or [ci skip] in the message are ignored by Pipelines.
No pipelines builds will get triggered for the [skip ci] commit, regardless of whether they are tag, default, or branch-based builds.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.