Jenkins 并且只构建功能分支?
Jenkins and only build feature branches?
在 Jenkins 1.605 中,我为 Git SCM
配置了以下分支说明符
features/**
SCM 轮询间隔为 1 分钟。
但是当我在我的功能分支上推送更改时:
git push origin features/sample
没有任何反应。如果我手动触发构建 master
是构建:
Seen branch in repository origin/features/sample
Seen branch in repository origin/master
Seen 2 remote branches
Checking out Revision e2d7371a4e8480dcacbd2af93c2347d4b75fde19 (origin/master)
我是否错误地配置了分支说明符?
似乎是一个错误(仍未解决):
https://issues.jenkins-ci.org/browse/JENKINS-27352
您可以检查将分支规范作为参数是否效果更好。
这就是 JENKINS-14276 中说明的方法:
- a parameterized build with parameter "
Branch
", default "**
"
- Git SCM with branch specifier "
${Branch}
"
- SCM polling activated
在你的情况下,你将作为参数传递 features/**
,看看它是否工作得更好。
OP 在评论中确认它目前(2015 年 3 月)不起作用,如 bug JENKINS-27352 中所述:
Git SCM polling is not triggered from a push notification with a parametrized branchspec
有一个 PR(拉取请求)正在进行中:pull/309
,尚未合并到 Jenkins master。
2015 年 7 月更新:该 PR 现已关闭,Jenkins- 27352 现在包括:
Fix included in git plugin 2.4.0 released 18 July 2015
(40 分钟前,所以在该版本作为升级在您的 Jenkins 中可见前一天)
同样的问题
我想构建所有功能分支
詹金斯版本 2.46.1
所有分支构建都适用于
**/特征/*
在 Jenkins 1.605 中,我为 Git SCM
配置了以下分支说明符features/**
SCM 轮询间隔为 1 分钟。
但是当我在我的功能分支上推送更改时:
git push origin features/sample
没有任何反应。如果我手动触发构建 master
是构建:
Seen branch in repository origin/features/sample
Seen branch in repository origin/master
Seen 2 remote branches
Checking out Revision e2d7371a4e8480dcacbd2af93c2347d4b75fde19 (origin/master)
我是否错误地配置了分支说明符?
似乎是一个错误(仍未解决): https://issues.jenkins-ci.org/browse/JENKINS-27352
您可以检查将分支规范作为参数是否效果更好。
这就是 JENKINS-14276 中说明的方法:
- a parameterized build with parameter "
Branch
", default "**
"- Git SCM with branch specifier "
${Branch}
"- SCM polling activated
在你的情况下,你将作为参数传递 features/**
,看看它是否工作得更好。
OP 在评论中确认它目前(2015 年 3 月)不起作用,如 bug JENKINS-27352 中所述:
Git SCM polling is not triggered from a push notification with a parametrized branchspec
有一个 PR(拉取请求)正在进行中:pull/309
,尚未合并到 Jenkins master。
2015 年 7 月更新:该 PR 现已关闭,Jenkins- 27352 现在包括:
Fix included in git plugin 2.4.0 released 18 July 2015
(40 分钟前,所以在该版本作为升级在您的 Jenkins 中可见前一天)
同样的问题 我想构建所有功能分支
詹金斯版本 2.46.1
所有分支构建都适用于
**/特征/*