Build & Install an Artifact
In the earlier section, we looked at how we configured the project directory for sfp, Now lets walk through some core commands.
A. Build an artifact for a package
The build command will generate a zipped artifact file for each package you have defined in the sfdx-project.json file. The artifact file will contain metadata and the source code at the point build creation for you to use to install.
Open up a terminal within your Salesforce project directory and enter the following command:
sfp build -v <DevHubAlias/DevHubUsername>You will see the logs with details of your package creation, for instance here is a sample output

A new "artifacts" folder will be generated within your source project containing a zipped artifact file for each package defined in your sfdx-project.json file. For example, the artifact files will contain the following naming convention with the "_sfpowerscript_artifact_" in between the package name and version number.
package-name_sfpowerscripts_artifact_1.0.0-1.zip\
artifacts folder
B. Install the artifact to a target org
Ensure you have authenticated your salesforce cli to a org first. If you haven't, please find the instructions here.
Once you have the authenticated to the sandbox, you could execute the installation command as below

Navigate to your target org and confirm that the package is now installed with the expected changes from your artifact. In this example above, a new custom field has been added to the Account Standard Object.
Last updated