How do I wait for a job on a different master to complete if it is running?
I have performance tests run on a schedule every day and I want my deployment job to the performance environment to wait until the test job is complete (if it is running) before deploying the application. The deployment and test jobs are on separate masters. In the past, deployment and testing were on the same opensource master and were chained, but the deployment schedule has increased considerably.
-
Could you have the upstream trigger the remote downstream once it is finished?
https://support.cloudbees.com/hc/en-us/articles/226408088-Trigger-jobs-across-masters
0 -
Yes, but the triggering job will not wait for the triggered job to complete.
0 -
The default might be 'fire and forget' but you can configure this behavior.
I think an example of what you are looking for is "Track progress and wait until finished" for the "Mode"
https://cloudbees.zendesk.com/hc/article_attachments/211184147/build_config_tam.png-d24476baYou can trigger this as a build step which occurs after all other build activities are complete.
Alternatively, what about a post-build action (say, only if upstream/calling job is successful)? Here's an example where someone was able to do this conditionally:
https://stackoverflow.com/questions/26614985/conditional-post-build-step-in-jenkins-ideally-without-plugins0
Please sign in to leave a comment.
Comments
3 comments