I have created pipeline.yml and try to run it manually for deployment. When I open run pipeline and choose the branch and pipeline I had this error message; There is an error in your bitbucket-pipelines.yml at [pipelines > custom > deploy-to-uat > 0 > step > script > 5]. Missing or empty command string. Each item in this list should either be a single command string or a map defining a pipe invocation.
image: salesforce/cli:latest
definitions:
# Define just the script lines as an anchor
scripts:
- &auth-script
- openssl enc -nosalt -aes-256-cbc -d -in assets/server.key.enc -out assets/server.key -base64 -K $DECRYPTION_KEY -iv $DECRYPTION_IV
- sf org login jwt --instance-url $SF_INSTANCE_URL --client-id $SF_CONSUMER_KEY --jwt-key-file assets/server.key --username $SF_USERNAME --alias target_org
- &deploy-script
- sf project deploy start --source-dir force-app --target-org target_org --test-level RunLocalTests --wait 10
pipelines:
branches:
'{feature/*,TestChange,main}':
- step:
name: Static Checks
script:
- sf --version
# Add sfdx-scanner or other static tools here
custom:
deploy-to-uat:
- step:
name: Deploy to UAT
deployment: uat
script:
- export SF_USERNAME=$SF_USERNAME_UAT
- export SF_CONSUMER_KEY=$SF_CONSUMER_KEY_UAT
- export DECRYPTION_KEY=$DECRYPTION_KEY_UAT
- export DECRYPTION_IV=$DECRYPTION_IV_UAT
- *auth-script
- *deploy-script