Skip to content

CI/CD pipeline editor gives `unknown tag` error when using !reference

Summary

Using !reference in the script section scope renders an error in the CI/CD pipeline editor UI, saying it is an unknown tag - unknown tag <!reference>.

Steps to reproduce

  1. New project, navigate to CI/CD > Pipeline Editor
  2. Add the minimal configuration which uses !reference
stages:
  - lint  
  - test

.python-req:
  script:
    - pip install pyflakes

lint-python:
  extends: .python-req
  stage: lint
  image: python:latest
  script:
    - !reference [.python-req, script]
    - pyflakes python/

Example Project

What is the current bug behavior?

!reference is marked as an error in the UI, while the configuration actually is valid.

What is the expected correct behavior?

UI does not underline !reference as an error, while saying the config is valid on top.

Relevant logs and/or screenshots

image

Possible fixes

The keyword and scope matching seems to be missing from the linting specification.

cc @dhershkovitch @nadia_sotnikova @jreporter