Skip to content

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:

  1. Prompted to try CI/CD templates on the Pipelines page
  2. Redirected to the Pipeline Editor
  3. 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 image image
Pipelines Index Page image image

How to set up and validate locally

Setup: Configure external CI/CD configuration

  1. Create or use an existing GitLab project
  2. Navigate to SettingsCI/CD → expand General pipelines
  3. In the CI/CD configuration file field, enter the location of another project's .gitlab-ci.yml file
  4. Save the configuration

Validation: Test the Pipelines page empty state

  1. Ensure the project has no existing pipeline runs
  2. Navigate to BuildPipelines
  3. 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
  4. Previous behavior: Users would see the standard CI/CD onboarding templates that would fail when clicked

Validation: Test the Pipeline Editor (existing behavior)

  1. Navigate to BuildPipeline Editor
  2. Expected behavior: You should see the external configuration message explaining that the pipeline configuration is managed externally
  3. 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.

Edited by Sahil Sharma

Merge request reports

Loading