Making Jenkins (Hudson) job depend on another job

Jonik picture Jonik · Apr 20, 2010 · Viewed 38.3k times · Source

I have two jobs:

  1. Upload
  2. Launch-instance

I want to make Launch-instance dependent on the other one, so that triggering Launch-instance automatically causes Upload to be run first.

Can I achieve this using built-in Jenkins features or with a plugin?

Note that I do not want Upload to always trigger Launch-instance, which is what the "Build after other projects are built" option on Launch-instance would do. What I want is more analogous to how depends attribute works in Ant.

Answer

pushy picture pushy · Sep 21, 2011

Have you tried the Parametrized Trigger Plugin?

You can use it as a build step, and mark the checkbox for "Block until the triggered projects finish their builds". That should be exactly what you are looking for.