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?