Details
-
Bug
-
Resolution: Duplicate
-
Medium
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.