Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,296,508
Community Members
 
Community Events
165
Community Groups

is it possible to not run on branch push pipeline when the latest push has a tag?

Siddhant I'm New Here May 27, 2022

i am using a tag based release. When i want to release i tag the commit with release-${version} and push it. But doing so, causes two pipelines to run one for the push on master and another for the tag. is it possible to just run tag pipeline and not the push pipeline if the latest pushed commit has a tag.

1 answer

1 accepted

1 vote
Answer accepted
Mark C Atlassian Team May 29, 2022

Hi @Siddhant

Welcome to the community.

Unfortunately, it's not possible to stop a branch push trigger when there's a specific tag on a push.
As a workaround, you can add a script in the branch/default trigger that validates if a pushed commit has a specific tag.
Then return exit command to stop executing the build further.

pipelines:
  default:
    - step:
        name: Default trigger
        script:
          - # validate if there's a tag then return exit to stop executing the build further
          - #Some scripts here
  tags:
    release-*:
      - step:
          name: Release
          script:
            - #Some scripts here

Hope it helps and do let me know if you have further questions that I can help with.

Regards,
Mark C

Siddhant I'm New Here May 31, 2022

Thanks for replying.
This will definitely save some of the build minutes...
Btw, Is there any chance of this kind of feature being added in near future?

Mark C Atlassian Team Jun 01, 2022

Hi @Siddhant

We do have an existing feature request for it that can be located through this link. - https://jira.atlassian.com/browse/BCLOUD-20192
You can upvote and watch it for now so that you'll be notified of any updates from our team when the feature becomes available on Bitbucket Cloud.
Please do note that we don't have an exact ETA for the feature request as all new features will be implemented according to our policy here.

Hope it helps and let me know if you have further questions.

Regards,
Mark C

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,181 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you