Introducing the (Experimental) Visual Pipeline Editor

Written by: Michael Neale
3 min read

As continuous delivery "goes mainstream", whiteboards the world over are filling up with drawings of pipelines of software from source to production and beyond. We thought it made sense to support this type of metaphor visually in an editor.

Jenkins Workflow is one of the most powerful ways to implement CD pipelines and it's popularity continues to grow, but for some people it can appear a bit abstract.

We have been cooking up a visual pipeline editor to make things clearer for a range of users, to help with Workflow adoption. For those hard-of-core, this may be overkill, but for others, the ability to visualize a pipeline during editing, and before it is triggered, is a very useful feature.

What really is a workflow/pipeline in Jenkins today?

A workflow script is a pipeline of "stages", each stage having one or more "steps". Parallelism of steps and concurrency of stages is quite powerful as I have written before .

The Visual Pipeline Editor

The pipeline-editor-plugin for Jenkins is a visual way to define and edit these workflows (or at least a subset of what you can do with workflow). It looks like this:

The "flow" of the pipeline is left to right, through the stages. In the case above, there is a forking/joining of a parallel section - the steps on both side of the branch are executed in parallel. The "steps" are the little boxes inside the stage.

Lets take a look at it collapsed so you only see the stages (click to toggle open/closed):

Any non-trivial pipeline will have quite a few stages, and the stages have quite a lot of steps. Collapsing them away can help you see the wood for the trees.

One of the key aims for this is to make workflow pipelines easy and obvious to get started with. Obviously for folks happy and comfortable with Workflow script, this may cramp your style (so you can keep on rocking the scripts and Jenkinsfile's the way you are now).

Lets expand a stage, and click on a step. This will open the editor that is relevant for that workflow step:

Here it is a "user input" step, where it asks for user approval to proceed or not. A very common step would be simply running a shell script:

There are quite a few built in steps currently available:

The visual pipeline plugin actually produces Workflow script (ie, what is executed is ordinary workflow script), it is just presenting it in a particular way, but it has the full power of Workflow script to draw upon.

Parallelism is first class in the visual editor, as you could have guessed from above. You can also convert a "normal" stage (which has a bunch of steps) into a parallel stage with one click:

How to try it

Head on over to the project page - and follow the instructions. Note this is still experimental status and likely to change both in code and functionality, or perhaps set your hair on fire. Some aspects are not complete yet, or have bugs, so "caveat emptor"!

The pipeline editor stores it's state in the Jenkins config for a workflow job type (so it *is* a regular job type), you could reasonably use this to define a pipeline, but then move to script later on when you need to. Obviously visual editors are not for everyone, and of course Jenkins has first class support for what is being called "pipeline as code" for those that want to be far away from a GUI!

Michael Neale

Stay up to date

We'll never share your email address and you can opt out at any time, we promise.