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
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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.