gitlab-ci files are not recognized, if they live under `.gitlab/ci`

Open
#3,994 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
gitlab
Domain
ci-cd

Research direction

Start at src/api/json/catalog.json around line 2396 and inspect the GitLab CI fileMatch entry. Update the matching patterns to cover valid YAML files under .gitlab/ci, then verify that an example such as .gitlab/ci/docker.yml selects the GitLab CI schema.

Written by the indexing model from the issue text.

Description

fileMatch Conflict
Area with issue?

JSON Schema

✔️ Expected Behavior

To break the gitlab ci configuration into smaller files it is possible to put them into the folder .gitlab/ci. Then you can include these files in the .gitlab-ci.yml file, which is lying in the root dir of the project.
This makes it easy to work with complex pipelines.
In catalog.json you could expand the fileMatch argument with the following parameters:
"**.gitlab/ci/*.yml", "**.gitlab/ci/*.yaml"
This would be great, so you could organize the files as the stages or jobs they represent.

❌ Actual Behavior

If i place a gitlab-ci file, which has something to do with docker images under .gitlab/ci and name it docker.yml it will result in the following file path: .gitlab/ci/docker.yml.
Although it is a valid gitlab-ci file, the fileMatch regex is not satisfied and therefore the correct schema could not be selected.

YAML or JSON file that does not work.

Any otherwise correct .gitlab-ci.yml file under the dir $PROJECT_ROOT/.gitlab/ci

IDE or code editor.

None

Are you making a PR for this?

Yes, I will create a PR.

Edit: changed link to correct position and corrected fileMatch pattern

Dominant language
JavaScript
Stars
3.8k
Forks
2.3k
Avg merge
19h 59m
Merged PRs (30d)
127

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SchemaStore/schemastore

All issues in SchemaStore/schemastore

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.