Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-18299

Better YML validation when configuration uses YML anchors and references

    XMLWordPrintable

Details

    Description

      As per the title, the YML validator for Pipelines (https://bitbucket-pipelines.prod.public.atl-paas.net/validator) does not show any syntax errors for yml anchors.

      This is highlighted in this example public repository: https://bitbucket.org/rtest123/anchor-indentation/addon/pipelines/home#!

      Added by tboudale :

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

      E.g.

      definitions: 
        steps:
          - step: &build-test
            name: Build and test
            script:
              - echo "hello"
            artifacts:
              - target/**
      
      pipelines:
        branches:
          anchor:
            -step: *build-test
          master:
            - step: *build-test
      
      

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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lmontiel@atlassian.com Leonardo M
              Votes:
              14 Vote for this issue
              Watchers:
              24 Start watching this issue

              Dates

                Created:
                Updated: