mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
fix(dockerExecuteOnKubernetes) print the error cause if unstash failed and always invalidate (#3142)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com> Co-authored-by: Pavel Busko <pavel.busko@sap.com>
This commit is contained in:
parent
abd0406fcc
commit
28e0905964
@ -415,13 +415,14 @@ private Map getSecurityContext(Map config) {
|
||||
private void unstashWorkspace(config, prefix) {
|
||||
try {
|
||||
unstash "${prefix}-${config.uniqueId}"
|
||||
echo "invalidate stash ${prefix}-${config.uniqueId}"
|
||||
stash name: "${prefix}-${config.uniqueId}", excludes: '**/*', allowEmpty: true
|
||||
} catch (AbortException | IOException e) {
|
||||
echo "${e.getMessage()}"
|
||||
echo "${e.getMessage()}\n${e.getCause()}"
|
||||
} catch (Throwable e) {
|
||||
echo "Unstash workspace failed with throwable ${e.getMessage()}"
|
||||
throw e
|
||||
} finally {
|
||||
echo "invalidate stash ${prefix}-${config.uniqueId}"
|
||||
stash name: "${prefix}-${config.uniqueId}", excludes: '**/*', allowEmpty: true
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user