-
Bug
-
Resolution: Fixed
-
Major
-
None
If you stash nothing with the setting "allowEmpty:true", the stash file will not be created, with the default artifact manager the stash file is created
node {
sh "touch some-file"
stash name:'my-stash', allowEmpty:true, includes: 'some-file'
stash name:'my-empty-stash', allowEmpty:true, includes: 'some-missing-file'
unstash 'my-stash'
unstash 'my-empty-stash'
}
[Pipeline] {
[Pipeline] sh
[stash-unstash] Running shell script
+ touch some-file
[Pipeline] stash
Stashed 1 file(s) to https://my-bucket.s3.amazonaws.com/jenkins/stash-unstash/2/stashes/my-stash.tgz
[Pipeline] stash
Stashed 0 file(s) to https://my-bucket.s3.amazonaws.com/jenkins/stash-unstash/2/stashes/my-empty-stash.tgz
[Pipeline] unstash
Unstashed file(s) from https://my-bucket.s3.amazonaws.com/jenkins/stash-unstash/2/stashes/my-stash.tgz
[Pipeline] unstash
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
[BFA] Scanning build for known causes...
[BFA] No failure causes found
[BFA] Done. 0s
ERROR: No such saved stash ‘my-empty-stash’ found at my-bucket/jenkins/stash-unstash/2/stashes/my-empty-stash.tgz
Finished: FAILURE