简体   繁体   English

用git标记Jenkins构建

[英]Tagging Jenkins builds with git

I have already looked through a few Stack overflow posts on this but I still cannot find an answer. 我已经看过一些有关Stack溢出的帖子,但是我仍然找不到答案。

My company uses Jenkins we have recently moved from SVN to a GIT which is hosted on one of our servers. 我的公司使用Jenkins,我们最近已从SVN迁移到托管在我们一台服务器上的GIT。

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. 使用SVN,我们可以选择已经完成的构建,选择标签名称并对其进行标签,然后将这些更改添加到存储库中。

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. 不幸的是,当我们使用git进行标记时,该标记未推送到存储库中,也没有设置远程推送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. 任何建议,我都尝试过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. 另外,您可以编写自己的自定义批处理或bash脚本来执行标签。 You can then trigger it on specific builds using Promoted Builds plugin (bundled with default Jenkins installation). 然后,您可以使用Promoted Builds插件(与默认的Jenkins安装捆绑在一起)在特定的版本上触发它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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