mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
Merge pull request #632 from marcusholl/pr/noCachedWorkspaceStashes
Avoid phantom stashes: do not write stashes back into (default) config
This commit is contained in:
commit
4af3a2a861
@ -162,8 +162,10 @@ void executeOnPod(Map config, utils, Closure body) {
|
||||
* In case third case, we need to create the 'container' stash to bring the modified content back to the host.
|
||||
*/
|
||||
try {
|
||||
if (config.containerName && config.stashContent.isEmpty()){
|
||||
config.stashContent.add(stashWorkspace(config, 'workspace'))
|
||||
|
||||
def stashContent = config.stashContent
|
||||
if (config.containerName && stashContent.isEmpty()){
|
||||
stashContent = [stashWorkspace(config, 'workspace')]
|
||||
}
|
||||
podTemplate(getOptions(config)) {
|
||||
node(config.uniqueId) {
|
||||
@ -175,7 +177,7 @@ void executeOnPod(Map config, utils, Closure body) {
|
||||
echo "ContainerConfig: ${containerParams}"
|
||||
container(containerParams){
|
||||
try {
|
||||
utils.unstashAll(config.stashContent)
|
||||
utils.unstashAll(stashContent)
|
||||
body()
|
||||
} finally {
|
||||
stashWorkspace(config, 'container', true)
|
||||
|
Loading…
Reference in New Issue
Block a user