How to pass file to downstream job which blocks upstream job?

Viewed 9573

What I want to accomplish is to checkout code from develop branch, merge it to master branch, build app.war, run tests and if tests succeed push to master branch.

Tests should be run in separate job which needs app.war.

My current setup is as follows:

  1. Job Main checks out from develop, merges it to masterand builds app.war
  2. Job Main triggers job Test in Post build step (Test needs app.war previously built)
  3. If Test succeeds, Main pushes to master branch in Post build action

I tried to use Copy Artifact Plugin but the problem is that with it, I can only archive artifact in Post build action while I am triggering Test in Post build step.

How to pass app.war to Test job? Is it possible to do with Copy Artifact Plugin?

1 Answers
Related