Artifact Dependencies Overview
As of Copado V12, the artifact dependencies feature allows you to make package artifacts dependent on each other. You can now develop and maintain a set of interdependent packages with the flexibility to promote them separately in a modular way.
Creating an Artifact Dependency
In order to create an artifact dependency in Copado, follow the steps below:
- Navigate to the related list section in the unlocked package or 2GP Artifact record.
- Next, locate the Related list named Artifact Dependencies and click on New.
- Fill in the fields in the Artifact Dependency record:
- Dependent Artifact: Designates the artifact record which cannot be installed or managed without the depending one.
- Depending Artifact: The depending package artifact which contains required dependencies for the metadata of the dependent package.
- Depending Artifact Version: The minimum or exact version of the depending artifact. This particular version will be used during version creation and installation operations.
- Depends on the latest version: If checked, the latest version of the depending artifact will be used when creating a new version and for installation operations.
- Once a dependency record is created, you will need to generate a new version of the package so that the new version is aware that it has a dependency. To generate a new version, click on Generate New Version in the unlocked package or 2GP Artifact record.
Artifact dependencies can be seen at the moment of loading metadata into a scratch org.
- On the first step in the Scratch Org Wizard, from the metadata sources available, select Unlocked Packages or Second-Generation Packages.
- In the next screen, enter the Sfdx Project details.
- Select an artifact and a version and click on Add to Selection.
- If the selected package has any packages dependent on it, they will be selected automatically. You can scroll down to the Selected Packages section where all the packages selected will be listed.
- Firstly, you will see the package you have selected. The Included by column value will be User Selected.
- Secondly, you will see all the dependent packages. The Included by column value will be the name of the main package.