Pipeline Editor

The Blue Ocean Pipeline Editor is the simplest way for anyone to get started with creating Pipelines in Jenkins. It’s also a great way for existing Jenkins users to start adopting Pipeline.

The editor allows users to create and edit Declarative Pipelines, add stages and parallelized tasks that can run at the same time, depending on their needs. When finished, the editor saves the Pipeline to a source code repository as a Jenkinsfile. If the Pipeline needs to be changed again, Blue Ocean makes it easy to jump back in into the visual editor to modify the Pipeline at any time.

Starting the editor

To use the editor a user must first have created a pipeline in Blue Ocean or have one or more existing Pipelines already created in Jenkins. If editing an existing pipeline, the credentials for that pipeline must allow pushing of changes to the target repository.

The editor can be launched via:

  • Dashboard "New Pipeline" button

  • Activity View for Single Run

  • Pipeline Run Details

Limitations

  • SCM-based Declarative Pipelines only

  • Credentials must have write permission

  • Does not have full parity with Declarative Pipeline

  • Pipeline re-ordered and comments removed

The Pipeline Editor includes the standard navigation bar at the top, with a local navigation bar below that. The local navigation bar includes:

  • Pipeline Name - This will include the branch depending or how

  • Cancel - Discard changes made to the pipeline.

  • Save - Open the Save Pipeline Dialog.

Pipeline settings

By default, the right side of editor shows the "Pipeline Settings". This sheet can be accessed by clicking anywhere in the Stage editor that is not a Stage or one of the "Add Stage" buttons.

Agent

The "Agent" section controls what agent the Pipeline will use. This is the same as the "agent" directive.

Environment

The "Environment" sections lets us set environment variables for the Pipeline. This is the same as the "environment" directive.

Stage editor

The left side editor screen contains the Stage editor, used for creating the stages of a Pipeline.

Stage editor simple

Stages can be added to the Pipeline by clicking the "+" button to the right of an existing stage. Parallel stages can be added by clicking the "\+" button below an existing Stage. Stages can be deleted using the context menu in the stage configuration sheet.

The Stage editor will display the name of each Stage once it has been set. Stages that contain incomplete or invalid information will display a warning symbol. Pipelines can have validation errors while they are being edited, but cannot be saved until the errors are fixed.

Stage editor with error

Stage configuration

Selecting a stage in the Stage editor will open the "Stage Configuration" sheet on the right side. Here we can change the name of the Stage, delete the Stage, and add steps to the Stage.

Stage Configuration

The name of the Stage can be set at the top of the Stage Configuration sheet. The context menu (three dots on the upper right), can be used to delete the current stage. Clicking "Add step" will display the list of available Steps types with a search bar at the top. Steps can be deleted using the context context menu in the step configuration sheet. Adding a step or selecting an existing step will open the step configuration sheet.

Step list filtered by 'file'

Step configuration

Selecting a step from the Stage configuration sheet will open the Step Configuration sheet.

Step configuration for JUnit step

This sheet will differ depending on the step type, containing whatever fields or controls are needed. The name of the Step cannot be changed. The context menu (three dots on the upper right), can be used to delete the current step. Fields that contain incomplete or invalid information will display a warning symbol. Pipelines can have validation errors while they are being edited, but cannot be saved until the errors are fixed.

Step configuration with error

Save Pipeline dialog

In order to be run, changes to a Pipeline must be saved in source control. The "Save Pipeline" dialog controls saving of changes to source control.

Save Pipeline Dialog

A helpful description of the changes can be added or left blank. The dialog also supports saving changes the same branch or entering a new branch to save to. Clicking on "Save & run" will save any changes to the Pipeline as a new commit, will start a new Pipeline Run based on those changes, and will navigate to the Activity View for this pipeline.



Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.