9

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

DV82XL
  • 5,350
  • 5
  • 30
  • 59
Luca Rasconi
  • 1,085
  • 11
  • 30
  • What's inside the file? I observed this behavior with empty .gitlab-ci.yml – Renerick Jun 08 '21 at 13:04
  • @DenisPalashevskii the file is good. It's really weird – Luca Rasconi Jun 08 '21 at 13:20
  • Weird indeed. Another idea I have - is `qa` the default branch in the repo? There is an issue (although closed) https://gitlab.com/gitlab-org/gitlab-foss/-/issues/43266, probably it's somehow related. – Renerick Jun 08 '21 at 13:23
  • @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. – Luca Rasconi Jun 08 '21 at 13:34
  • 2
    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 work – Renerick Jun 08 '21 at 13:39
  • 2
    OMG... A colleague of mine changed it... Everything worked fine since my last deploy... Great @DenisPalashevskii I love you :) – Luca Rasconi Jun 08 '21 at 13:44

3 Answers3

12
  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
Renerick
  • 401
  • 6
  • 9
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.

Cr4zyTun4
  • 625
  • 7
  • 18
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.