Skip to content
Permalink
Browse files
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 cfdf9e33bdfda54f29f2871ac9dd49c60310c298
Showing with 118 additions and 384 deletions.
  1. +18 −23 src/main/java/hudson/matrix/MatrixBuild.java
  2. +0 −43 src/main/resources/hudson/matrix/MatrixBuild/confirmDeleteAll.jelly
  3. +0 −25 src/main/resources/hudson/matrix/MatrixBuild/confirmDeleteAll_de.properties
  4. +0 −26 src/main/resources/hudson/matrix/MatrixBuild/confirmDeleteAll_es.properties
  5. +0 −27 src/main/resources/hudson/matrix/MatrixBuild/confirmDeleteAll_ja.properties
  6. +0 −27 src/main/resources/hudson/matrix/MatrixBuild/confirmDeleteAll_pt.properties
  7. +0 −4 src/main/resources/hudson/matrix/MatrixBuild/confirmDeleteAll_ru.properties
  8. +0 −25 src/main/resources/hudson/matrix/MatrixBuild/confirmDeleteAll_zh_TW.properties
  9. +0 −34 src/main/resources/hudson/matrix/MatrixBuild/delete.jelly
  10. +0 −3 src/main/resources/hudson/matrix/MatrixBuild/delete_ca.properties
  11. +0 −4 src/main/resources/hudson/matrix/MatrixBuild/delete_cs.properties
  12. +0 −24 src/main/resources/hudson/matrix/MatrixBuild/delete_de.properties
  13. +0 −24 src/main/resources/hudson/matrix/MatrixBuild/delete_es.properties
  14. +0 −25 src/main/resources/hudson/matrix/MatrixBuild/delete_ja.properties
  15. +0 −4 src/main/resources/hudson/matrix/MatrixBuild/delete_ko.properties
  16. +0 −4 src/main/resources/hudson/matrix/MatrixBuild/delete_pl.properties
  17. +0 −25 src/main/resources/hudson/matrix/MatrixBuild/delete_pt.properties
  18. +0 −5 src/main/resources/hudson/matrix/MatrixBuild/delete_pt_BR.properties
  19. +0 −4 src/main/resources/hudson/matrix/MatrixBuild/delete_ru.properties
  20. +0 −4 src/main/resources/hudson/matrix/MatrixBuild/delete_zh_CN.properties
  21. +0 −24 src/main/resources/hudson/matrix/MatrixBuild/delete_zh_TW.properties
  22. +100 −0 src/test/groovy/hudson/matrix/MatrixProjectTest.groovy
@@ -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}.

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.

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.

This file was deleted.

This file was deleted.

0 comments on commit cfdf9e3

Please sign in to comment.