1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00

Revert "Don't swallow Exception happening inside dockerExecOnK8S.stashWorkspace (#1071)" (#1074)

This reverts commit e64895e022.
This commit is contained in:
Marcus Holl 2019-12-18 14:53:38 +01:00 committed by GitHub
parent e64895e022
commit 767575e75c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -247,24 +247,13 @@ void executeOnPod(Map config, utils, Closure body, Script script) {
}
echo "ContainerConfig: ${containerParams}"
container(containerParams) {
Exception e
try {
utils.unstashAll(stashContent)
echo "invalidate stash workspace-${config.uniqueId}"
stash name: "workspace-${config.uniqueId}", excludes: '**/*', allowEmpty: true
body()
} catch(Exception e1) {
e = e1
} finally {
try {
stashWorkspace(config, 'container', true, true)
} catch(Exception e2) {
if(e) {
e.addSuppressed(e2)
throw e
}
throw e2
}
stashWorkspace(config, 'container', true, true)
}
}
} else {
@ -327,8 +316,8 @@ chown -R ${runAsUser}:${fsGroup} ."""
return stashName
} catch (AbortException | IOException e) {
echo "${e.getMessage()}"
throw e
}
return null
}
private Map getSecurityContext(Map config) {