Tagging Jenkins builds with git

I have already looked through a few Stack overflow posts on this but I still cannot find an answer.

My company uses Jenkins we have recently moved from SVN to a GIT which is hosted on one of our servers.

With the SVN we were able to select a build we had already made, choose a tag name and tag it then these changes would be added to the repository.

Unfortunately when we tag with git the tag is not pushed up to the repository, also we don’t have a way of setting the remote push url.

Any suggestions, I have tried Git publisher + post build step, which is not ideal as we don’t want to push a tag for ever build + we would like to have control over the naming scheme of the tag.

  • Get last git tag matching string
  • Analogue of git tag hook
  • Project Organization using Maven + Git
  • What are the common usages of tagging something else than a commit?
  • Push to GitLab repository within CI server (deploy keys)
  • How to get last Git tag matching regex criteria
  • Set git tag and checkout on Windows
  • Make Git Tag visible in repo
  • One Solution collect form web for “Tagging Jenkins builds with git”

    How about this tutorial . Let me know if that helps

    Alternatively, you can write your own custom batch or bash script to perform the tag.
    You can then trigger it on specific builds using Promoted Builds plugin (bundled with default Jenkins installation).

    Git Baby is a git and github fan, let's start git clone.