Hello,

I'm trying to make jenkins trigger a build whenever a new tag is pushed to 
my git repo.

I already made it to trigger builds when a tag pointing to a new commit is 
pushed, by setting:

*refspec:* +refs/tags/*:refs/remotes/origin/tags/*
> *branch specifier:* **


The problem is that the builds are not triggered when i tag some commit 
that already has another tag, even if its an annotated tag.

The use case is as follows:

1)We need devs to be able to deploy our webapp by tagging releases on 
github (mostly in other branches than master), like tag: v1.0.0 (the 
previous tag was v0.9.9).
2)We need to be able to rollback deploys, by tagging again previous 
releases (rollbacks will be always tagging commits on master), like tag: 
v0.9.9-rollback [ponting to the same commit as v0.9.9).
3)We also need to follow some process that would allow fresh servers to 
retrieve the same deployed release as the other servers (dealing with 
autoscalling/dynamic inventory)

The 3rd item is easily solvable by configuring capistrano to self-deploy 
the last tag (sorting tags by taggerdate) on server startup (so new 
machines will fetch rollbacks too).

The 1st item is already good, as jenkins always trigger a build when a tag 
ponting to a new commit is pushed.

My problem is with rollbacks (2nd item), jenkins will receive the git hook, 
poll the repository but won't trigger the build, it detects the new tag but 
it acts as it already built that.

I've searched online and from what i read, i think the git plugin is 
checking the hash the tag points to, not the hash from the tag itself, thus 
it doesn't detect a change. Can somebody confirm if i'm right, or if the 
problem is is another plugin?

Any help is highly appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/735cc770-d406-41b6-a16f-29b946a5d441%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to