Skip to content

Commit

Permalink
[JENKINS-8848] allow custom workspaces for maven jobs
Browse files Browse the repository at this point in the history
Originally-Committed-As: e65f893b1bc0608ef57095c71eb0517c5353bda1
  • Loading branch information
kutzi authored and kohsuke committed Apr 19, 2011
1 parent cca3b2c commit 3a193ec
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
11 changes: 0 additions & 11 deletions core/src/main/java/hudson/matrix/MatrixBuild.java
Expand Up @@ -323,17 +323,6 @@ public void post2(BuildListener listener) throws Exception {
for (MatrixAggregator a : aggregators)
a.endBuild();
}

@Override
protected Lease decideWorkspace(Node n, WorkspaceList wsl) throws IOException, InterruptedException {
String customWorkspace = getProject().getCustomWorkspace();
if (customWorkspace != null) {
// we allow custom workspaces to be concurrently used between jobs.
return Lease.createDummyLease(n.getRootPath().child(getEnvironment(listener).expand(customWorkspace)));
}
return super.decideWorkspace(n,wsl);
}

}

/**
Expand Down
33 changes: 0 additions & 33 deletions core/src/main/java/hudson/matrix/MatrixProject.java
Expand Up @@ -143,11 +143,6 @@ public class MatrixProject extends AbstractProject<MatrixProject,MatrixBuild> im
*/
private Result touchStoneResultCondition;

/**
* See {@link #setCustomWorkspace(String)}.
*/
private String customWorkspace;

public MatrixProject(String name) {
this(Hudson.getInstance(), name);
}
Expand Down Expand Up @@ -229,28 +224,6 @@ public void setTouchStoneResultCondition(Result touchStoneResultCondition) {
this.touchStoneResultCondition = touchStoneResultCondition;
}

public String getCustomWorkspace() {
return customWorkspace;
}

/**
* User-specified workspace directory, or null if it's up to Hudson.
*
* <p>
* Normally a matrix project uses the workspace location assigned by its parent container,
* but sometimes people have builds that have hard-coded paths.
*
* <p>
* This is not {@link File} because it may have to hold a path representation on another OS.
*
* <p>
* If this path is relative, it's resolved against {@link Node#getRootPath()} on the node where this workspace
* is prepared.
*/
public void setCustomWorkspace(String customWorkspace) throws IOException {
this.customWorkspace= customWorkspace;
}

@Override
protected List<Action> createTransientActions() {
List<Action> r = super.createTransientActions();
Expand Down Expand Up @@ -594,12 +567,6 @@ protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOExceptio
this.touchStoneCombinationFilter = null;
}

if(req.hasParameter("customWorkspace")) {
customWorkspace = req.getParameter("customWorkspace.directory");
} else {
customWorkspace = null;
}

// parse system axes
DescribableList<Axis,AxisDescriptor> newAxes = new DescribableList<Axis,AxisDescriptor>(this);
newAxes.rebuildHetero(req, json, Axis.all(),"axis");
Expand Down

0 comments on commit 3a193ec

Please sign in to comment.