Release

Release a set of artifact(s) as defined by a release definition into a target org. When sfp server is configured, artifacts are fetched from sfp server.

sfp release

Release a set of artifact(s) as defined by a release definition into a target org. When sfp server is configured, artifacts are fetched from sfp server.

USAGE
  $ sfp release -o <value> [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url
    <value>] [-p <value>... | --releasecandidate <value>... | --branch <value>] [--domain <value>... ] [--scope <value>]
    [--npmrcpath <value> [--npm | -f <value>]] [--no-checksum-skip] [-g <value>...] [-t <value>] [--checkonly | ]
    [--quickdeploy-fallback [--quickdeploy <value> --payload-fingerprint <value>]] [--artifact-override <value>...
    --artifact-override-reason <value>] [--replacementsoverride <value>] [--waittime <value>] [--keys <value>] [-d
    <value>] [-b <value> --generatechangelog] [--runtests] [--forceinstall] [-v <value>] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -b, --branchname=<value>
      Repository branch in which the changelog files are located

  -d, --directory=<value>
      Relative path to directory to which the changelog should be generated, if the directory doesnt exist, it will be
      created

  -e, --email=<value>
      Email address for authenticated user. Ignored if --application-token is provided. Can be set via SFP_SERVER_USER env
      var.

  -f, --scriptpath=<value>
      (Optional: no-NPM) Path to script that authenticates and downloads artifacts from the registry

  -g, --logsgroupsymbol=<value>...
      Symbol used by CICD platform to group/collapse logs in the console. Provide an opening group, and an optional
      closing group symbol.

  -o, --targetorg=<value>
      (required) Username or alias of the target org.

  -p, --releasedefinition=<value>...
      Path to release definiton yaml, Multiple paths can be seperated by commas

  -t, --application-token=<value>
      Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var (CLI flags take precedence over
      env vars).

  -t, --tag=<value>
      Tag the release with a label, useful for identification in metrics

  -v, --devhubalias=<value>
      Username or alias of the Dev Hub org.

  --artifact-override=<value>...
      Change how one package deploys for this run only, without changing its artifact:
      "<package>:<key>=<value>[;<key>=<value>]", repeated per package. Keys: testLevel (RunSpecifiedTests, RunLocalTests
      or RunRelevantTests); testClasses (replaces the bound test classes), addTestClasses, removeTestClasses
      (comma-separated Apex classes); ignoreComponents (comma-separated Type:FullName). Source and diff packages only.

  --artifact-override-reason=<value>
      Why the artifacts deploy differently for this run; required with --artifact-override

  --branch=<value>
      Release the latest successful published candidate of each domain on a tracked branch

  --checkonly
      Validate a single-package domain against the target org with one check-only deployment and return the validated
      deploy id. Nothing is committed to the org and no release history is recorded. Supported for one release definition
      that deploys exactly one source or diff package.

  --domain=<value>...
      Restrict branch release to these domains (repeatable)

  --forceinstall
      Force install all packages, overriding skipIfAlreadyInstalled in the release definition. Useful for one-shot
      re-deploys when packages need to be re-applied even if reported as already installed.

  --generatechangelog
      Create a release changelog

  --keys=<value>
      Keys to be used while installing any managed package dependencies. Required format is a string of key-value pairs
      separated by spaces e.g. packageA:pw123 packageB:pw123 packageC:pw123

  --loglevel=<option>
      [default: info] logging level for this command invocation
      <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

  --no-checksum-skip
      Disable the component-level checksum skip optimisation; forces a full deploy for every source package. Use when
      drift between the org and the previous artifact is suspected.

  --npm
      Enable fallback to external npm registry if artifact is not found in sfp server

  --npmrcpath=<value>
      Path to .npmrc file used for authentication to registry. If left blank, defaults to home directory

  --payload-fingerprint=<value>
      The payloadFingerprint that --checkonly returned with the deploy id. The release refuses to quick deploy when the
      fetched artifact has a different fingerprint.

  --quickdeploy=<value>
      Commit the check-only validation with this deploy id (returned by --checkonly) instead of deploying the package
      again. Pre-deployment steps are skipped and post-deployment steps run as usual. Supported for one release definition
      that deploys exactly one source or diff package. Requires --payload-fingerprint.

  --quickdeploy-fallback
      When Salesforce rejects the validated deploy id (for example because another deployment reached the org first),
      deploy the package in full instead of failing.

  --releasecandidate=<value>...
      Release candidate(s) to fetch from the server in format 'domain:releaseName'. Multiple RCs can be specified via
      comma separation or multiple flags. Mutually exclusive with --releasedefinition. Example: 'core:RC-CORE-1' or
      'core:RC-1,sales:RC-2'

  --replacementsoverride=<value>
      Path to a YAML file containing replacement overrides to apply during deployment

  --repository=<value>
      The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo` for Azure DevOps

  --[no-]runtests
      Explicitly run tests during deployment; use --no-runtests to skip tests on sandbox or scratch orgs (production orgs
      always run tests)

  --scope=<value>
      (required for NPM) User or Organisation scope of the NPM package

  --sfp-server-url=<value>
      URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp config:set server-url

  --waittime=<value>
      [default: 120] Wait time for package installation

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Release a set of artifact(s) as defined by a release definition into a target org. When sfp server is configured,
  artifacts are fetched from sfp server.

EXAMPLES
  $ sfp release --branch main --repository flxbl-io/sf-core-dev -u mySandbox

  $ sfp release --branch main --domain core --domain sales --repository flxbl-io/sf-core-dev -u mySandbox

  $ sfp release -p path/to/releasedefinition.yml -u myorg --npm --scope myscope --generatechangelog

  $ sfp release --releasecandidate core:RC-CORE-1 --repository flxbl-io/sf-core -u myorg

  $ sfp release --releasecandidate core:RC-CORE-1,sales:RC-SALES-1 --repository flxbl-io/sf-core -u myorg

  $ sfp release --releasecandidate core:RC-CORE-1 --releasecandidate sales:RC-SALES-1 --repository flxbl-io/sf-core -u myorg

  $ sfp release --releasecandidate core:RC-CORE-1 --repository flxbl-io/sf-core -u myorg --checkonly --json

  $ sfp release --releasecandidate core:RC-CORE-1 --repository flxbl-io/sf-core -u myorg --quickdeploy 0Af... --payload-fingerprint <fingerprint> --json

  $ sfp release --releasecandidate core:RC-CORE-1 --repository flxbl-io/sf-core -u myorg --artifact-override "core:testClasses=AccountTest,ContactTest;ignoreComponents=PermissionSet:Ops" --artifact-override "ui:testLevel=RunLocalTests" --artifact-override-reason "hotfix unblock"

On this page