0

I am working on a jenkins pipeline, and there's a file that I want to stash and then unstash later in the build in order to use it.

The stash was working fine, until I made some changes in my pipeline, now I am getting 0 files stashed without any info.

stash allowEmpty: true, includes: '${myDir}/target/zippedjars.zip' , name: 'myJar'

This is how I am stashing, and note that it was working fine
and before I am running the stash comment I made sure that the zip exists !

TudorIftimie
  • 1,050
  • 11
  • 21
  • 1
    Please include a sequence of the code that is not working. Are you stashing on one agent and un-stashing on another ? see if this answers your question https://stackoverflow.com/questions/43050248/correct-usage-of-stash-unstash-into-a-different-directory – TudorIftimie May 19 '22 at 08:33
  • 1
    thank you, I figured it out, when I replaced myDir with its value, the stash worked fine. note that the problem was with stashing (i was getting 0 files stashed). Fix: ``` Stash allowEmpty: true, includes: 'path/to/myDir/target/zippedjars.zip' , name: 'myJar' ``` – ethicalhacker May 19 '22 at 09:21

0 Answers0