vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

.gitlab-ci.yml - Custom tag !reference defined in schema but reported as error.

Open gone-for-coding opened this issue 2 years ago • 6 comments

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)

gone-for-coding avatar Apr 27 '23 10:04 gone-for-coding

I can confirm it is reproduced on Mac OS, too.

aol-nnov avatar Aug 28 '23 06:08 aol-nnov

It is still an issue; MacOS Sonoma, latest vs code

gjrtimmer avatar Dec 01 '23 06:12 gjrtimmer

I fixed it by adding the following in my settings.yml of vscode

"yaml.customTags": [
      "!reference sequence"
  ],

gjrtimmer avatar Dec 01 '23 06:12 gjrtimmer