Resolve "Make 'Run Pipeline' and 'Get started with Pipelines' buttons working consistently in 'CI/CD > Pipelines' page"
What does this MR do?
Change the two views of pipelines page (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
-
-
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
-
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Screenshots (if relevant)
Permission to run pipelines, no CI/CD configured
Permission to run pipelines, CI/CD configured
No permission to run pipelines
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
What are the relevant issue numbers?
Closes #37426 (closed)