Forums

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

Choose which branch to checkout when build is triggered by a tag

Andre_Ferreira
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!
October 30, 2019

Hi all,

There are two branches in my repository and they're are called develop and master. I would like to trigger a pipeline once a tag is pushed, but I need to choose which branch to checkout depending on the tag pattern. Example:

If the tag matches 'staging-*', the develop branch must be used and if it matches 'master-*', the branch master is the chosen one.

Can someone please help me?

Thanks!

1 answer

0 votes
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 30, 2019

Hello @Andre_Ferreira,

This is not the way such setup works. If you configure a pipeline for a tag, a build will be triggered for the commit that tag is pointing to (a tag is always pointing to some commit).

Hope this helps. Let me know if you have any questions.

Cheers,
Daniil

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events