0

I'm using a Jenkins job to trigger a few downstream jobs. I pass parameters through properties file. But there's a file that was uploaded when the upstream job was submitted that I want to pass to the downstream jobs. There is an option under Copy Artifact Plugin that allows copying from the workspace of the latest completed upstream job.

The problem is that my upstream job is blocked on the downstream jobs and cannot complete before them. This is the same reason that I cannot copy the file as an artifact, as archiving artifacts is only possible as a post-build action (AFAIK).

Is there any way around this problem?

farmir
  • 1,259
  • 1
  • 10
  • 14

1 Answers1

0

You could you stick the uploaded artifact in the upstream job into an online file repository like Artifactory or an external network/file share and access it in the downstream job?

That way, you just need to pass in the path of the file rather than the entire file and can download it in the child.

You could even use the build number of the upstream job as the unique identifier of the artifact, so you just need to pass the build number down to download it.

http://myonlinerepository/{build number}/upload.zip
Daniel Omoto
  • 2,431
  • 17
  • 15