Skip to content

Remote CI/CD config URL project setting does not show pipeline view

Summary

A remote CI/CD configuration file using the raw URL does not show the pipelines view, but instead instructs to setup GitLab runners. The expected behaviour is to see the pipelines overview and manually run the remotely configured pipeline.

Docs: https://docs.gitlab.com/ee/ci/pipelines/settings.html#custom-cicd-configuration-file-examples

Workaround is to enable Auto DevOps, which gets disabled by the remote CI/CD configuration file then again.

This was originally reported in https://forum.gitlab.com/t/external-gitlab-ci-yml-setting-ignored/58676 mentioning GitLab 14.2 and showing the instructions to create a CI config file instead. My error message is to add GitLab runners, which is a different error case.

Steps to reproduce

  1. Create a project which provides a minimal CI config file with 1 job, e.g. https://gitlab.com/everyonecancontribute/dev/_gitlab/-/blob/main/ci/main.yml
  2. Create a 2nd project which is empty, e.g. https://gitlab.com/dnsmichi/remote-ci-file
  3. Navigate into Settings > CI/CD > General Pipelines > CI/CD Configuration file
  4. Insert https://gitlab.com/everyonecancontribute/dev/_gitlab/-/blob/main/ci/main.yml as value (the path is intentionally wrong to see if it gets read and triggers an error in the UI)
  5. Navigate to CI/CD > Pipelines

Workaround path with Auto DevOps

  1. Enable Auto DevOps, save and don't configure anything
  2. Navigate to CI/CD > Pipelines
  3. Run pipeline

Example Project

What is the current bug behavior?

Adding a ci_custom_path config setting does not show the pipelines view. Instead, you get instructed to setup a GitLab runner.

Workaround: If you enable Auto DevOps, but do not configure it, the pipeline overview is shown and you can manually trigger a pipeline. I've used a wrong path for the path and it told me so. Correcting the path ran the actual configured pipeline.

Need to know: When Auto DevOps detects a default CI configuration path, it disables itself.

Observation: When the pipeline ran the first time, and you disable Auto DevOps, the pipeline view is visible. There is screen flickering, so definitely some Javascript involved here.

What is the expected correct behavior?

A remote CI config URL for CI/CD pipelines works in the pipeline overview. No workaround with Auto DevOps enabled should be needed.

Relevant logs and/or screenshots

Config settings.

image

Navigating to the pipeline overview, I can see the list for <1second, which then gets replaced with the Install Runners view. This is weird, possible JS interfering here.

image

Chrome Dev tools say that there is a TypeError with JS.

image

Enabling Auto DevOps

image

Pipelines with Auto DevOps

image

Run pipeline manually

image

Wrong CI config file path, but it gets parsed.

image

Correct CI config file path https://gitlab.com/everyonecancontribute/dev/_gitlab/-/raw/main/ci/main.yml

image

Pipeline ran successfully, disabled Auto DevOps again. View works again.

image

Output of checks

This bug happens on GitLab.com

Possible fixes

Since it works with Auto DevOps enabled, there must be an if-condition on the pipelines overview code, leading into this flow branch.

When Auto DevOps is enabled, it detects a CI config file, including the remote inclusion of the ci_config_path variable. The else or else if branch of that condition needs to also check for the remote inclusion, and not show the install GitLab runner error page.

My suspicion is that this happens in the JS portions of the code, presenting a different overlay. I started looking in app/assets/javascripts/pipelines/components/pipelines_list/pipelines.vue but my knowledge is too limited.

/cc @jreporter @dhershkovitch @fabiopitino