Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #13 from olivergondza/JENKINS-13554
[FIXED JENKINS-13554] Delete configurations from MatrixBuild#delete
  • Loading branch information
olivergondza committed Jan 9, 2015
2 parents 5b4dedb + 815b8d0 commit cfdf9e3
Show file tree
Hide file tree
Showing 22 changed files with 118 additions and 384 deletions.
41 changes: 18 additions & 23 deletions src/main/java/hudson/matrix/MatrixBuild.java
Expand Up @@ -90,35 +90,30 @@ public Object readResolve() {
return this;
}

/**
* Delete build and its child builds.
*
* @since TODO
*/
@Override
public void delete() throws IOException {
super.delete();

for(MatrixRun run : getExactRuns()) {
run.delete();
}
}

/**
* Deletes the build and all matrix configurations in this build when the button is pressed.
*
* @deprecated since TODO, kept not to break REST clients.
*/
@RequirePOST
@Deprecated
public void doDoDeleteAll( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
checkPermission(DELETE);

// We should not simply delete the build if it has been explicitly
// marked to be preserved, or if the build should not be deleted
// due to dependencies!
String why = getWhyKeepLog();
if (why!=null) {
sendError(hudson.model.Messages.Run_UnableToDelete(getFullDisplayName(), why), req, rsp);
return;
}

List<MatrixRun> runs = getExactRuns();
for(MatrixRun run : runs){
why = run.getWhyKeepLog();
if (why!=null) {
sendError(hudson.model.Messages.Run_UnableToDelete(getFullDisplayName(), why), req, rsp);
return;
}
run.delete();
}
delete();
rsp.sendRedirect2(req.getContextPath()+'/' + getParent().getUrl());
doDoDelete(req, rsp);
}


/**
* Used by view to render a ball for {@link MatrixRun}.
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

34 changes: 0 additions & 34 deletions src/main/resources/hudson/matrix/MatrixBuild/delete.jelly

This file was deleted.

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions src/main/resources/hudson/matrix/MatrixBuild/delete_de.properties

This file was deleted.

24 changes: 0 additions & 24 deletions src/main/resources/hudson/matrix/MatrixBuild/delete_es.properties

This file was deleted.

25 changes: 0 additions & 25 deletions src/main/resources/hudson/matrix/MatrixBuild/delete_ja.properties

This file was deleted.

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions src/main/resources/hudson/matrix/MatrixBuild/delete_pt.properties

This file was deleted.

0 comments on commit cfdf9e3

Please sign in to comment.