git jenkins 和标签一起
有没有办法让詹金斯签出并构建某个标签(参数化构建
?) 我目前正在构建开发(主分支),并在标记版本后(使用 maven:release
)
一些信息(按照 Vonc 的建议)
环境是win7,最新的git,最新的jenkins(昨天更新)。 我尝试将标签名称放入 Branch Specifier
中,但没有成功(要么失败,要么检查 master
分支)。 来自詹金斯日志:
从 1 个远程 Git 存储库获取更改从 [email protected]:${myorgname}/${myorgname}.git
我猜问题确实是 -我在哪里(如果有)告诉詹金斯 - “嗨,不要签出主分支,只需签出标签”。 有没有地方可以自己配置git命令? (例如 - git fetch my_tag
)
Is there any way to make jenkins checkout and build a certain tag (parameterized builds
?)
I'm currently building the development (master branch) and right after tag a version (using maven:release
)
some information (as suggested by Vonc)
Env is win7, latest git, latest jenkins (updated yesterday) .
I've tried placing the tag name in the Branch Specifier
but without luck (either it fails or checking out the master
branch).
from jenkins log:
Fetching changes from 1 remote Git repository Fetching upstream changes from [email protected]:${myorgname}/${myorgname}.git
I'm guessing the question is really - where (if any) do I tell jenkins - "hi, don't checkout master branch, just checkout the tag".
Is there a place I can configure the git command myself? (e.g - git fetch my_tag
)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想让 Jenkins 从 git 标签构建,请在标有“要构建的分支”的框中输入标签名称。您可以将分支名称、标签甚至 git 修订版本放入框中。
如果它不适合您,您确定已将标签推送到 Jenkins 从中提取的存储库吗?除非你告诉它,否则
git push
不会推送标签。If you want to make Jenkins build from a git tag, you enter the tag name into the box labeled "Branches to build". You can put a branch name, a tag or even a git revision into the box.
If it is not working for you, are you sure you have pushed the tag to the repository where Jenkins is pulling from?
git push
does not push tags unless you tell it to.