I really don't get why this simplistic bitbucket pipeline is throwing the yaml syntax error:
There is a YAML syntax error in your bitbucket-pipelines.yml at [line 3, column 13]. Expected a mapping or list of mappings for merging, but found scalar
definitions:
steps:
- step: &prep_base_images
name: Docker compose build base images
image: docker:latest
deployment: test
script:
- echo "hello world"
# Actual pipelines
# ==============================================================================
pipelines:
branches:
BLAH-137-backend-and-cicd-update:
- step:
<<: *prep_base_images
deployment: development
Does anyone have any ideas?
My first wild guess would be indentation.
Instead of:
definitions:
steps:
- step: &prep_base_images
name: Docker compose build base images
Try:
definitions:
steps:
- step: &prep_base_images
name: Docker compose build base images
Can you see that "name" was indented?
I am not sure if it is required or only a best practice in this file, but if it is required, then it could be the cause.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.