Skip to content

Commit

Permalink
Fix proposal for JENKINS-19379
Browse files Browse the repository at this point in the history
  • Loading branch information
williambernardet committed Aug 27, 2013
1 parent 5c04d55 commit b96046b
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -26,6 +26,8 @@
import java.nio.charset.Charset;
import java.util.*;

import jenkins.model.Jenkins;


/**
* @author Gregory Boissinot
Expand Down Expand Up @@ -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.");
}
Expand Down

0 comments on commit b96046b

Please sign in to comment.