简体   繁体   中英

Jenkins “tag” build with git

There is an option on jenkins when using git to "tag" the build.

What does this do and how do I use it? I assume I can tag the build at that version but I'm struggling to figure out how to push that tag - it's not so useful unless I can push the tag.

You don't always want to push all the build tags, because there could be a lot of them, depending on your build cycle.

But any task scheduler (like Jenkins) will tag a build in case you want to get back to that specific code and debug it (because even though the build might have succeeded, the end result might have run poorly)

That said, should you want to push those tags, you can use, as mentioned in " Tagging a GitHub project through Jenkins ", a post-build action ( git push --tags ).
Or, as mentioned in the ticket JENKINS-12156 , use the GitPublisher (as illustrated in " Git, Feature Branches, and Jenkins – or how I learned to stop worrying about broken builds ").

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM