Skip to content

Commit

Permalink
Merge pull request #5 from williambernardet/master
Browse files Browse the repository at this point in the history
Fix proposal for JENKINS-19379
  • Loading branch information
gboissinot committed Aug 27, 2013
2 parents 5c04d55 + b96046b commit e1f9571
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 e1f9571

Please sign in to comment.