Build Pipelines with Jenkins/Hudson
Build Pipelines with Jenkins/Hudson
Join the DZone community and get the full member experience.Join For Free
Discover how quick and easy it is to secure secrets, so you can get back to doing what you love. Try Conjur, a free open source security service for developers.
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.
>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.
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".
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.
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.
Opinions expressed by DZone contributors are their own.