简体   繁体   中英

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

I am trying the following in the Refspec field:

+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. I am going to change my docker base image to ubuntu 16 which should have a newer git client.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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