Pipeline graphical editor

Additional information about pipeline graphical editor.

This section describes the structure and components of the Graphical editor used for pipeline definition. Pipeline definition created through the Graphical editor is equiualent to the definition created through the Script editor.

Figure 1. Script editor initial view in add pipeline dialog

Managing stages and jobs

Stages can be added by clicking on the button. Once a stage is added it will be presented in the editor.
Figure 2. Stage added to the pipeline through Graphical editor
Every stage can be editted or deleted by choosing appropriate option from the menu that is opened by clicking on the icon in the Stage name header. Edit Stage opens dialog through which information about the Stage can be changed.
Figure 3. Stage added to the pipeline through Graphical editor
Jobs can be added to the stage by clicking on the button within the stage graphical component. Clicking on the button will present dialog where desired Job can be chosen from the list of all available Jobs. Once a Job is added it will be presented within the chosen Stage.
Figure 4. Job added to the pipeline stage through Graphical editor
Every job can be editted or deleted by choosing appropriate option from the menu that is opened by clicking on the icon in the Job name header. Edit Job opens dialog through which information about the Job can be changed.
Figure 5. Stage added to the pipeline through Graphical editor
Same as for the Script editor, validation of the definition created through the Graphical editor can be checked by clicking on the button.

Changing between the editors

Switching between the editors will result in preview of equiualent pipeline definition ether within Script or Graphical editor, depending on the choosing.
Note: Switching between two editors will give expected output if the definition was previously saved.

Same definition shown through both Script and Graphical editor

In this basic example of a pipeline definition, it is assumed that there are jobs named Job Build Firmware, Job Test Firmware and Job Deploy Firmware. Also, it is needed to add first_param and second_param.
build:
    label: Build firmware stage
    description: first stage
    allow-fail: false
    jobs:
        build-firmware:
            job: Job Build Firmware
            parameters:
                first_param: first_value
                second_param: second_value
        test-firmware:
            job: Job Test Firmware
            wait:
                - build-firmware
            if: first_param == value
            use-artifacts:
                - from: build-firmware
                  collect: "*.so"
                  destination: destination_1
deploy:
    label: Deploy stage
    description: second stage
    allow-fail: false
    jobs:
        deploy-firmware:
            job: Job Deploy Firmware
            use-artifacts:
                - from: build-firmware
                  collect: .so
                  destination: destination_2
Figure 6. Basic pipeline example shown in graphical editor
Graphical editor will show dependencies between the jobs if those exist. In the example, job with the label test-firmware has wait defined which specifies that build-firmware needs to be finished before test-firmware starts its execution. When hovering over a Job that has wait defined, editor will stand out Job that is being waited and connection (line) between them, while others would get greyed out.
Figure 7. Dependency between two jobs where one is waiting for the other one
In the example below, job with the label deploy-firmware has use-artifacts defined which specifies that deploy-firmware is using artifacts from the Job with label build-firmware. If a Job has use-artifacts defined, icon will be shown next to its name. When hovering over the icon, editor will stand out that current Job and the Job from which current one is using the artifacts, while others would get greyed out.
Figure 8. Dependency between two jobs where one is using artifacts from the other one
Note: All options shown in the images or mentioned throughout the section about the Graphical editor are equivalent to the options with the same name explained in the pipeline definition section.