File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/main/java/hudson/plugins/git Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -819,7 +819,11 @@ public Object[] invoke(File localWorkspace, VirtualChannel channel)
819
819
820
820
821
821
buildData .saveBuild (new Build (revToBuild , buildNumber , Result .FAILURE ));
822
-
822
+ if (getClean ()) {
823
+ listener .getLogger ().println ("Cleaning workspace" );
824
+ git .clean ();
825
+ }
826
+
823
827
return new Object []{null , buildData };
824
828
}
825
829
@@ -852,6 +856,10 @@ public Object[] invoke(File localWorkspace, VirtualChannel channel)
852
856
buildData .saveBuild (build );
853
857
GitUtils gu = new GitUtils (listener ,git );
854
858
build .mergeRevision = gu .getRevisionForSHA1 (target );
859
+ if (getClean ()) {
860
+ listener .getLogger ().println ("Cleaning workspace" );
861
+ git .clean ();
862
+ }
855
863
856
864
// Fetch the diffs into the changelog file
857
865
return new Object []{changeLog .toString (), buildData };
You can’t perform that action at this time.
0 commit comments