Displays different empty state when project has an external .gitlab-ci.yml
file
Issue: Frontend: When .gitlab-ci.yml is externally man... (#423019 - closed) • Sahil Sharma • 18.5
What does this MR do and why?
This merge request fixes a UX issue where users with externally managed CI/CD configuration files were being prompted to try CI/CD templates on the Pipelines page, only to be told they cannot make changes because their configuration is managed externally.
Problem
When a project's .gitlab-ci.yml
file is configured to be sourced from an external location (another project or external file), users visiting the Pipelines page with no pipeline runs would see the standard "Try test template" onboarding flow. However, clicking these templates would lead to an error message in the Pipeline Editor stating that the configuration is externally managed and cannot be modified.
This created a confusing user experience where users were:
- Prompted to try CI/CD templates on the Pipelines page
- Redirected to the Pipeline Editor
- Shown an error that they cannot make changes due to external configuration
Solution
This MR introduces a new ExternalConfigEmptyState
component that displays the same informative message already shown in the Pipeline Editor when CI/CD configuration is externally managed. The component detects when a project uses external CI/CD configuration by checking the configuration source type and shows users a clear message explaining that their pipeline configuration is located elsewhere.
The external configuration empty state is now consistently displayed:
- Pipeline Editor: Always shows this state for externally configured projects (existing behavior)
- Pipelines Index Page: Shows this state only when there have been no pipeline runs (new behavior)
Additionally I've also made a minor styling adjustment to the button in Auto Devops banner.
References
Screenshots or screen recordings
Component | Before | After |
---|---|---|
Auto Devops banner |
![]() |
![]() |
Pipelines Index Page | ![]() |
![]() |
How to set up and validate locally
Setup: Configure external CI/CD configuration
- Create or use an existing GitLab project
- Navigate to Settings → CI/CD → expand General pipelines
- In the
CI/CD configuration file
field, enter the location of another project's.gitlab-ci.yml
file - Save the configuration
Validation: Test the Pipelines page empty state
- Ensure the project has no existing pipeline runs
- Navigate to Build → Pipelines
- Expected behavior: You should see the external configuration empty state message (similar to what's shown in the Pipeline Editor) instead of the "Try test template" onboarding flow
- Previous behavior: Users would see the standard CI/CD onboarding templates that would fail when clicked
Validation: Test the Pipeline Editor (existing behavior)
- Navigate to Build → Pipeline Editor
- Expected behavior: You should see the external configuration message explaining that the pipeline configuration is managed externally
- This behavior should remain unchanged from before this MR
Additional validation
- Verify that the "New Pipeline" button behavior is appropriate for externally configured projects
- Test that projects with local
.gitlab-ci.yml
files continue to show the standard onboarding flow when they have no pipeline runs
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.