Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket Pipeline.yml error

Adem Koc
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 29, 2026

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.

Here is the code;

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_INSTANCE_URL=https://test.salesforce.com
            - 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

1 answer

0 votes
Aron Gombas _Midori_
Community Champion
January 30, 2026

The problem is reported related to this line:

- *auth-script

 ...which references this anchor:

- &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

I have the feeling that as the anchor is a list, the alias will render (insert) this list to a sub-list in the location of the reference?! And that's not what you want.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events