The built-in environment variable CIRCLE_TAG is not being set

If the CIRCLE_TAG built-in environment variable is not set even though you pushed a tagged commit, one way to resolve is ensure that the git tag event is triggering a build.  

The reason CIRCLE_TAG is not showing in your build could be that the first webhook being sent to CircleCI from GitHub / Bitbucket that is processed did not contain the tag information necessary for CIRCLE_TAG to be populated. The order of webhooks sent is influenced by the command used to push the commit.

To ensure that the first hook from GitHub that is processed is the one with the tag information, try pushing the commit by first pushing the tag rather than to the branch, e.g. using git push origin <tag-name>

Was this article helpful?
6 out of 41 found this helpful

Comments

0 comments

Please sign in to leave a comment.