Skip to content
Permalink
Browse files
Fix proposal for JENKINS-19379
  • Loading branch information
williambernardet committed Aug 27, 2013
1 parent 5c04d55 commit b96046ba326e854fa08b5afa213729fa71a10820
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/main/java/org/jenkinsci/plugins/scripttrigger/groovy/GroovyScriptTrigger.java
@@ -26,6 +26,8 @@
import java.nio.charset.Charset;
import java.util.*;

import jenkins.model.Jenkins;


/**
* @author Gregory Boissinot
@@ -135,7 +137,15 @@ protected Action[] getScheduledActions(Node pollingNode, final XTriggerLog log)

if (propertiesFilePath != null) {
try {
FilePath rootPath = pollingNode.getRootPath();
FilePath rootPath = null;
if (this.isGroovySystemScript()) {
log.info("System script.");
// In the case of a system script we run on the master all the time...
rootPath = Jenkins.getInstance().getRootPath();
} else {
log.info("Script executed on node.");
rootPath = pollingNode.getRootPath();
}
if (rootPath == null) {
throw new ScriptTriggerException("The node is offline.");
}

0 comments on commit b96046b

Please sign in to comment.