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

multiple salesforce org deployment with single branch

omkar ma
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!
April 16, 2024

Please let me know the steps to deploy changes on multiple salesforce orgs with single branch. We are using unlocked package to deploy single package on multiple orgs.

I have tried deployment steps.

Pipeline Script:-

image:
pipelines:
branches:
dev:
script:
- apt update && apt -y install jq
# Install Salesforce CLI
- wget https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-linux-x64.tar.xz
- mkdir -p ~/cli/sf
- tar xJf sf-linux-x64.tar.xz -C ~/cli/sf --strip-components 1
- export PATH=~/cli/sf/bin:$PATH
# Output CLI version and plug-in information
- sfdx --version
- sfdx plugins --core
- sfdx force:auth:jwt:grant --clientid $SF_CONSUMER_KEY_PROD --jwtkeyfile /opt/atlassian/pipelines/agent/build/server.key --username $SF_USERNAME_PROD --setdefaultdevhubusername --setalias DevHub
- sfdx force:org:list --all
- sfdx force:auth:jwt:grant --clientid $SF_CONSUMER_KEY_DEV --jwtkeyfile /opt/atlassian/pipelines/agent/build/server.key --username $SF_USERNAME_DEV --setdefaultdevhubusername --setalias Dev2
- sf package install --wait 10 --publish-wait 10 --package dreamhouse1@2.0.0-1 --installation-key test1234 --no-prompt --target-org Dev2

 

 

I have tried below script but not worked. I am not getting option to deploy different orgs.
pipelines:
branches:
master:
- step:
<<: *Build
- step:
name: Deployment to Dev2
deployment: Dev2
script:
- sfdx force:auth:jwt:grant --clientid $SF_CONSUMER_KEY_DEV --jwtkeyfile /opt/atlassian/pipelines/agent/build/server.key --username $SF_USERNAME_DEV --setdefaultdevhubusername --setalias Dev2
- sf org list --all
- sf package install --wait 10 --publish-wait 10 --package dreamhouse3@3.0.0-1 --installation-key test1234 --no-prompt --target-org Dev2

1 answer

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 22, 2024

Hi and welcome to the community!

If you need help with Salesforce CLI, I would suggest reaching out to Salesforce community here https://trailhead.salesforce.com/trailblazer-community/feed or to Salesforce support team.

We can help with questions and issues specific to Bitbucket Pipelines, but for third-party tools it's best to reach out to the support team or a forum specific to that tool.

Kind regards,
Theodora

Suggest an answer

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

Atlassian Community Events