Pushing git tags (created inside Jenkins GUI) to remote

24 views
Skip to first unread message

Christian Ciach

unread,
May 22, 2018, 4:45:45 PM5/22/18
to Jenkins Users
Hi,

For every git build, there is a disk icon on the left bar saying "No tags". This icon can be used to create git tags using the web GUI of jenkins. (This triggers "GitTagAction.java" of the git-plugin.)

When creating tags this way, they seem to be only created inside the local git reposity of the jenkins workspace. Is there a way to automatically push the created tags to the remote server, or at least trigger a job that could do it?

Best regards,
Christian

Mark Waite

unread,
May 22, 2018, 4:58:40 PM5/22/18
to jenkins...@googlegroups.com
I don't especially understand the workflow that was envisioned with the tagging user interface.  It behaves as you've described it.  The tags are written into the git repository in the workspace.  That assumes the workspace is persistent (which is not a valid assumption with many of the cloud agent providers).

I don't recall if the tag is created in the most recently used workspace, or the workspace that was used for the specific job.  Since jobs may run on a different agent each time, the workspace may be different each time.

If you want to tag a build, it may be better to use a parameterized Pipeline job with the proposed tag name as the argument.  Then apply the tag during the Pipeline job and immediately push it to the remote repository.

Mark Waite

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/39638533-8107-4fad-affc-d612d6dcec91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages