Build on tag


@rohara so what is the flow? I tag a commit, I push the tag, and push the commit and the variable should show up?


That should work. I don’t personally use git tags, but that’s the general idea.


Hi @rohara The flow that I described does not seem to work. I cannot under any circumstances get $CIRCLE_TAG to show up.




I just tested and can confirm that the workaround and triggering of builds with tags seems broken right now. We’re investigating and will get back to you as soon as we know more.


EDIT: full Git tag support is now available on CircleCI 2.0. See:


@rohara I did almost the exact thing as you and got nothing.

  1. pushing the tag by itself doesn’t even trigger a build
  2. pushing the commit does trigger a build but the $CIRCLE_TAG variable is empty

I don’t have the deployment section in my config.yml

git tag -a 0.0.2 -m "Testing"
git push -u origin tag 0.0.2

$ git checkout -b testtags
Switched to a new branch 'testtags'
$ git commit --allow-empty -m 'Start branch'
[testtags 49f7c1b] Start branch
$ git push -u origin testtags
Counting objects: 1, done.
Writing objects: 100% (1/1), 190 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 0 (delta 0)
 * [new branch]      testtags -> testtags
Branch testtags set up to track remote branch testtags from origin.
$ git tag -a v7 -m "foo"
$ git push -u origin testtags v7
Counting objects: 1, done.
Writing objects: 100% (1/1), 158 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 0 (delta 0)
 * [new tag]         v7 -> v7
Branch testtags set up to track remote branch testtags from origin.

312 has $CIRCLE_TAG as expected.


@rohara So I copied your config.yml verbatim and deleted the deployment node. It did not work. But when I added the deployment node it echoed the tag…why would that be? I just need the dummy deployment node for the variable to work?


That’s the workaround that allows this to function today.


Copy from Git tag deploys in 2.0

I add this code to my config v2 and it works to run the build steps:

    tag: /.*/

But f you add the commands option it is not run as excepted.

Can have a confirmation from CircleCI that this solution is stable and will be not deleted in the future ? Or any update about a future option to active build on tag that could be great.


Any ETA for this? It’s really annoying, my whole build process is tag-based.
I spend quite some time upgrading to v2 and it just didn’t work :cry:

Broken branch filters? Broken build-on-tag support inadvertently added?

Yeah this is pretty broken for tag-based releases. I just assumed there’d be a way to do this when upgrading to Circle 2.0. I can detect the tag easily enough, but I can’t trigger the build when the tag is pushed.


Looking forward to this being fixed, did a spike moving one of our builds over that currently takes 8 minutes and had it down to 3:30 then realised we can’t trigger builds via tag… :sweat:. We were ready to start paying more for additional containers so we could have those jobs running nice and quick in parallel too! Shame, hopefully the bug is is somewhat a priority as it worked flawlessly in 1.0 so I naively assumed the feature would be there in 2.0.


This is mission critical to our deployment process.

Please provide an estimated delivery date and update this thread regularly.


For those who haven’t heard yet, Git tag support has been released.



Thanks for the info @DavidAntaramian.

The feature is nice, but the defaults are rather confusing:


@urzds Agreed. I’ve already opened a separate topic regarding my own issues with the feature.


We are excited to announce first class [tag support] ( for Workflows. We are planning to deprecate the deployment: key which was an interim solution.


Closing this thread. Please create a new thread to discuss the new Git tag support: