1

I want to know how can I check if a file was previously collected as an artifact during a Jenkins groovy pipeline execution?

...
archiveArtifacts artifacts: 'foo.txt', allowEmptyArchive: true
...
// if 'foo.txt' in artifacts: do something
sorin
  • 161,544
  • 178
  • 535
  • 806
  • according to https://stackoverflow.com/questions/33044543/what-exactly-does-archive-artifacts-step-do-in-jenkins you should scan `%JENKINS_HOME%/jobs/MY_JOB/builds/...` for your file of interest – injecteer Feb 08 '18 at 14:15

0 Answers0