Skip to content

Commit

Permalink
Windows docker build ensure cleanWorkspace cleans build tmp workspace
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Leonard <[email protected]>
  • Loading branch information
andrew-m-leonard committed Dec 18, 2024
1 parent 1828de5 commit edc2bb1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pipelines/build/common/openjdk_build_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1644,22 +1644,22 @@ def postBuildWSclean(
context.println 'Cleaning workspace non-hidden files: ' + context.WORKSPACE + '/*'
context.sh(script: 'rm -rf ' + context.WORKSPACE + '/*')
} catch (e) {
context.println "ERROR: Failed to clean workspace non-hidden files ${e}"
context.println "Warning: Failed to clean workspace non-hidden files ${e}"
}

// Clean remaining hidden files using cleanWs
try {
context.println 'Cleaning workspace hidden files using cleanWs: ' + context.WORKSPACE
context.cleanWs notFailBuild: true, disableDeferredWipeout: true, deleteDirs: true
} catch (e) {
context.println "Failed to clean ${e}"
context.println "Warning: Failed to clean ${e}"
}
} else if (cleanWorkspaceBuildOutputAfter) {
try {
context.println 'Cleaning workspace build output files under ' + context.WORKSPACE
batOrSh('rm -rf ' + context.WORKSPACE + '/workspace/build/src/build ' + context.WORKSPACE + '/workspace/target ' + context.WORKSPACE + '/workspace/build/devkit ' + context.WORKSPACE + '/workspace/build/straceOutput')
} catch (e) {
context.println "ERROR: Failed to clean workspace build output files ${e}"
context.println "Warning: Failed to clean workspace build output files ${e}"
}
}
} else {
Expand Down Expand Up @@ -2206,7 +2206,7 @@ def buildScriptsAssemble(
try {
context.cleanWs notFailBuild: true
} catch (e) {
context.println "Failed to clean ${e}"
context.println "Warning: Failed to clean ${e}"
}
cleanWorkspace = false
}
Expand All @@ -2217,7 +2217,7 @@ def buildScriptsAssemble(
context.println "Windows build cleaning" + context.WORKSPACE
context.cleanWs notFailBuild: true
} catch (e) {
context.println "ERROR: Failed to clean ${e}"
context.println "Warning: Failed to clean ${e}"
}
}
}
Expand Down

0 comments on commit edc2bb1

Please sign in to comment.