Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' into coalesced-build-JENKINS-28063
Browse files Browse the repository at this point in the history
Conflicts:
	CHANGES.md
  • Loading branch information
jglick committed May 4, 2015
2 parents 90f9e44 + 408efbc commit f9a94d6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -5,6 +5,7 @@ Only noting significant user-visible or major API changes, not internal code cle
## 1.6 (upcoming)

* [JENKINS-28063](https://issues.jenkins-ci.org/browse/JENKINS-28063): `build` step did not properly handle the case that two upstream builds could trigger the same downstream build.
* [JENKINS-28179](https://issues.jenkins-ci.org/browse/JENKINS-28179): honor `-Dhudson.slaves.WorkspaceList=<character>`
* [JENKINS-27571](https://issues.jenkins-ci.org/browse/JENKINS-27571): Fixed link in build sidepanel.
* API addition: `LauncherDecorator` can now be used in block-scoped steps, and there is more flexibility in handling exits from durable tasks.

Expand Down
Expand Up @@ -23,7 +23,7 @@ public class GroovyShellDecoratorImpl extends GroovyShellDecorator {
@Override
public void configureShell(CpsFlowExecution context, GroovyShell shell) {
try {
shell.getClassLoader().addURL(new File(repo.workspace,"src").toURL());
shell.getClassLoader().addURL(new File(repo.workspace,"src").toURI().toURL());
} catch (MalformedURLException e) {
throw new AssertionError(e);
}
Expand Down
Expand Up @@ -40,6 +40,7 @@
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 @@ -91,7 +92,7 @@ public String getScriptPath() {
if (baseWorkspace == null) {
throw new IOException(node.getDisplayName() + " may be offline");
}
dir = baseWorkspace.withSuffix("@script");
dir = getFilePathWithSuffix(baseWorkspace);
} else { // should not happen, but just in case:
dir = new FilePath(owner.getRootDir());
}
Expand Down Expand Up @@ -119,6 +120,14 @@ public String getScriptPath() {
return exec;
}

private FilePath getFilePathWithSuffix(FilePath baseWorkspace) {
return baseWorkspace.withSuffix(getFilePathSuffix() + "script");
}

private String getFilePathSuffix() {
return System.getProperty(WorkspaceList.class.getName(), "@");
}

@Extension public static class DescriptorImpl extends FlowDefinitionDescriptor {

@Inject public Snippetizer snippetizer;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -154,7 +154,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.0</version> <!-- need MFINDBUGS-118 in 2.5 -->
<version>3.0.1</version> <!-- need MFINDBUGS-118 in 2.5 -->
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit f9a94d6

Please sign in to comment.