[英]What's a simple way to add the git branch in jenkins “changes” screen?
We're using jenkins with the git plugin (github remote), and in the "branches to build" we specify "**", which builds any branch that was changed. 我们在git插件(github远程版)上使用jenkins,在“要创建的分支”中指定“ **”,它可以构建任何已更改的分支。
However, the "changes" screen displays only the git commits sha1 and commit message. 但是,“更改”屏幕仅显示git commits sha1和commit消息。 Is there any simple way to add the branch name to the text? 有没有简单的方法可以在文本中添加分支名称? or even better, to the jenkins build ID? 甚至更好,让詹金斯建立ID?
Might be related to How to receive local Git branch name with Jenkins Git plugin? 可能与如何使用Jenkins Git插件接收本地Git分支名称有关? , but not sure how to use that info... ,但不确定如何使用该信息...
The answer is using Build Name Setter Plugin . 答案是使用Build Name Setter插件 。
#${BUILD_NUMBER}_${GIT_BRANCH}
在“作业配置”页面中,向下滚动至“ 构建环境”部分,将构建名称设置为#${BUILD_NUMBER}_${GIT_BRANCH}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.