Manual build in bitbucket pipelines - how to find tags?


I want a manually triggered pipeline in which I react differently according to whether or not there's a tag on the repo at that point

$BITBUCKET_TAG seems to be empty if I trigger a pipeline on a commit which has a tag

Is there any way of finding out if there's a tag and what the value is?



1 answer

0 votes

Hi Al,

Bitbucket Pipelines allows for configuring pipelines based on tags being pushed, rather than commits. See here for documentation:

The $BITBUCKET_TAG variable will only be populated on a build with a tag configuration (as above).

Otherwise you can use the git tag list command, but you may need to enabled full clone (we automatically do a shallow clone for clone speed optimisation):

Does that help?



Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

1,924 views 7 10
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you