"Missing CI config file" message on run pipeline, but .gitlab-ci.yml exists
Asked Answered
P

4

11

3 screenshots to explain the issue

When I run the pipeline I've an error... error message saying "Missing CI config file"

But the file exists

But the file exists

And it's good

enter image description here

Persecute answered 8/6, 2021 at 9:34 Comment(6)
What's inside the file? I observed this behavior with empty .gitlab-ci.ymlNomenclature
@DenisPalashevskii the file is good. It's really weirdPersecute
Weird indeed. Another idea I have - is qa the default branch in the repo? There is an issue (although closed) gitlab.com/gitlab-org/gitlab-foss/-/issues/43266, probably it's somehow related.Nomenclature
@DenisPalashevskii Really thank you for your suggestions but I tried with qa as default branch and master as well.. but nothing. Of course ci is in master.Persecute
Last idea, but, honestly, quite unlikely one: GitLab allows to set custom CI/CD configuration file location (Settings > CI/CD > General Pipelines). If it's not changed and pointing at the root of the repository - I would say that this is a bug and it should be reported to GitLab support, otherwise everything looks ok and should totally workNomenclature
OMG... A colleague of mine changed it... Everything worked fine since my last deploy... Great @DenisPalashevskii I love you :)Persecute
N
13
  1. GitLab shows this error message when trying to execute an empty .gitlab-ci.yml file
  2. Check your configured .gitlab-ci.yml file location (Settings > CI/CD > General Pipelines), make sure that it points to the correct place in the repository
Nomenclature answered 8/6, 2021 at 13:48 Comment(1)
In my case I had a leading whitespace in config filename. Thanks.Capitalism
D
0

It happened to me also when I was specifying the .gitlab-ci.yml in a .yAml format, I am not exactly sure why this happens. I have tried to understand the difference between the two reading this question but it seems there should be no differences. I lost 30 min because of this, hope I can save someone else time.

Demitria answered 26/10, 2022 at 11:28 Comment(0)
D
0

In my case, I incorrectly assumed that glab would run a pipeline for the current branch.

I was running glab cli run on branch-1 which did have a .gitlab-ci.yml. But it was trying to run a pipeline for master, which didn't have a .gitlab-ci.yml.

glab cli run -b branch-1 fixed it for me.

Damnify answered 2/8, 2023 at 9:52 Comment(0)
K
0

Just found this by googling the same issue. The answers listed here didn't help, so I thought it's worth adding what was wrong in my case.

The culprit was the leading whitespace accidentally copy-pasted into the file name. That is, I had .gitlab-ci.yml instead of .gitlab-ci.yml.

During investigation I realized that there was an indication that something is wrong with the file name after all. It was the icon next to the file name, which corresponds to a regular YAML file, not a GitLab CI pipeline configuration:

enter image description here

This eventually helped looking into the right direction.

Kaufmann answered 2/2 at 17:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.