I'd like to trigger a pipelines build when a tag is created on the master branch only. How would I do this?
G'day @David Jackson !
Welcome to the Bitbucket Cloud community!
You would need to make use of the tags trigger condition, you can find more information in our documentation:
Basically, you would define this in a similar method to branches - for example:
pipelines: tags: 'master': - step: script: - echo "Hello world!"
Hope this helps.
Cheers!
- Ben (Bitbucket Cloud Support)
Hi @Ben , your example will trigger any branch with tag 'master'. Question is different. How to trigger only master or main branch with tag and not other branches. Thx!
Hi @Giorgi Rekhviashvili
This was proposed as a feature, but our developers declined its implementation due to a lack of customer demand - please see the comments for further context:
At this stage, branch triggers will trigger whenever there is any kind of push to the branch - this includes commits and tags.
It looks like you're new here. Sign in or register to get started.