Skip to content
Permalink
Browse files

JENKINS-48155: gerrit-trigger-plugin does not repsect dynamicTriggerC…

…onfiguration flag

If user does not want to use dynamic configuration anymore, let's assign
the list of projects to empty list to avoid possible race conditions.
  • Loading branch information...
Jimilian committed Dec 4, 2017
1 parent 7a5f54b commit 756a09e85723c4c2cb8ba635aabebd347b91dae3
@@ -1388,6 +1388,10 @@ public boolean isDynamicTriggerConfiguration() {
*/
@DataBoundSetter
public void setDynamicTriggerConfiguration(boolean dynamicTriggerConfiguration) {
if (!dynamicTriggerConfiguration) {
dynamicGerritProjects = Collections.emptyList();
}

this.dynamicTriggerConfiguration = dynamicTriggerConfiguration;
}

@@ -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
@@ -59,6 +60,9 @@ public void run() {
if (trigger == null) {
return;
}
if (StringUtils.isEmpty(trigger.getTriggerConfigURL())) {
return;
}
trigger.updateTriggerConfigURL();
}

0 comments on commit 756a09e

Please sign in to comment.
You can’t perform that action at this time.