I want to trigger jenkins build if a new tag is pushed to a remote repository. I have seen number of posts, but none seems to be working for me. My build is triggered successfully when I push a tag having new commits in it, but if I push a new tag on old commits it does not trigger the build.
I have configured it using git plugin in Jenkins and adding
Refscpec value as +refs/tags/*:refs/remotes/origin/tags/* and Branch specifier as */tags/*
Now if run:
git push origin master
git tag release-v1
git push origin release-v1
Build is triggered successfully for tag release-v1 But now if i do:
git push origin release-v2
Build is not triggered.
This means jenkins is always looking for commit ids, if there is a new commit id linked with the tag it will build the job. But i want the jenkins job to run in case I want to release already committed code for another feature with a new tag name.