Updated 4 months ago by Copado Solutions


With artifacts you can move to a  modular approach for Salesforce development process. An artifact is a logical set of metadata that represents a subset of an org. Artifacts can be tested independently from other components in your org, and you should be able to release them independently as well. 

The metadata components within an artifact can only live in one artifact at a time.  All source for your artifacts is stored in your artifact repository. Copado takes care of the handling process for you. 

You can define two types of artifacts:

  1. Git Artifact
    1. Version Control Artifact.
  2. Package Artifact
    1. Salesforce Unmanaged Package.

How to Create a Git Artifact

Once you have completed DX requirements, follow these steps:

  1. Create an empty Git repository in your Git server and initialize it.
    Use the same name for the Git repository both in your server and in the Artifact record.
  2. Create a repository record in Copado with connection details to the previously created repository.
  3. Open the Artifacts tab, click on New to create an Artifact record.
    1. Select the Git Artifact record type. 
    2. Select the org credential for the environment that holds the metadata. 
    3. Select the repository created for the artifact.
    4. Save.
  4. Click on Manage Metadata.
    1. From the metadata grid, select the metadata to include in the artifact.
    2. Click on Save
If you are working with tags in Copado releases, your artifacts will be tagged accordingly.  

How to Create a Package Artifact

Once you have completed DX requirements, follow these steps:

  1. Open the Artifacts tab and click on New to create an artifact record.
    1. Select the Package Artifact record type. 
    2. Select the org credential for the environment holding metadata. 
    3. Save.
  2. Click on Manage Artifact Content.
    1. From the grid, select the Unmanaged Package to use for the artifact.
      1. If the package is new, click on Refresh List of Packages.
    2. Click on Save
If the package has a key, you can write it in the Package Key field.

Working with Artifacts

Once you have created an artifact, you can create a scratch org and load the metadata, making it ready for use as part of your user stories.

If a new component is created in the scratch org, and you try to commit it from a user story, Copado will prompt you to select the artifact where this new component should exist.

Applying tags to your artifacts will require that the user stories have a Release record related and the version field be filled in.

When the user story is promoted and then deployed, new elements will be pushed to the artifact repository (tagged with the same version as the Release record, if there is no version, push will be done but without tag). Metadata selection will be included in the Artifact record and a related artifact version record will be created.

How did we do?