[英]Jenkins git Refspec to build master and any v* branches
Our developers use temporary branches but I only want to build any commits to master
and any v*
branches (eg v1.0
, v1.0
, v1.1
, etc.) 我们的开发人员使用临时分支,但我只想构建对master
和任何v*
分支的任何提交(例如v1.0
, v1.0
, v1.1
等)
I am trying the following in the Refspec field: 我正在Refspec字段中尝试以下操作:
+refs/heads/master:refs/remotes/origin/master
+refs/heads/v*:refs/remotes/origin/v*
but jenkins kicks out the following error: 但是詹金斯踢出了以下错误:
stderr: fatal: Invalid refspec '+refs/heads/v*:refs/remotes/origin/v*'
Looks like my issue was my git client was 1.9.1. 看来我的问题是我的git客户端是1.9.1。 I am going to change my docker base image to ubuntu 16 which should have a newer git client. 我将将docker基本映像更改为ubuntu 16,该映像应具有较新的git客户端。
verified that this resolved the issue. 验证此问题已解决。 I upgraded to ubuntu 16 which had a git cli of 2.7.4 and now the refspec is working as intended. 我升级到git cli为2.7.4的ubuntu 16,现在refspec可以按预期工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.