Skip to content
Permalink
Browse files
[FIXED JENKINS-26582] To trigger a build from notifyCommit, the proje…
…ct must have an SCMTrigger.

This is true even if it has a matching SCM and sha1 is specified.
Otherwise we would be triggering MatrixConfiguration, which is illegal and cause errors.
  • Loading branch information
jglick committed May 13, 2015
1 parent 6c1c49f commit de3117def8625c57a95126a200e990ab0481948e
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/java/hudson/plugins/git/GitStatus.java
@@ -238,8 +238,8 @@ public void writeBody(PrintWriter w) {
}

SCMTrigger trigger = scmTriggerItem.getSCMTrigger();
if (trigger != null && trigger.isIgnorePostCommitHooks()) {
LOGGER.info("PostCommitHooks are disabled on " + project.getFullDisplayName());
if (trigger == null || trigger.isIgnorePostCommitHooks()) {
LOGGER.info("no trigger, or post-commit hooks disabled, on " + project.getFullDisplayName());
continue;
}

@@ -266,7 +266,7 @@ public void writeBody(PrintWriter w) {
new CauseAction(new CommitHookCause(sha1)),
new RevisionParameterAction(sha1), new ParametersAction(buildParameters));
result.add(new ScheduledResponseContributor(project));
} else if (trigger != null) {
} else {
LOGGER.info("Triggering the polling of " + project.getFullDisplayName());
trigger.run();
result.add(new PollingScheduledResponseContributor(project));

0 comments on commit de3117d

Please sign in to comment.