Make 'Run Pipeline' and 'Get started with Pipelines' buttons working consistently in 'CI/CD > Pipelines' page
Description
The Run Pipeline button is shown in the CI/CD > Pipelines page and it is used to run a manual pipeline on a specific branch. This is shown only if you already have at least one entry in the pipeline list, but this behavior is not correct as we may want to start the first pipeline from there.
The Get started with Pipelines is also behaving not correctly, as it is available even if you don't have permissions, that is useless, in both the pipeline list or the empty state views.
We need to correct the behavior of the two buttons in a consistent way.
The are currently both logical and design errors in the current implementation:
- The Run Pipeline button is shown if you have
canCreatePipeline
, but it doesn't considerhasCiEnabled
- The Get started with Pipelines button is shown if you have
hasCiEnabled
, but it doesn't considercanCreatePipeline
- The empty state doesn't consider a way to show the Run Pipeline button in any case
- Since they are based on different checks, they can be shown together
Proposal
Change the two views (list and empty) to fix both Run Pipeline and Get started with Pipelines buttons, using the following model:
Consider that:
-
hasCiEnabled
is true if you have agitlab-ci.yml
file (or custom one), or if you have Auto DevOps enabled -
canRunPipeline
is true if you have permissions to run pipelines (e.g.: you are Developer)
These are all the possible combinations:
- List view
- Show Run Pipeline if
hasCiEnabled
andcanRunPipeline
- Show Get started with Pipelines if not
hasCiEnabled
andcanRunPipeline
- Show Run Pipeline if
- Empty view
- Show Build with confidence paragraph if
canRunPipeline
- Show Run Pipeline if
hasCiEnabled
andcanRunPipeline
- Show Get started with Pipelines if not
hasCiEnabled
andcanRunPipeline
- Show There are no pipelines to show if not
canRunPipeline
- Show Build with confidence paragraph if
Design
The design for the list view is the same that we have now, only the logic is changed.
The design for the empty view is exactly the same we have for merge requests, obviously with correct graphics and wording.
Permission to run pipelines, no CI/CD configured
Permission to run pipelines, CI/CD configured
No permission to run pipelines
Links / references
Auto DevOps (Beta): #37115 (closed)
Use cases
After importing a project from an external repo, I want to run a pipeline without changing anything in the original code.
Feature checklist
Make sure these are completed before closing the issue, with a link to the relevant commit.
-
Feature assurance -
Documentation -
Added to features.yml