jenkins the definitive guide

(Jeff_L) #1

you create a new axis for your slave nodes, as shown in Figure 10.21, “Defining an axis of slave nodes”.
You can choose the nodes you want to use in two ways: by label or by individual node. Using labels
lets you identify categories of build nodes (for example, Windows machines), without tying the build
to any one machine. This is a more flexible option, and makes it easier to expand your build capacity as
required. Sometimes, however, you may really want to run a build on a specific machine. In this case,
you can use the “Individual nodes” option, and choose the machine in this list.


Figure 10.21. Defining an axis of slave nodes


If you need more flexibility, you can also use a Label Expression, which lets you define which slave
nodes should be used for builds on a particular axis using boolean expressions and logical operators to
combine labels. For example, suppose you have defined labels for slave machines based on operating
system (“windows”, “linux”) and installed databases (“oracle”, “mysql”, “db2”). To define an axis
running tests only on Windows machines installed with MySQL, you could use an expression like
windows && mysql.


We discuss working with slave nodes and distributed builds in more detail in Chapter 11, Distributed
Builds.


10.4.3. Configuring a JDK Axis


If you are deploying your application to a broad client base where you have limited control over the
target environment, you may need to test your application using different versions of Java. In cases like
this it is useful to be able to set up a JDK axis in a multiconfiguration build. When you add a JDK
axis, Jenkins will automatically propose the list of JDK versions that it knows about (see Figure 10.22,
“Defining an axis of JDK versions”). If you need to use additional JDKs, just add them to your Jenkins
configuration page.


Figure 10.22. Defining an axis of JDK versions

Free download pdf