Forums

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

Can you start a pipeline by branch + tag?

Deleted user September 9, 2016

This question is in reference to Atlassian Documentation: Configure bitbucket-pipelines.yml

We'd like to be able to start a pipeline by using a specific tag on a branch. Our setup has 6 environments, production, staging, int-a, dev-a, int-b and dev-b. We are using a custom git-flow workflow with master, develop, feature/*, defect/*, release/* and hotfix/* branches. We'd like to direct the same release/* branch to start two different pipelines, depending upon a git tag. By default, the release/* branch would trigger a build and deploy to int-a, but once we're happy with this at some point in the future, we could trigger a build and deploy for this release branch to int-b using the tag. So, always trigger the build and deploy to int-a, and only build and deploy to int-b when a specific tag or tag pattern is added to the branch.

I know we could just use two different branches, but extending for the tag would be grand.

If you have it, bonus, how do I do that then?

2 answers

1 vote
Steffen Opel _Utoolity_
Community Champion
September 9, 2016

This feature has meanwhile been implemented, though not yet documented - refer to the latest comments on the following issue for details:

 

Adrian Hristov
Contributor
February 7, 2017

Haven't tried this yet, but according to the link provided, this features is now available.

Like 小池貴之 likes this
Steffen Opel _Utoolity_
Community Champion
February 8, 2017

Thanks @Adrian Hristov, I've rephrased the answer accordingly.

0 votes
Mina Luke June 11, 2018

From what I understand the answer is no, it is either tags or branches. I could not figure out a way to trigger a pipeline based on both.

Alain Seng
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 28, 2018

I understand the same way but how can I make the difference between a tag on master branch and a tag on development branch? A workaround would be a prefix "prod_*" and "dev_*" but I doubt this is the most clever solution

Eugene Dementiev
Contributor
June 29, 2018

We also really need to be able to trigger a pipeline for a particular branch tag

Mina Luke July 3, 2018

I could not find a way to do that. If a pipeline is triggered by a tag it will triggered by that tag regardless the branch. As a workaround, I am using tags that contain `rc` to refer to staging branch while tags with no `rc` refer to production branch. I do not like this workaround but I could not find another solution.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events