Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

check-yaml and bitbucket pipeline validator complain about colons in string

I'm using pre-commit's check-yaml hook and also used the bitbucket pipeline validator to check this. Both report a problem with the last line

image: python:3.6.9
definitions:
steps:
- step: &test
name: Run Unit Tests
script:
- echo "DATE: $(date -Iseconds) UTC_TIME: $(date "+%s") GIT_HASH: $BITBUCKET_COMMIT"
- echo ": : "

check-yaml reports that the second colon "mapping values are not allowed in this context".  Same error if you comment out the first echo step, and leave the second.

bitbucket pipeline validator reports "bad indentation of a sequence entry". Same error if you comment out the first echo step, and leave the second.

This shell code originally was in a bash script and runs fine, but including the shell code directly into the bitbucket-pipeline.yml creates errors. Is this caused by validators that cannot handled quoted strings?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

3,968 views 68 21
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you