Chapter 10. Advanced Builds

Introduction

In this chapter, we will look at some more advanced build job setups. We will discuss parameterized builds, which allow Jenkins to prompt the user for additional parameters that will be passed into the build job, and multiconfiguration build jobs, which let you run a single build job through a large number of variations. We will look at how to run build jobs in parallel, and wait for the outcome of one or more build jobs before continuing. And we will see how to implement build promotion strategies and build pipelines so that Jenkins can be used not only as a build server, but also as a deployment server.

Parameterized Build Jobs

Parameterized builds are a powerful concept that enable you to add another dimension to your build jobs.

The Parameterized Build plugin lets you configure parameters for your build job, that can be either entered by the user when the build job is triggered, or (as we will see later) from another build job.

For example, you might have a deployment build job, where you want to choose the target environment in a drop-down list when you start the build job. Or you may want to specify the version of the application you want to deploy. Or, when running a build job involving web tests, you might want to specify the browser to run your Selenium or WebDriver tests in. You can even upload a file to be used by the build job.

Note that it is the job of the build script to analyze and process the parameter values correctly—Jenkins ...

Get Jenkins: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.