Scratch Org - First Metadata Deployment (Push) using Repository
In my previous article, Salesforce Scratch Org Based (Source-Driven) Development Workflow - Scratch Org Setup, I have set up a public repository sfdxrepo and explained steps needed to create a scratch org.
In this article, I'm going to walk through the steps required to deploy (push) metadata from the repository.
Pre-requisite
- Logged into Scratch Org using CLI - If you are following my article Salesforce Scratch Org Based (Source-Driven) Development Workflow - Scratch Org Setup, then you are already in your just created scratch org.
- Access to Repository - sfdxrepo. This repository is private, please give me a ping if any challenge with repo access.
Metadata Deployment
- In Visual Studio Code, open the Command Palette by pressing Ctrl+Shift+P on Windows or Cmd+Shift+P on macOS.
- Type SFDX.
- Select SFDX: Push Source to Default Scratch Org.
- This should start the push operation to default scratch org. Once finished the output message should show "exit code 0", something similar to below picture: -
Alternatively, you can also use sfdx force:source:push command through the command line.
Go to your scratch org and in Setup >> Environments >> Deploy >> Deployment Status, you can confirm the latest deployment. The screen should look something similar to below: -
First Release
I have tagged my repository as V1.0 so that it can be used to start the journey at any point of time. This release is very-very basic, I will continue with my journey and keep releasing with additional features.
👍