Skip to content

Disable expanding Multi-project pipelines in graph for free users

What does this MR do and why?

The ability to expand multi-project pipelines should be disabled for free tier users. It seems like this has been the case for quite a long time, but the documentation (and our expectations as a company) is that this feature is premium.

To fix this, we disable the button of the multi-project card for free users (any paid tier has access to it) and show a tooltip that explains why and what to do to get this feature. This MR also introduces a shared component for the tier badge (Free, Premium and Ultimate)

Screenshots or screen recordings

Free

Before After
Screen_Recording_2022-02-16_at_9.42.22_AM multi_project_free_after

Premium

Before After
Screen_Recording_2022-02-16_at_9.42.22_AM multi_project_after_premium

How to set up and validate locally

  1. Make sure that you have local runner setup.
  2. Create a multi-project pipeline => To do so, here is a the shortest way I know of:
  3. Create a new project and create a CI config file (.gitlab-ci.yml).
  4. Inside that file, add the following:
stages:
  - build
  - test
  - deploy

hi:
  stage: "test"
  script: "echo I am from the main project"


trigger_other_project:
  stage: deploy
  trigger:
    include:
      - project: "'root/my-other-project" # root is my namespace, then what's after the /, replace with your project name project
        file: ".gitlab-ci.yml"
  1. Create another new project
  2. Create a CI config file (.gitlab-ci.yml).
  3. Inside the file, add the following:
stages:
  - build
  - test
  - deploy

build_job:
  script: echo build
  stage: build

test_job:
  script: echo test
  stage: test

deploy_job:
  script: echo deploy
  stage: deploy

Now whenever you run the pipeline of PROJECT A, the main pipeline of project will also be triggered.

To verify as a free user:

  1. Login as a free user
  2. Go to CI/CD => Pipelines
  3. Click on Run pipeline
  4. Go in the pipeline page of this newly triggered pipeline
  5. Let the pipeline finish
  6. Hover on the downstream card arrow button on the right
  7. Notice the tooltip that explains that this feature is disabled

To verify that it still works for paying users

  1. Login as a paid user
  2. Go to CI/CD => Pipelines
  3. Click on Run pipeline
  4. Go in the pipeline page of this newly triggered pipeline
  5. Let the pipeline finish
  6. Hover on the downstream card arrow button on the right
  7. Click on the arrow
  8. Notice that the pipeline is expanded.

MR acceptance checklist

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

Related to #348303 (closed)

Edited by Frédéric Caplette

Merge request reports

Loading