Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

bitbucket skip pipeline based on tag

Vikash Balasubramanian April 21, 2022 edited

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?

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 25, 2022

Hi @Vikash Balasubramanian,

[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

Vikash Balasubramanian April 25, 2022

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?

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 26, 2022

Hi @Vikash Balasubramanian,

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

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events