Skip to content
Permalink
Browse files
Merge pull request #5 from williambernardet/master
Fix proposal for JENKINS-19379
  • Loading branch information
gboissinot committed Aug 27, 2013
2 parents 5c04d55 + b96046b commit e1f95717959fb4fbe5ae2f0c67a5379774675b11
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 e1f9571

Please sign in to comment.