The built-in environment variable CIRCLE_TAG is not present

If the CIRCLE_TAG built-in environment variable is not being populated even though you pushed a tagged commit, one way to resolve is to check what command is being used to push the commit.

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?
5 out of 38 found this helpful



Please sign in to leave a comment.