wait for certain build jobs to finish before proceeding. In this section, we will look at techniques and
plugins that can help you do this.
10.6.1. Parallel Builds in Jenkins
Jenkins has built-in support for parallel builds—when a build job starts, Jenkins will assign it to the
first available build node, so you can potentially have as many parallel builds running as you have build
nodes available.
If you need to run slight variations of the same build job in parallel, multiconfiguration build jobs (see
Section 10.4, “Multiconfiguration Build Jobs”) are an excellent option. This can come in handy as a way
of accelerating your build process. A typical application of multiconfiguration build jobs in this context
is to run integration tests in parallel. One strategy is to set up an integration test build job that can be run
in different ways to execute different subsets of the integration tests. You could define separate Maven
profiles, for example, or configure your build to use a command-line parameter to decide which tests
to run. Once you have set up your build script in this way, it is easy to configure a multiconfiguration
build job to run the subsets of your integration tests in parallel.
You can also get Jenkins to trigger several downstream builds in parallel, simply by listing them all in
the “Build other projects” field (see Figure 10.30, “Triggering several other builds after a build job”).
The subsequent build jobs will be executed in parallel as much as possible. However, as we will see
further on, this may not always be exactly what you need.
Figure 10.30. Triggering several other builds after a build job
10.6.2. Dependency Graphs
Before we investigate the finer points of parallel builds, it is useful to be able to visualize the relationships
between your build jobs. The Dependency Graph View plugin analyzes your build jobs and displays
a graph describing the upstream and downstream connections between your jobs. This plugin uses
graphviz^7 , which you will need to install on your server if you don’t already have it.
This plugin adds a Dependency Graph icon in the main menu, which displays a graph showing the
relationships between all the build jobs in your project (at the dashboard level), or all of the build jobs
related to the current build job (when you are inside a particular project [see Figure 10.31, “A build