Better YML validation when configuration uses YML anchors and references

Issue #18299 open
Leonardo Montiel staff created an issue

As per the title, the YML validator for Pipelines ( does not show any syntax errors for yml anchors.

This is highlighted in this example public repository:!

Added by @Theodora Boudale :

I would also like to add that sometimes a YML anchor also breaks validation in other parts of the yml file.


    - step: &build-test
      name: Build and test
        - echo "hello"
        - target/**

      -step: *build-test
      - step: *build-test

Above^ the lack of a space between '-' and 'step' for the branch named 'anchor', is not indicated by the validator.

Comments (6)

  1. aneita staff
    • changed status to open

    Thanks for raising this.

    This configuration resulted in an error when the pipeline was executed because when the reference was expanded, we detected the pipeline didn't include some keywords that it was expecting.

    I've created a ticket in the team's backlog to look at this bug, however, this is low priority given the other things that we're working on. I'll update you on our progress on this bug via this ticket.

  2. Log in to comment