redhat-developer / redhat-developer/vscode-yaml
.gitlab-ci.yml - Custom tag !reference defined in schema but reported as error.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Describe the bug
Expected Behavior
This code is actually valid:
.gitlab-ci.yml
.common:
before_script:
- git config --global credential.helper store
.job:
before_script:
- !reference [.common, before_script]
The correct schema is loaded:
https://github.com/SchemaStore/schemastore/blob/master/src/api/json/catalog.json#L1732
https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/editor/schema/ci.json#L29
Current Behavior
Problems are raised for each !reference tag in the file:
Unresolved tag: !reference
Steps to Reproduce
Use the above mentioned file.
Environment
- [X ] Windows
- Mac
- [ X] Linux
- other (please specify)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided .gitlab-ci.yml example and inspect the linked GitLab ci.json schema to understand how !reference is declared. Trace where the YAML language service reports “Unresolved tag: !reference”; done means valid GitLab CI files using this tag no longer show that diagnostic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- gitlab, yaml
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100