Jenkins: Situations where you shouldn't use the Multijob plugin

While experimenting with various job configurations, the Multijob plugin seemed like a good thing to try because it claimed to be able to do conditional phase job builds and provided a nice wrapper around a chain of downstream jobs.

I found two cases where this plugin caused problems preventing me from using it (as of version 1.20):

  1. Build only if SCM changes
    This is an option of a phase job, that is supposed to poll the job's SCM status to see if there were any changes, and only triggers a build of this phase if needed. However, if the multijob plugin polls this phase job while it is already executing, it fails with a NPE. This occurs in both version 1.20 and 1.18 of the plugin.

  2. Blocks scheduled safe restart
    As I wrote in Windows Slave Stability, it is possible to schedule a Jenkins master restart using a job and a Groovy script. However, if a multijob is running and it needs to trigger a phase job after safeRestart has been called, it blocks the restart indefinitely. This is because the multijob does not detect the "Jenkins is going to shut down" state, and queues a new job anyway, which never gets scheduled.

If either of these cases are likely to cause a problem, I recommend against using this plugin until these bugs are fixed. (There are already open issues on the Jenkins bug tracker.)

Jamie Femia

Read more posts by this author.