詹金斯“标签”用git构建 [英] Jenkins "tag" build with git

查看:116
本文介绍了詹金斯“标签”用git构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用git标记构建时,jenkins上有一个选项。



这是干什么用的,我该如何使用它?我假设我可以在该版本上标记构建,但我很难找出如何推送该标记 - 除非我可以推送标记,否则它并不是非常有用。

解决方案

您并不总是希望将标记全部 ,因为可能会有很多这些标记,具体取决于您的构建周期。 b
$ b

但是任何任务调度程序(如Jenkins)都会标记构建,以防您想要回到特定的代码并进行调试(因为即使构建可能成功,最终结果可能会如果你想推送这些标签,你可以使用,如通过Jenkins标记GitHub项目,后期构建操作( git push --tags )。

或者,如机票JENKINS-12156 中所述,请使用GitPublisher(如 Git,Feature Branches和Jenkins - 或者我学会了如何停止担心构建破坏)。


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").

这篇关于詹金斯“标签”用git构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆