This question is in reference to Atlassian Documentation: Environment variables in Bitbucket Pipelines
I've been experimenting with pushing commits and tags on master and other branches and I can't find a situation when the BITBUCKET_TAG environment variable is set.
Under what scenario is the BITBUCKET_TAG set and triggers a pipelines build?
I was prototyping how to migrate our deployment pipeline from Bamboo Cloud using tags as the trigger on specific branches. (qa branch, tagging RELEASE-X, triggers deployment)
FYI - the documentation I reference in the original post documents a BITBUCKET_TAG environment variable kicks off a build!
|The tag of a commit that kicked off the build. This value is only available on tags.|
We are also attempting to use the BITBUCKET_TAG environment variable without success. Specifically, when a commit is pushed to master, we are using Pipelines to package our code and upload the archive file to Artifactory. The archive file needs to include the version number (i.e. the tag on master), but the BITBUCKET_TAG environment variable isn't being set.
On first read of Jeroen's answer he appears to suggest the env var BITBUCKET_TAG is pointless :)
I'm guessing you have to tag the commit locally prior to pushing the commit to the remote branch (Bitbucket). This would then kick off a build and have the tag available immediately.
Every team in the world is unique, and so Atlassian believes that each and every team's best way of working needs to be molded to their unique circumstances – ...
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!
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
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot