Skip to content

Commit

Permalink
Merge pull request #336 from Jimilian/JENKINS_48155
Browse files Browse the repository at this point in the history
JENKINS-48155: gerrit-trigger-plugin does not repsect dynamicTriggerConfiguration flag
  • Loading branch information
rsandell committed Dec 6, 2017
2 parents fde68b3 + 756a09e commit afab9e9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Expand Up @@ -1388,6 +1388,10 @@ public boolean isDynamicTriggerConfiguration() {
*/
@DataBoundSetter
public void setDynamicTriggerConfiguration(boolean dynamicTriggerConfiguration) {
if (!dynamicTriggerConfiguration) {
dynamicGerritProjects = Collections.emptyList();
}

this.dynamicTriggerConfiguration = dynamicTriggerConfiguration;
}

Expand Down
Expand Up @@ -29,6 +29,7 @@
import javax.annotation.Nonnull;

import jenkins.model.Jenkins;
import org.apache.commons.lang.StringUtils;

/**
* TimerTasks that are created from a GerritTrigger and periodically calls
Expand Down Expand Up @@ -59,6 +60,9 @@ public void run() {
if (trigger == null) {
return;
}
if (StringUtils.isEmpty(trigger.getTriggerConfigURL())) {
return;
}
trigger.updateTriggerConfigURL();
}

Expand Down

0 comments on commit afab9e9

Please sign in to comment.