Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
b65c30cb
J
jenkins
项目概览
LinuxSuRen
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b65c30cb
编写于
11月 24, 2012
作者:
C
Christoph Kutzinski
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Switch to ignore post-commit hook in SCM polling triggers [FIXED JENKINS-6846]
上级
41f1fe66
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
35 addition
and
1 deletion
+35
-1
changelog.html
changelog.html
+4
-0
core/src/main/java/hudson/triggers/SCMTrigger.java
core/src/main/java/hudson/triggers/SCMTrigger.java
+20
-1
core/src/main/resources/hudson/triggers/SCMTrigger/config.jelly
...rc/main/resources/hudson/triggers/SCMTrigger/config.jelly
+3
-0
core/src/main/resources/hudson/triggers/SCMTrigger/help-ignorePostCommitHooks.html
...udson/triggers/SCMTrigger/help-ignorePostCommitHooks.html
+8
-0
未找到文件。
changelog.html
浏览文件 @
b65c30cb
...
...
@@ -58,6 +58,10 @@ Upcoming changes</a>
<li
class=
bug
>
Slave's Name should be trimmed of spaces at the beginning and end of the Name on Save.
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-15836"
>
issue 15836
</a>
)
<li
class=
rfe
>
Added new switch to ignore post-commit hooks in SCM polling triggers.
This requires that the SCM plugin supports this feature, too!
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-6846"
>
issue 6846
</a>
)
</ul>
</div>
<!--=TRUNK-END=-->
...
...
core/src/main/java/hudson/triggers/SCMTrigger.java
浏览文件 @
b65c30cb
...
...
@@ -73,9 +73,28 @@ import static java.util.logging.Level.*;
* @author Kohsuke Kawaguchi
*/
public
class
SCMTrigger
extends
Trigger
<
SCMedItem
>
{
@DataBoundConstructor
private
boolean
ignorePostCommitHooks
;
public
SCMTrigger
(
String
scmpoll_spec
)
throws
ANTLRException
{
this
(
scmpoll_spec
,
false
);
}
@DataBoundConstructor
public
SCMTrigger
(
String
scmpoll_spec
,
boolean
ignorePostCommitHooks
)
throws
ANTLRException
{
super
(
scmpoll_spec
);
this
.
ignorePostCommitHooks
=
ignorePostCommitHooks
;
}
/**
* This trigger wants to ignore post-commit hooks.
* <p>
* SCM plugins must respect this and not run this trigger for post-commit notifications.
*
* @since 1.493
*/
public
boolean
isIgnorePostCommitHooks
()
{
return
this
.
ignorePostCommitHooks
;
}
@Override
...
...
core/src/main/resources/hudson/triggers/SCMTrigger/config.jelly
浏览文件 @
b65c30cb
...
...
@@ -27,4 +27,7 @@ THE SOFTWARE.
<f:entry title="${%Schedule}" help="/descriptor/hudson.triggers.TimerTrigger/help/spec">
<f:textarea name="scmpoll_spec" checkUrl="'${rootURL}/trigger/TimerTrigger/check?value='+encodeURIComponent(this.value)" value="${instance.spec}"/>
</f:entry>
<f:entry field="ignorePostCommitHooks" title="${%Ignore post-commit hooks}">
<f:checkbox />
</f:entry>
</j:jelly>
core/src/main/resources/hudson/triggers/SCMTrigger/help-ignorePostCommitHooks.html
0 → 100644
浏览文件 @
b65c30cb
<div>
Ignore changes notified by SCM post-commit hooks.
<p>
This can be useful if you want to prevent some long-running jobs (e.g. reports) starting because of every commit, but still want to
run them periodic if SCM changes have occurred.
<p>
Note that this option needs to be supported by the SCM plugin, too! The subversion-plugin supports this since version 1.44.
</div>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录