Skip to main content

Build Pipelines with Jenkins/Hudson

Posted by johnsmart on March 10, 2011 at 12:55 PM PST

This article is an extract from the upcoming book Jenkins: The Definitive Guide, to be published in the coming months with O'Reilly..

One of the more interesting plugins to emerge over the last few months is the Build Pipeline plugin, written by the folks at Centrum Systems. The Build Pipelines plugin takes the idea of build promotion further, and helps you design and monitor deployment pipelines. A deployment pipeline is a way of orchestrating your build through a series of quality gates, with automated or manual approval processes at each stage, culminating with deployment into production.

The Build Pipeline plugin provides an alternative way to define downstream build jobs. A build pipeline, unlike conventional downstream dependencies, is considered to be a linear process, a series of build jobs executed in sequence.

To use this plugin, start by configuring the downstream build jobs for each build job in the pipeline, using the 'Build other projects' field just as you would normally do. The Build Pipelines plugin uses the standard upstream and downstream build configurations, and for automatic steps this is all you need to do. However the Build Pipeline plugin also supports manual build steps, where a user has to manually approve the next step. For manual steps, you also need to configure In the Post-build Actions of your upstream build job: just tick the 'Build Pipeline Plugin -> Specify Downstream Project', select the next step in your project, and tick the 'Require manual build executor' option, as shown here.

Configuring a manual step in the build pipeline

>Once you have set up your build process to your satisfaction, you can configure the build pipeline view. You can create this view just like any other view.

Creating a Build Pipeline view

There is a trick when it comes to configuring the view, however. At the time of writing, there is no menu option or button that lets you configure the view directly. In fact, you need to enter the URL manually. Fortunately, this is not difficult: just add "/configure" to the end of the URL shown when you are displaying this view. For example, if you have named your view "phoenix-build-pipeline", as shown here, the URL to configure this view would be "http://my_hudson_server/view/phoenix-build-pipeline".

Configuring a Build Pipeline view

The most important thing to configure in this screen is the initial job. This marks the starting point of your build pipeline. You can define multiple build pipeline views, each with a different starting job. You can also configure the maximum number of build sequences to appear on the screen at once.

Once you have configured the starting point, you can return to the view to see the current state of your build pipeline. Jenkins displays the successive related build jobs horizontally, using a color to indicate the outcome of each build. There is a column for each build job in the pipeline. Whenever the initial build job kicks off, a new row appears on this page. As the build progresses through the successive build jobs in the pipeline, Jenkins will add a colored box in the successive columns, indicating the outcome of each stage. You can click on the box to drill down into a particular build result for more details. Finally, if a manual execution is required, a button will be displayed where the user can trigger the job.

Configuring a Build Pipeline view

This plugin is still relatively new, and does not integrate with all of the other plugins we have seen here. In particular, it is really designed for a linear build pipeline, and does not cope well with branches or parallel build jobs. Nevertheless, it does give an excellent global vision of a build pipeline.

Related Topics >>

Comments

<p>Hi,</p> <p>You write &quot;You can define multiple build ...

Hi,
You write "You can define multiple build pipeline views, each with a different starting job."
My question is: How?
I only see one single drop down box where you can choose the initial project...
The help says you can specify multiple projects by seperating them with a comma. That should work... if I had a text box. ;)

Build Pipelines with

Hi John, great post. It is in my list of things to have a look on the weekend :), but I think I've seen something similar in Go, a tool by ThoughtWorks.
http://www.thoughtworks-studios.com/go-agile-release-management/features...
What do you think?
Cheers, Bruno.

Build Pipelines with

Excelent post as usual John. Thanks
We will be looking to fix those limitations you mentioned (such as support for the Join plugin) in the next release. Keep an eye on our blog for updates; http://www.centrumsystems.com.au/blog/