Reputation: 1105
3 screenshots to explain the issue
When I run the pipeline I've an error...
But the file exists
And it's good
Upvotes: 11
Views: 10002
Reputation: 6975
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:
This eventually helped looking into the right direction.
Upvotes: 0
Reputation: 23
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.
Upvotes: 0
Reputation: 765
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.
Upvotes: 0
Reputation: 530
.gitlab-ci.yml
file.gitlab-ci.yml
file location (Settings > CI/CD > General Pipelines), make sure that it points to the correct place in the repositoryUpvotes: 13