Hello,

my goal is to copy compiler artifacts and fetched dependencies between 
builds of all branches to speed up the execution time. 

I wrote two steps in 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 artifacts


And 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 **/.*

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7762ecf5-29bd-4b2f-a51d-47b9916d1bae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to