Repushing the same tag twice doesn't trigger anything

I have a job which is triggered on a tag. Works well. But, during development process, I tried to repush it again and again, and I noticed that when it was on the same commit, the jobs didn’t trigered at all.

manipulations on same commit :

  • local commit #1 -> git tag toto -> git push origin toto -> job triggered
  • local commit #1 -> git tag -d toto -> git push origin :toto (delete locally and remotly the tag)
  • local commit #1 -> git tag toto -> git push origin toto -> nothing is triggered

on 2 distinct commits :

  • local commit #1 -> git tag toto -> git push origin toto -> job triggered
  • local commit #1 -> git tag -d toto -> git push origin :toto (delete locally and remotly the tag)
  • local commit #2 -> git tag toto -> git push origin toto -> job triggered

I checked the webhooks logs from github and everything was sent.

Seems that circle ci prevent from triggering twice the same build based on a tag push on a same commit, or did I miss something ?

Here is my filter :

  filters_tag_public: &filters_tag_public
    filters:
      branches:
        ignore: /.*/
      tags:
        only: /^public$/

Hi @philkpler,

This is intended behavior. Once you push a tag to CircleCI, it is bookmarked to the commit sha. So if the same tag is deleted, re-created and the same commit is tagged with the same name, it is marked as a duplicate and will not trigger a build.

If you create a tag with a different name, a build will be triggered.

I hope that clarifies things for you.

Thanks.

I think it would be clearer if this “bookmark” was visible, via a message like the ones that appear when a commit don’t trigger any build.
Because it’s not obvious that something pushed and remove, is keeping a state somewhere in circle-ci.

The workaround to me, as I use that tag as a “trigger”, was to push force a “fake commit”.