DX Scratch Org Operations

Updated 3 months ago by Copado Solutions

In this article, we will go through the different buttons and operations you can find within DX's Scratch Org Operations.

Scratch Org Details

Get Org Details

Using this button you will be able to see relevant information about a scratch org such as:

  • Connected Status
  • Instance URL
  • Org Id
  • Username
Generate Password

This button will allow you to generate a password which can be used with the security token if the metadata needs to be retrieved to an IDE.

Open Scratch Org

Use this button to access right away your scratch org and start making changes. 

Delete Scratch Org

This button will remove the scratch org from your Hub as well as all the related records in Copado (Org Credential, Environment, Git Snapshot, Pipeline Connection).

Operations

Commit History

You can easily check the last 10 commits that are related to the selected user story.

Extensions

Configure your scratch org beyond the definition file. Load Data, Metadata and all other operations that Copado's deployment offers.

Please note that you can only select deployments that are in draft status.

To learn more about how to create a deployments see the article Creating a Deployment.

To learn more about deployment steps see the article Deployment Steps.

Load Metadata 

Copado DX allows different ways of loading metadata into a scratch org such as Git artifacts, package artifacts, patch & release, branch and metadata.

To learn more about metadata source options see the article Metadata Source Options.

  • How to load metadata using Git artifact:
    1. Select the Project Template from the drop-down list. It will populate Org Credentials which are related to selected project template and have artifacts.
    2. Select the Org Credential from the drop-down list. It will populate Artifacts.
    3. Select one or more Artifacts from the multi-select list. Metadata of the selected artifacts will be loaded in Preview Artifact Metadata.
    4. Click on Load Metadata.
  • How to load metadata using package artifact:
    1. Select the Project Template from the drop-down list. It will populate Org Credentials which are related to selected Project Template and have artifacts.
    2. Select the Org Credential from the drop-down list. It will populate Artifacts.
    3. Select one or more Artifacts from the multi-select list. Metadata of the selected artifacts will be loaded.
    4. Click on Load Metadata.
  • How to load metadata using patch & release:
    1. Select the Release by using the lookup icon. Tags will be loaded.
    2. Select the Tag from the Select Tag panel.
    3. Select the Tag Format from the drop-down list. 
    4. Click on Load Metadata.
  • How to load metadata using branch:
    1. Select the Repository by using the lookup icon. Branches will be loaded.
    2. Select the Branch from the Select Branch panel.
    3. Select the Branch Format from the drop-down list. 
    4. Click on Load Metadata.
  • How to load metadata using metadata:
    1. Select the Org Credential from the drop-down list. All the metadata of the selected org credential will be loaded.
    2. Click on Load Metadata.
Org Status

Whenever a scratch org is created by associating it to a pipeline, Copado will create the necessary records so that developers can commit right away to the related user stories.

If you load metadata to a scratch org that is part of a pipeline, two new types of branches will be created by Copado:

  • project/DX-123456789012: This branch will appear in the Git Snapshot record and will be also referenced in the Pipeline Connection. This will contain the committed metadata of all the user stories related to the parent scratch org
  • project/DX-123456789012-remote: This branch will be used to calculate org differences and it will always contain the metadata that can be retrieved from a SFDX pull command.

When calculating the org status, Copado will use these two branches in order to detect Remote Add, Remote Changed and Remote Deleted Metadata that can be auto selected later when committing to a user story.


How did we do?