jenkins the definitive guide

(Jeff_L) #1

Figure 10.24. Multiconfiguration build results


By default, Jenkins will run the build jobs in parallel. However there are some cases where this is not a
good idea. For example, many Java web applications use Selenium or WebDriver tests running against
a local instance of Jetty that is automatically started by the build job. Build scripts like this need to be
specially configured to be able to run in parallel on the same machine, to avoid port conflicts. Concurrent
database access during tests can be another source of problems if concurrency is not designed into the
tests. If your builds are not designed to run in parallel, you can force Jenkins to run the tests sequentially
by ticking the Run each configuration sequentially checkbox at the bottom of the Configuration Matrix
section.


By default, Jenkins will run all possible combinations of the different axes. So, in the above example, we
have three environments, two JDKs, and four databases. This results in a total of 24 builds. However, in
some cases, it may not make sense (or be possible) to run certain combinations. For example, suppose
you have a build job that runs automated web tests. If one axis contains the web browsers to be tested
(Firefox, Internet Explorer, Chrome, etc.) and another the Operating Systems (Linux, Windows, Mac
OS), it would make little sense to run Internet Explorer with Linux or Mac OS.


The Combination Filter option lets you set up rules about which combinations of variables are valid.
This field is a Groovy boolean expression that uses the names of the variables you defined for each axis.
The expression must evaluate to true for the build to execute. For example, suppose you have a build job
running web tests in different browsers on different operating systems (see Figure 10.25, “Setting up a

Free download pdf