简体   繁体   English

Jenkins git插件和分支

[英]Jenkins git plugin and branches

I have a job set up in Jenkins to build all my feature branches (feature/**). 我在Jenkins建立了一个工作来构建我的所有功能分支(功能/ **)。 It is working nicely with the Build Name Setter plugin to identify different builds with Jenkins branch setter name plugin. 它与Build Name Setter插件很好地配合使用Jenkins分支setter名称插件来识别不同的构建。

My question is, if there are changes to more than one branch at the same time, will it queue the same job multiple times? 我的问题是,如果同时对多个分支进行更改,它会多次对同一个作业进行排队吗? Or it will just build first branch (or last branch) that it finds, and next branch will be picked up during next poll and so on? 或者它只会构建它找到的第一个分支(或最后一个分支),下一个分支将在下次轮询期间被选中,依此类推? Or it will just build a branch that was changed last and ignore all other branches? 或者它只会构建一个最后更改的分支并忽略所有其他分支? I can't figure this out, and didn't find it documented clearly. 我无法弄清楚这一点,并没有发现它清楚地记录下来。

Alternatively, you can try the job-per-branch approach. 或者,您可以尝试按分支工作方法。 It comes with its own set of problems and depending on the number of branches you're dealing with, you might need tools to help you manage the process: 它带有一系列问题,根据您正在处理的分支数量,您可能需要工具来帮助您管理流程:

This has been a known issue with the Jenkins Git Plugin for some time now. 这已成为Jenkins Git Plugin已知问题已有一段时间了。 It will only build master, even on changes to specific branches. 即使对特定分支的更改,它也只会构建主数据库。

An older version used to work correctly, so you may be able to work around this if you install a version prior to 1.1.xxx (1.359 is the last known working version). 旧版本曾经正常工作,因此如果您安装1.1.xxx之前的版本(1.359是最后一个已知的工作版本),您可以解决此问题。

As mentioned earlier by Jefromi, you can view the details here: https://issues.jenkins-ci.org/browse/JENKINS-11337 , and up vote the issue if desired. 正如Jefromi早些时候提到的,你可以在这里查看详细信息: https ://issues.jenkins-ci.org/browse/JENKINS-11337,如果需要可以投票。

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

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