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

Cannot enable Pipelines - validator incorrectly fails on anchor reference

    XMLWordPrintable

Details

    Description

      bitbucket-pipelines.yml files which utilize anchors for steps fail validation. For new projects this can cause Bitbucket to not allow Pipelines to be enabled.

      example:

      #!yaml
      
      image: java:8
      pipelines:
        default:
          - step: &buildSnapshot
              name: Build snapshot
              caches:
                - gradle
              script:
                - bash ./gradlew clean
                - bash ./gradlew build
        branches:
          develop:
            - step: *buildSnapshot
      ...
      
      

      This script fails with 'missing required property 'script' on the final -step line.

      Once the anchor reference was removed, I was able to enable Pipelines for the project. Re-adding the anchor reference once pipelines was enabled resulted in a successful build, with all steps executed as expected.

      Attachments

        Activity

          People

            Unassigned Unassigned
            c547da5d1922 jw_clark
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: