Jenkinsfile to save and restore artifacts:
def buildCache = 'packages-deps.tgz'
//...
stage('Restore cache') {
unarchive mapping: [(buildCache): buildCache]
sh "[ -a ${buildCache} ] && tar xf ${buildCache}"
}
stage('Cache development libraries') {
sh 'tar czf packages-deps.tgz _build node_modules deps'
archiveArtifacts buildCache
}It's 100% that artifacts was built and stored: I can see relevant messages in the build log
+ tar czf packages-deps.tgz _build node_modules deps
[Pipeline] step
Archiving artifactsAnd file itself in the branch build index page http://d.pr/i/AHBE.jpg
But the "Restore cache" step is failing with the following error: hudson.AbortException: no artifacts to unarchive in packages-deps.tgz
I even tried wildcard unarchive mapping: ['**/.*': '.'] but that yielded the same result: hudson.AbortException: no artifacts to unarchive in **/.*