Skip to content

Show linked pipelines mini graph in the pipeline editor

Mireya Andres requested to merge pipeline-editor-linked-pipelines into master

What does this MR do and why?

Fixes #343701 (closed). Reverts !72951 (merged) and includes changes from !72255 (merged).

This adds the upstream/downstream pipeline mini graphs in the pipeline editor. This feature is under the pipeline_editor_mini_graph feature flag, which is currently disabled.

This MR has the same changes as in !72255 (merged), but the specs are now split so that the CE and EE specs are separated and placed in their respective directories.

Screenshots or screen recordings

State Screenshot
Desktop View Screen_Shot_2021-10-19_at_15.36.32
Mobile View Screen_Shot_2021-10-19_at_16.04.33
With Error Screen_Shot_2021-10-18_at_23.58.47

Note: Fetching the linked pipelines occurs in a separate call from fetching the data for the main mini pipeline graph. So it's possible to load the mini pipeline graph without loading the linked pipelines.

How to set up and validate locally

  1. Enable the pipeline_editor_mini_graph feature flag. (rails c then Feature.enable(:pipeline_editor_mini_graph))

  2. Go to the pipeline editor (CI/CD > Editor)

  3. If your project doesn't have downstream pipelines, you can add the following to your .gitlab-ci.yml file.

    stages:
      - prepare
    
    prepare_job:
      stage: prepare
      script:
        - echo "running prepare_job"
    
    child_pipeline:
      stage: prepare
      trigger:
        include:
          - project: "path/to/project"
            file: ".gitlab-ci.yml"

    You can replace /path/to/project with some other existing project e.g. gitlab-org/gitlab-shell or create a separate project with the a simple .gitlab-ci.yml content:

    stages:
      - prepare
    prepare_job:
      stage: prepare
      script:
        - echo "running prepare_job"
  4. Verify that the mini pipeline graph shows up in the pipeline status.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports