Hello community,
I'm trying to configure bitbucket-pipelines.yml to deploy to another remote. The file is Valid according to the https://bitbucket-pipelines.prod.public.atl-paas.net/validator.
However, I'm getting "Configuration error".

Here's the yml:
# Ideally use an image with php, php extensions & composer.
# i.e. image: imagexmedia/ci:latest
# See: https://confluence.atlassian.com/bitbucket/php-with-bitbucket-pipelines-873907835.html
image: lbausch/laravel-ci:php81
# Defines single re-usable scripts.
script_definitions:
scripts:
env-setup: &env-setup
- export BIN_DIR=$BITBUCKET_CLONE_DIR/vendor/bin
composer-tasks: &composer-tasks
- composer self-update --2
- composer install --no-interaction --optimize-autoloader
compile-assets-dev: &compile-assets-dev
- npm install
- npm run dev
compile-assets-prod: &compile-assets-prod
- npm install
- npm run prod
remote-push: &remote-push
- git config --global user.name bitbucket-pipelines
- git config --global user.email commits-noreply@bitbucket.org
- git remote add platformsh q4wbvsyds6mfm@git.ca-1.platform.sh:q4wbvsyds6mfm.git
- git checkout $BITBUCKET_BRANCH
- git add --all
- git commit -m"Bitbucket build - $BITBUCKET_BUILD_NUMBER, Commit $BITBUCKET_COMMIT"
- git push platformsh $BITBUCKET_BRANCH
# Defines re-usable steps.
step_definitions:
- validate: &validate
name: 'Validation Tasks.'
caches:
- composer
script:
- *env-setup
- *composer-tasks
- ${BIN_DIR}/phpcs --standard=./phpcs.xml -p
- deploy-branch: &deploy-branch
name: 'Deploy branch to remote.'
caches:
- composer
script:
- *env-setup
- *composer-tasks
- *compile-assets-dev
- *remote-push
- deploy-prod: &deploy-prod
name: 'Deploy branch to remote (PROD).'
caches:
- composer
script:
- *env-setup
- *composer-tasks
- *compile-assets-prod
- *remote-push
# Bitbucket pipeline definitions.
pipelines:
default:
- step: *validate
pull-requests:
'**':
- step: *validate
branches:
main:
- step: *validate
- step: *deploy-prod
stage:
- step: *validate
- step: *deploy-branch
develop:
- step: *validate
- step: *deploy-branch
Can you please help me to create some reusable "steps" under the "script"?
Thanks,
Carol