Control Jenkins Steps With Conditional BuildStep Plugin

30 / Aug / 2016 by Aakash Agarwal 0 comments


If you look forward to Jenkins for most of your development operations then, at some point in time you might have felt the need of something which allows you to condition your steps. Of course, it is not such a good idea to create individual jobs each time you want to run and test specific build step/s. The solution is to use Conditional BuildStep plugin.

Plugin’s latest release is 1.3.5 (June 16, 2016). You may get it from here.

What does it do?

The plugin gives you additional control over your build steps by simply allowing you to add various conditional checks. There are several conditions that you may choose from, and these are all defined by Run Condition Plugin.

Conditional Steps

  • Conditional step (single): Ideal for scenarios when you might want to execute a step depending upon a condition, single conditional step maintains a simple if-then relationship between your condition and single step. Here is a snapshot for understanding:

Screenshot from 2016-08-30 13:15:32

  •  Conditional steps (multiple): You might want to use this build step in the case where more than one step needs to be executed depending upon a condition:

Screenshot from 2016-08-30 13:23:20

Similarly, you may add any number of build steps whose execution depends on a condition. Moreover, you may have any number of such ‘Conditional steps’ governed by different conditions each.

In a way, Conditional BuildStep plugin tends to be a powerful utility giving you extended control over your build steps and reduces the number of jobs doing nearly the same thing.


Leave a Reply

Your email address will not be published. Required fields are marked *