Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-30798] SCMBinder was calling the wrong overload of SCM…
…Source.fetch.

There is no need to consider SCMSourceCriteria here, nor to inspect unrelated branches.
It was also not dealing gracefully with problems such as deleted branches.
Originally-Committed-As: 1d791a950b927a5bc3ffb18ccda9aca7ebc5d0b4
  • Loading branch information
jglick committed Nov 2, 2015
1 parent 98d4cfa commit 85f555b
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -24,6 +24,7 @@

package org.jenkinsci.plugins.workflow.cps;

import hudson.AbortException;
import hudson.Extension;
import hudson.FilePath;
import hudson.model.Action;
Expand All @@ -40,7 +41,6 @@
import java.io.IOException;
import java.util.Collection;
import java.util.List;
import java.util.Properties;
import javax.inject.Inject;
import jenkins.model.Jenkins;
import org.jenkinsci.plugins.workflow.cps.persistence.PersistIn;
Expand Down Expand Up @@ -111,6 +111,9 @@ public String getScriptPath() {
if (!scriptFile.absolutize().getRemote().replace('\\', '/').startsWith(dir.absolutize().getRemote().replace('\\', '/') + '/')) { // TODO JENKINS-26838
throw new IOException(scriptFile + " is not inside " + dir);
}
if (!scriptFile.exists()) {
throw new AbortException(scriptFile + " not found");
}
script = scriptFile.readToString();
} finally {
lease.release();
Expand Down

0 comments on commit 85f555b

Please sign in to comment.