1

I have the below bash script to deploy the changes are checked in to Azure Devops to the Salesforce instance. Script runs as soon as checkin made to DEV branch it is all working good

     sfdx force:mdapi:deploy -l RunLocalTests -c -d ./toDeploy -u devOrg -w 10
 displayName: Run validation on source code
 - bash: 
     sfdx force:mdapi:deploy -l RunLocalTests -d ./toDeploy -u devOrg -w 10
 displayName: Deploy source code to Dev Org

The above one runs all the tests before deploying the changes, is there a way just deploy the changes without running local tests as it is just deploying in to my DEV org.

Second question is if I am trying to merge my changes from DEV to QA branch, I will have pipeline running to deploy the changes in QA branch to Sandbox instance. Will it deploy all the code from the DEV org to Sandbox org or does it only push the changes that are checked in to the QA branch

1

The above one runs all the tests before deploying the changes, is there a way just deploy the changes without running local tests as it is just deploying in to my DEV org.

-l NoTestRun should skip all unit tests. Note that you cannot do this when deploying to production, but it should work for any non-production type of org.

Second question is if I am trying to merge my changes from DEV to QA branch, I will have pipeline running to deploy the changes in QA branch to Sandbox instance. Will it deploy all the code from the DEV org to Sandbox org or does it only push the changes that are checked in to the QA branch

Using just SFDX, all files are deployed, but the net result is a delta change (as far as View Setup Audit Trail is concerned). Some other (paid) tools out there are smart enough to do just plain deltas without using Unlocked Packages.

However, you could drastically improve CI/CD performance using source format and Unlocked Packages; tests are automatically not run until you're ready to promote to production status. Source format is also a lot easier to manage in git.

2
  • Can you please share about using source format and Unlocked Packages, I am very new to Version Controlling and using Azure DEvOPs for doing it . Building pipelines for CI/CD which is again very new to me. My other question I posted was closed, where I was checking on how to deal with the config changes, it is easy to handle code changes through VSCode. but config changes how can I push from one isntance to another through this CI?CD – user81642 May 4 at 4:08
  • 1
    @user81642 Config changes are still metadata. Most of it you can commit to your repo (see Metadata Coverage Report). There are a few manual changes you may need to make, but it's less than you may think. CI/CD barely changes anything. You'll want to read about Unlocked Packages. Mind you, there are exceptions, as I said, but most packages are covered by 2GP (Second Generation Packages). – sfdcfox May 4 at 4:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.