[英]Jenkins and only build feature branches?
In Jenkins 1.605 I have configured the following Branch Specifier for Git SCM 在Jenkins 1.605中,我为Git SCM配置了以下Branch Specifier
features/**
And a SCM poll interval at 1 minute. 并且SCM轮询间隔为1分钟。
But when i push changes on my feature branch: 但是,当我在我的功能分支上推送更改时:
git push origin features/sample
Nothing happens. 什么都没发生。 If I trigger the build manually master
is build: 如果我手动触发构建,则构建master
:
Seen branch in repository origin/features/sample
Seen branch in repository origin/master
Seen 2 remote branches
Checking out Revision e2d7371a4e8480dcacbd2af93c2347d4b75fde19 (origin/master)
Have I configured the branch specifier incorrectly? 我是否错误地配置了分支说明符?
Seems to be a bug (still open): https://issues.jenkins-ci.org/browse/JENKINS-27352 似乎是一个bug(仍然是开放的): https : //issues.jenkins-ci.org/browse/JENKINS-27352
You can check if giving a branch spec as a parameter works better. 您可以检查是否将分支规范作为参数更好地工作。
That was the approach illustrated in JENKINS-14276 : 这就是JENKINS-14276中说明的方法:
- a parameterized build with parameter "
Branch
", default "**
" 带参数“Branch
”的参数化构建,默认为“**
”- Git SCM with branch specifier "
${Branch}
" 带分支说明符“${Branch}
”的Git SCM- SCM polling activated SCM轮询已激活
In your case, you would pass as a parameter features/**
, and see if it works better. 在您的情况下,您将作为参数features/**
传递,并查看它是否更好。
The OP confirms in the comments it does not work for now (March 2015), as mentioned in bug JENKINS-27352 : OP在评论中确认它现在不起作用(2015年3月),如bug JENKINS-27352中所述 :
Git SCM polling is not triggered from a push notification with a parametrized branchspec 使用参数化branchspec的推送通知不会触发Git SCM轮询
There is a PR (Pull Request) in progress: pull/309
, not yet merged In Jenkins master. 正在进行PR(Pull Request): pull/309
,尚未合并在Jenkins master中。
Update July 2015 : That PR is now closed, and the Jenkins- 27352 now includes: 2015年7月更新 :PR现已关闭, Jenkins-27352现已包括:
Fix included in git plugin 2.4.0 released 18 July 2015 修复包含在2015年7月18日发布的git插件2.4.0中
(40 minutes ago, so give it a day before that version is visible as an upgrade in your Jenkins) (40分钟前,所以在你的Jenkins升级版本可见一天之前给它一个)
Same problem I would like to build all features branch 同样的问题我想建立所有功能分支
on jenkins version 2.46.1 关于jenkins版本2.46.1
all branch build work with 所有分支构建工作
**/features/* **/特征/*
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.