Skip to content

Build

sf simply cicd build check-permission-sets

Section titled “sf simply cicd build check-permission-sets”

Fail the pipeline when any generated permission set in the repo has drifted from its source metadata.

USAGE
$ sf simply cicd build check-permission-sets [--json] [--flags-dir <value>] [--debug] [--disabled]
FLAGS
--debug [env: SIMPLY_CICD_DEBUG] Enable verbose debug logging.
--disabled [env: SIMPLY_CICD_DISABLED] Skip this job entirely, logging a warning instead of running it.
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Fail the pipeline when any generated permission set in the repo has drifted from its source metadata.
Finds every permission set build file in the repo, meaning every file whose name ends in `.psbuild.json`, each of
which defines one permission set (see `sf simply permissions build`). It checks each of those permission sets the same
way `sf simply permissions build --check` does. Nothing is written. Files are found by walking the directory tree from
the current directory, skipping `node_modules`, `.git`, `.sf`, and `.sfdx`, so `find . -name '*.psbuild.json'` lists
what will be checked. Relative paths in a permission set build file resolve against the current directory, so run this
from the repo root.
Every file is loaded and validated before any permission set is checked: a `.psbuild.json` file that fails validation,
one in the old `permissionSets` list format, or two files that define the same permission set name fail the command
immediately. Every permission set is then checked before the command fails, so one run lists every permission set that
has drifted or is missing, with the file that defines it and the command that regenerates them. A repo with no
`.psbuild.json` files is skipped with exit code 0, so the job is safe to include in a shared pipeline template.
Formatting differences, such as indentation, line endings, or comments, don't count as drift.
EXAMPLES
$ sf simply cicd build check-permission-sets

See code: lib/commands/simply/cicd/build/check-permission-sets.js

Delete scratch orgs older than 3 hours from every configured Dev Hub.

USAGE
$ sf simply cicd build cleanup-scratch-orgs --dev-hub <value>... [--json] [--flags-dir <value>] [--debug] [--disabled]
FLAGS
--debug [env: SIMPLY_CICD_DEBUG] Enable verbose debug logging.
--dev-hub=<value>... (required) Alias of a Dev Hub. Must already be authenticated. Repeat this flag for each Dev Hub
to try, in order.
--disabled [env: SIMPLY_CICD_DISABLED] Skip this job entirely, logging a warning instead of running it.
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Delete scratch orgs older than 3 hours from every configured Dev Hub.
For each Dev Hub, queries `ActiveScratchOrg` records created more than 3 hours ago and bulk-deletes them. Useful for
keeping a shared Dev Hub's scratch org allotment from being exhausted by abandoned CI runs. Every `--dev-hub` alias
must already be authenticated.
EXAMPLES
$ sf simply cicd build cleanup-scratch-orgs --dev-hub my-devhub

See code: lib/commands/simply/cicd/build/cleanup-scratch-orgs.js

Create a fallback git tag carrying forward the previous package version’s ID, for builds that didn’t produce a new package version.

USAGE
$ sf simply cicd build create-fallback-tag --ci-commit-ref-name <value> --ci-pipeline-id <value> --ci-project-path <value>
--project-access-token <value> [--json] [--flags-dir <value>] [--vcs-host <value>] [--vcs-provider github|gitlab]
[--debug] [--disabled] [--last-tag <value>] [--out <value>]
FLAGS
--ci-commit-ref-name=<value> (required) [env: SIMPLY_CICD_CI_COMMIT_REF_NAME] Git branch or ref name being built.
--ci-pipeline-id=<value> (required) [env: SIMPLY_CICD_CI_PIPELINE_ID] CI pipeline ID, used to name the
temporary authenticated git remote.
--ci-project-path=<value> (required) [env: SIMPLY_CICD_CI_PROJECT_PATH] CI project's git path (e.g.
group/project), used to build the authenticated git remote URL.
--debug [env: SIMPLY_CICD_DEBUG] Enable verbose debug logging.
--disabled [env: SIMPLY_CICD_DISABLED] Skip this job entirely, logging a warning instead of
running it.
--last-tag=<value> Manually specify the last tag to increment, instead of resolving it from git.
--out=<value> [default: subscriberPackageVersionId.env] Output dotenv file path.
--project-access-token=<value> (required) [env: SIMPLY_CICD_PROJECT_ACCESS_TOKEN] Access token used to authenticate
git remote operations (tagging, pushing).
--vcs-host=<value> [env: SIMPLY_CICD_VCS_HOST] Hostname of the VCS instance hosting this project.
--vcs-provider=<option> [default: gitlab, env: SIMPLY_CICD_VCS_PROVIDER] The VCS platform hosting this
project.
<options: github|gitlab>
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Create a fallback git tag carrying forward the previous package version's ID, for builds that didn't produce a new
package version.
Resolves the last tag to increment (either `--last-tag`, or the closest reachable tag matching the project's version
prefix), extracts its annotated `04t` package version ID, and creates/pushes a new tag with an incremented numeric
suffix (e.g. `v1.2.3.4` -> `v1.2.3.4-1` -> `v1.2.3.4-2`) annotated with that same package ID. Tags are matched and
parsed in `SIMPLY_CICD_VERSION_TAG_FORMAT` or the project's `plugins.simply.versionTagFormat`, so only a counter after
the formatted version is incremented — with `v{MAJOR}.{MINOR}.{PATCH}-{BUILD}`, `v1.2.3-4` becomes `v1.2.3-4-1`, never
`v1.2.3-5`. Soft no-ops (does not error) when no last tag, or no valid package ID within it, can be found — a build
with nothing to fall back to just has nothing to do here.
Also soft no-ops when HEAD already carries a tag matching the version prefix, e.g. because `build
create-package-version` just created and tagged a real package version earlier in the same job. This also keeps a
retried job from adding a second fallback tag to the same commit.
Skipped automatically when `SIMPLY_CICD_PACKAGE_CHANGED=TRUE` (or the deprecated `PACKAGE_CHANGED=TRUE`) is set in the
environment (see `build determine-package-changes`) — a real package version will be created instead.
EXAMPLES
$ sf simply cicd build create-fallback-tag --ci-commit-ref-name main --ci-project-path group/project --project-access-token glpat-... --ci-pipeline-id 123

See code: lib/commands/simply/cicd/build/create-fallback-tag.js

sf simply cicd build create-package-version

Section titled “sf simply cicd build create-package-version”

Create a new package version, verify minimum code coverage, and create/push a version-tracking git tag.

USAGE
$ sf simply cicd build create-package-version --ci-commit-ref-name <value> --ci-pipeline-id <value> --ci-project-path <value>
--project-access-token <value> --ci-commit-sha <value> --ci-pipeline-url <value> --packaging-devhub <value> [--json]
[--flags-dir <value>] [--vcs-host <value>] [--vcs-provider github|gitlab] [--debug] [--disabled]
[--ci-pipeline-source <value>] [--always-create-package] [--code-coverage-minimum <value>]
[--package-release-branch-prefix <value>]
FLAGS
--always-create-package Create a package version even when this isn't a release-branch build.
--ci-commit-ref-name=<value> (required) [env: SIMPLY_CICD_CI_COMMIT_REF_NAME] Git branch or ref name being
built.
--ci-commit-sha=<value> (required) [env: SIMPLY_CICD_CI_COMMIT_SHA] Commit SHA to tag as the package
version's source.
--ci-pipeline-id=<value> (required) [env: SIMPLY_CICD_CI_PIPELINE_ID] CI pipeline ID, used to name the
temporary authenticated git remote.
--ci-pipeline-source=<value> [env: SIMPLY_CICD_CI_PIPELINE_SOURCE] Source trigger of the CI pipeline (e.g.
merge_request_event). When set to merge_request_event, package creation is
skipped.
--ci-pipeline-url=<value> (required) [env: SIMPLY_CICD_CI_PIPELINE_URL] URL of the CI pipeline, used as
the package version's description.
--ci-project-path=<value> (required) [env: SIMPLY_CICD_CI_PROJECT_PATH] CI project's git path (e.g.
group/project), used to build the authenticated git remote URL.
--code-coverage-minimum=<value> [default: 75] Minimum Apex code coverage percentage required for the new
package version.
--debug [env: SIMPLY_CICD_DEBUG] Enable verbose debug logging.
--disabled [env: SIMPLY_CICD_DISABLED] Skip this job entirely, logging a warning instead
of running it.
--package-release-branch-prefix=<value> Prefix identifying release branches. Determines whether this build creates a
package version and how the resulting git tag is named.
--packaging-devhub=<value> (required) [env: SIMPLY_CICD_PACKAGING_DEVHUB] Alias of the Dev Hub used for
packaging operations like package version creation. Must already be
authenticated.
--project-access-token=<value> (required) [env: SIMPLY_CICD_PROJECT_ACCESS_TOKEN] Access token used to
authenticate git remote operations (tagging, pushing).
--vcs-host=<value> [env: SIMPLY_CICD_VCS_HOST] Hostname of the VCS instance hosting this
project.
--vcs-provider=<option> [default: gitlab, env: SIMPLY_CICD_VCS_PROVIDER] The VCS platform hosting
this project.
<options: github|gitlab>
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Create a new package version, verify minimum code coverage, and create/push a version-tracking git tag.
Skips entirely (without error) when the pipeline was triggered by a merge request, or when this isn't a release-branch
build and `--always-create-package` wasn't passed. Otherwise, creates a new version of the default package directory's
package, polls until creation finishes, verifies the resulting version's Apex code coverage meets
`--code-coverage-minimum` (or the project's own `plugins.simply.coverageRequirement.minimumCoverageRequired`, if
declared in `sfdx-project.json`), and creates/pushes a git tag annotated with the new package version's `04t` ID.
The tag is `v<major>.<minor>.<patch>.<build>` by default. A project can choose its own shape with a
`plugins.simply.versionTagFormat` template in `sfdx-project.json`, or the `SIMPLY_CICD_VERSION_TAG_FORMAT` environment
variable (which overrides it) — e.g. `{MAJOR}.{MINOR}.{PATCH}+{BUILD}` tags `1.2.3.4` as `1.2.3+4`. Each of `{MAJOR}`,
`{MINOR}`, `{PATCH}`, and `{BUILD}` must appear exactly once, and the format is validated before any package version
is created. Unless this is a release-branch build, the package directory's `branch` attribute or the CI ref is
appended as `-<suffix>` after the formatted version.
Skipped automatically when `SIMPLY_CICD_PACKAGE_CHANGED=FALSE` (or the deprecated `PACKAGE_CHANGED=FALSE`) is set in
the environment (see `build determine-package-changes`).
EXAMPLES
$ sf simply cicd build create-package-version --ci-commit-ref-name main --ci-commit-sha a1b2c3d --ci-pipeline-id 123 --ci-pipeline-url https://gitlab.example.com/pipelines/123 --ci-project-path group/project --project-access-token glpat-... --packaging-devhub my-packaging-devhub

See code: lib/commands/simply/cicd/build/create-package-version.js

Create a scratch org, trying each configured Dev Hub in order.

USAGE
$ sf simply cicd build create-scratch --dev-hub <value>... [--json] [--flags-dir <value>] [--debug] [--disabled]
[--scratch-definition-file <value>] [--scratch-duration-days <value>]
FLAGS
--debug [env: SIMPLY_CICD_DEBUG] Enable verbose debug logging.
--dev-hub=<value>... (required) Alias of a Dev Hub. Must already be authenticated. Repeat this flag for
each Dev Hub to try, in order.
--disabled [env: SIMPLY_CICD_DISABLED] Skip this job entirely, logging a warning instead of
running it.
--scratch-definition-file=<value> Definition file used to create the scratch org, if not specified in
sfdx-project.json.
--scratch-duration-days=<value> [default: 1] Duration of the scratch org in days.
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Create a scratch org, trying each configured Dev Hub in order.
Reads the default package directory's `definitionFile` from `sfdx-project.json` (falling back to
`--scratch-definition-file`), and attempts creation against each `--dev-hub` alias in order (each must already be
authenticated). A Dev Hub is skipped in favor of the next one when it has no scratch org signups left today
(`DailyScratchOrgs`) or is already at its limit of active scratch orgs (`ActiveScratchOrgs`); a Dev Hub that hits
either limit during the signup is also skipped. Writes the resulting org's auth fields to `SCRATCH_ORG_INFO.json` for
later build steps, best-effort sets a default `CountryCode`, and assigns any permission sets/licenses declared under
the default package directory's `packageMetadataAccess`.
Skipped automatically when `SIMPLY_CICD_PACKAGE_CHANGED=FALSE` (or the deprecated `PACKAGE_CHANGED=FALSE`) is set in
the environment (see `build determine-package-changes`).
EXAMPLES
$ sf simply cicd build create-scratch --dev-hub my-devhub

See code: lib/commands/simply/cicd/build/create-scratch.js

Delete the scratch org created by build create-scratch.

USAGE
$ sf simply cicd build delete-scratch --dev-hub <value> [--json] [--flags-dir <value>] [--jwt-key-file <value>] [--debug]
[--disabled]
FLAGS
--debug [env: SIMPLY_CICD_DEBUG] Enable verbose debug logging.
--dev-hub=<value> (required) Alias of a Dev Hub. Must already be authenticated. Repeat this flag for each Dev
Hub to try, in order.
--disabled [env: SIMPLY_CICD_DISABLED] Skip this job entirely, logging a warning instead of running it.
--jwt-key-file=<value> [env: SIMPLY_CICD_JWT_KEY_FILE] Path to the JWT private key file used to re-authenticate the
scratch org (or its Dev Hub) when it was JWT-authenticated. Not needed when the Dev Hub was
authenticated via web login or an SFDX auth URL — the scratch org's own refresh token is used
instead.
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Delete the scratch org created by `build create-scratch`.
Reads `SCRATCH_ORG_INFO.json` (written by `build create-scratch`) to confirm `--dev-hub` is the Dev Hub that owns the
scratch org, re-authenticates to it and the scratch org as needed, and deletes it. Deletion failures are logged rather
than thrown, since a scratch org left behind after a failed deletion just needs manual cleanup and shouldn't fail an
otherwise-successful pipeline run.
Skipped automatically when `SIMPLY_CICD_PACKAGE_CHANGED=FALSE` (or the deprecated `PACKAGE_CHANGED=FALSE`) is set in
the environment (see `build determine-package-changes`).
EXAMPLES
$ sf simply cicd build delete-scratch --dev-hub my-devhub

See code: lib/commands/simply/cicd/build/delete-scratch.js

sf simply cicd build determine-package-changes

Section titled “sf simply cicd build determine-package-changes”

Determine if any package-relevant files have changed since the last release tag.

USAGE
$ sf simply cicd build determine-package-changes [--json] [--flags-dir <value>] [--debug] [--disabled] [--out <value>]
FLAGS
--debug [env: SIMPLY_CICD_DEBUG] Enable verbose debug logging.
--disabled [env: SIMPLY_CICD_DISABLED] Skip this job entirely, logging a warning instead of running it.
--out=<value> [default: changes.env] Output dotenv file path.
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Determine if any package-relevant files have changed since the last release tag.
Reads the default package directory from `sfdx-project.json`, finds the closest reachable git tag for its
`major.minor.patch` (in `SIMPLY_CICD_VERSION_TAG_FORMAT` or the project's `plugins.simply.versionTagFormat`,
`v<major>.<minor>.<patch>.*` by default), and diffs that tag against `HEAD` for the package directory and
`sfdx-project.json` itself. Writes `SIMPLY_CICD_PACKAGE_CHANGED=TRUE|FALSE` and `SIMPLY_CICD_LAST_TAG=<tag>` to the
output file, followed by the same values under the deprecated names `PACKAGE_CHANGED` and `LAST_TAG`, which will be
removed in a future release. Any failure during detection (missing/invalid sfdx-project.json, git errors) defaults to
`SIMPLY_CICD_PACKAGE_CHANGED=TRUE`, so a build never silently skips work it should have done.
EXAMPLES
$ sf simply cicd build determine-package-changes --out changes.env

See code: lib/commands/simply/cicd/build/determine-package-changes.js

sf simply cicd build generate-flexipage-diff

Section titled “sf simply cicd build generate-flexipage-diff”

Generate a Flexipage delta between two commits and post the results to the change request.

USAGE
$ sf simply cicd build generate-flexipage-diff --from <value> --to <value> --project-access-token <value> [--json] [--flags-dir <value>]
[--vcs-host <value>] [--vcs-provider github|gitlab] [--ci-project-id <value>] [--ci-merge-request-iid <value>]
[--ci-repository <value>] [--ci-pull-request-number <value>] [--ci-run-id <value>] [--ci-server-url <value>]
[--ci-commit-sha <value>] [--out <value>] [--debug] [--disabled]
FLAGS
--ci-commit-sha=<value> [env: SIMPLY_CICD_CI_COMMIT_SHA] Commit SHA to attribute the posted diff to.
--ci-merge-request-iid=<value> [env: SIMPLY_CICD_CI_MERGE_REQUEST_IID] GitLab only: internal ID of the merge
request to post the diff to.
--ci-project-id=<value> [env: SIMPLY_CICD_CI_PROJECT_ID] GitLab only: numeric CI project ID of the project
to post the diff to.
--ci-pull-request-number=<value> [env: SIMPLY_CICD_CI_PULL_REQUEST_NUMBER] GitHub only: number of the pull request to
post the diff to.
--ci-repository=<value> [env: SIMPLY_CICD_CI_REPOSITORY] GitHub only: repository to post the diff to, as
owner/repo.
--ci-run-id=<value> [env: SIMPLY_CICD_CI_RUN_ID] GitHub only: Actions run ID, used to build links back
to the run's artifacts.
--ci-server-url=<value> [env: SIMPLY_CICD_CI_SERVER_URL] GitHub only: server URL, for instances other than
github.com.
--debug [env: SIMPLY_CICD_DEBUG] Enable verbose debug logging.
--disabled [env: SIMPLY_CICD_DISABLED] Skip this job entirely, logging a warning instead of
running it.
--from=<value> (required) Base commit SHA to diff from.
--out=<value> Output directory or file path for the delta results.
--project-access-token=<value> (required) [env: SIMPLY_CICD_PROJECT_ACCESS_TOKEN] Project access token used to post
the diff results back to the merge request.
--to=<value> (required) Head commit SHA to diff to.
--vcs-host=<value> [env: SIMPLY_CICD_VCS_HOST] Hostname of the VCS instance hosting this project.
--vcs-provider=<option> [default: gitlab, env: SIMPLY_CICD_VCS_PROVIDER] The VCS platform hosting this
project.
<options: github|gitlab>
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Generate a Flexipage delta between two commits and post the results to the change request.
Runs the upstream `flexipage-delta` binary to diff `**/*.flexipage-meta.xml` files between `--from` and `--to`, then
the reporter binary for the platform `--vcs-provider` selects — `flexipage-delta-gitlab` or `flexipage-delta-github` —
to post the results back to the merge or pull request. Failures are logged, not thrown — a diff-posting step shouldn't
fail the build.
EXAMPLES
$ sf simply cicd build generate-flexipage-diff --ci-project-id 123 --ci-merge-request-iid 45 --from abc123 --to def456 --project-access-token glpat-...
$ sf simply cicd build generate-flexipage-diff --vcs-provider github --ci-repository my-org/my-repo --ci-pull-request-number 45 --ci-run-id 987 --from abc123 --to def456 --project-access-token ghp-...

See code: lib/commands/simply/cicd/build/generate-flexipage-diff.js

Generate a Flow delta between two commits and post the results to the change request.

USAGE
$ sf simply cicd build generate-flow-diff --from <value> --to <value> --project-access-token <value> [--json] [--flags-dir <value>]
[--vcs-host <value>] [--vcs-provider github|gitlab] [--ci-project-id <value>] [--ci-merge-request-iid <value>]
[--ci-repository <value>] [--ci-pull-request-number <value>] [--ci-run-id <value>] [--ci-server-url <value>]
[--ci-commit-sha <value>] [--out <value>] [--debug] [--disabled]
FLAGS
--ci-commit-sha=<value> [env: SIMPLY_CICD_CI_COMMIT_SHA] Commit SHA to attribute the posted diff to.
--ci-merge-request-iid=<value> [env: SIMPLY_CICD_CI_MERGE_REQUEST_IID] GitLab only: internal ID of the merge
request to post the diff to.
--ci-project-id=<value> [env: SIMPLY_CICD_CI_PROJECT_ID] GitLab only: numeric CI project ID of the project
to post the diff to.
--ci-pull-request-number=<value> [env: SIMPLY_CICD_CI_PULL_REQUEST_NUMBER] GitHub only: number of the pull request to
post the diff to.
--ci-repository=<value> [env: SIMPLY_CICD_CI_REPOSITORY] GitHub only: repository to post the diff to, as
owner/repo.
--ci-run-id=<value> [env: SIMPLY_CICD_CI_RUN_ID] GitHub only: Actions run ID, used to build links back
to the run's artifacts.
--ci-server-url=<value> [env: SIMPLY_CICD_CI_SERVER_URL] GitHub only: server URL, for instances other than
github.com.
--debug [env: SIMPLY_CICD_DEBUG] Enable verbose debug logging.
--disabled [env: SIMPLY_CICD_DISABLED] Skip this job entirely, logging a warning instead of
running it.
--from=<value> (required) Base commit SHA to diff from.
--out=<value> Output directory or file path for the delta results.
--project-access-token=<value> (required) [env: SIMPLY_CICD_PROJECT_ACCESS_TOKEN] Project access token used to post
the diff results back to the merge request.
--to=<value> (required) Head commit SHA to diff to.
--vcs-host=<value> [env: SIMPLY_CICD_VCS_HOST] Hostname of the VCS instance hosting this project.
--vcs-provider=<option> [default: gitlab, env: SIMPLY_CICD_VCS_PROVIDER] The VCS platform hosting this
project.
<options: github|gitlab>
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Generate a Flow delta between two commits and post the results to the change request.
Runs the upstream `flow-delta` binary to diff `**/*.flow-meta.xml` files between `--from` and `--to`, then the
reporter binary for the platform `--vcs-provider` selects — `flow-delta-gitlab` or `flow-delta-github` — to post the
results back to the merge or pull request. Failures are logged, not thrown — a diff-posting step shouldn't fail the
build.
EXAMPLES
$ sf simply cicd build generate-flow-diff --ci-project-id 123 --ci-merge-request-iid 45 --from abc123 --to def456 --project-access-token glpat-...
$ sf simply cicd build generate-flow-diff --vcs-provider github --ci-repository my-org/my-repo --ci-pull-request-number 45 --ci-run-id 987 --from abc123 --to def456 --project-access-token ghp-...

See code: lib/commands/simply/cicd/build/generate-flow-diff.js

Install packaged dependencies into the scratch org created by build create-scratch.

USAGE
$ sf simply cicd build install-dependencies [--json] [--flags-dir <value>] [--jwt-key-file <value>] [--debug] [--disabled] [--install-type
All|Delta|Upgrade] [--upgrade-type DeprecateOnly|Mixed|Delete] [--package-retry-attempts <value>...]
[--retry-attempts <value>] [--retry-backoff <value>]
FLAGS
--debug [env: SIMPLY_CICD_DEBUG] Enable verbose debug logging.
--disabled [env: SIMPLY_CICD_DISABLED] Skip this job entirely, logging a warning instead of
running it.
--install-type=<option> [default: Upgrade] The type of dependency installation to perform.
<options: All|Delta|Upgrade>
--jwt-key-file=<value> [env: SIMPLY_CICD_JWT_KEY_FILE] Path to the JWT private key file used to
re-authenticate the scratch org (or its Dev Hub) when it was JWT-authenticated.
Not needed when the Dev Hub was authenticated via web login or an SFDX auth URL —
the scratch org's own refresh token is used instead.
--package-retry-attempts=<value>... Number of retry attempts for a specific package, overriding --retry-attempts for
that package only.
--retry-attempts=<value> Number of additional attempts to make if a package install fails, before giving
up on that package. Defaults to 0 (no retries). Does not apply when the install
is still In-Progress when polling times out, since retrying could race or
duplicate an install that may still complete server-side. Overridden per-package
by --package-retry-attempts.
--retry-backoff=<value> [default: 2] Factor the delay between install retries grows by after each failed
attempt (e.g. 2 doubles the delay each time). Only relevant when a package has
retries enabled via --retry-attempts or --package-retry-attempts. Applies to
every package's retries; there is no per-package override.
--upgrade-type=<option> [default: Mixed] Upgrade type for the dependency installs; available only for
unlocked packages.
<options: DeprecateOnly|Mixed|Delete>
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Install packaged dependencies into the scratch org created by `build create-scratch`.
Reads `SCRATCH_ORG_INFO.json` (written by `build create-scratch`), authenticates as that scratch org, and installs its
packaged dependencies.
Skipped automatically when `SIMPLY_CICD_PACKAGE_CHANGED=FALSE` (or the deprecated `PACKAGE_CHANGED=FALSE`) is set in
the environment (see `build determine-package-changes`).
EXAMPLES
$ sf simply cicd build install-dependencies --jwt-key-file ./server.key
FLAG DESCRIPTIONS
--package-retry-attempts=<value>...
Number of retry attempts for a specific package, overriding --retry-attempts for that package only.
Retry attempts for a specific package in the key:value format of SubscriberPackageVersionId:RetryAttempts. You can
use an alias in place of the SubscriberPackageVersionId. Repeat this flag to set overrides for multiple packages.
Packages not listed here use --retry-attempts.
--upgrade-type=DeprecateOnly|Mixed|Delete
Upgrade type for the dependency installs; available only for unlocked packages.
For package upgrades, specifies whether to mark all removed components as deprecated (DeprecateOnly), to delete
removed components that can be safely deleted and deprecate the others (Mixed), or to delete all removed components,
except for custom objects and custom fields, that don't have dependencies (Delete). The default is Mixed.
DeprecateOnly and Delete only apply to unlocked package upgrades. Delete is not confirmed first: like every other
prompt in a pipeline, it is auto-approved.

See code: lib/commands/simply/cicd/build/install-dependencies.js

Install the LWC Jest test libraries and run the project’s LWC Jest tests with coverage.

USAGE
$ sf simply cicd build lwc-jest [--json] [--flags-dir <value>] [--debug] [--disabled]
[--lwc-jest-fail-on-test-failure]
FLAGS
--debug [env: SIMPLY_CICD_DEBUG] Enable verbose debug logging.
--disabled [env: SIMPLY_CICD_DISABLED] Skip this job entirely, logging a warning instead of
running it.
--lwc-jest-fail-on-test-failure [env: SIMPLY_CICD_LWC_JEST_FAIL_ON_TEST_FAILURE] Exit non-zero when the LWC Jest
tests (or their install) fail, failing the pipeline. By default failures are only
logged.
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Install the LWC Jest test libraries and run the project's LWC Jest tests with coverage.
Installs `@salesforce/sfdx-lwc-jest`, `@sa11y/jest`, and `jest-junit`, then runs `sfdx-lwc-jest --coverage --
--passWithNoTests` with the `jest-junit` reporter added to any reporters the project's own Jest config sets, writing a
JUnit report to `./test-results/lwc/test-result.xml` for the pipeline to upload as an artifact. By default failures
are logged, not thrown, so they don't fail the pipeline; pass `--lwc-jest-fail-on-test-failure` to make them exit
non-zero.
EXAMPLES
$ sf simply cicd build lwc-jest
Fail the pipeline when a test fails:
$ sf simply cicd build lwc-jest --lwc-jest-fail-on-test-failure

See code: lib/commands/simply/cicd/build/lwc-jest.js

sf simply cicd build publish-utam-page-objects

Section titled “sf simply cicd build publish-utam-page-objects”

Compile the project’s UTAM page objects for a package version and publish them to an npm registry.

USAGE
$ sf simply cicd build publish-utam-page-objects --packaging-devhub <value> [--json] [--flags-dir <value>] [--debug] [--disabled]
[--subscriber-package-version-id <value>] [--npm-package-name <value>] [--npm-registry <value>] [--npm-access
public|restricted] [--npm-dist-tag <value>] [--ci-commit-ref-name <value>] [--package-release-branch-prefix <value>]
[--utam-version <value>] [--dry-run] [--out <value>] [--env-file <value>]
FLAGS
--ci-commit-ref-name=<value> [env: SIMPLY_CICD_CI_COMMIT_REF_NAME] Git branch or ref name being built.
With --package-release-branch-prefix, reproduces the suffix
`create-package-version` put on the git tag, so the npm version mirrors it.
--debug [env: SIMPLY_CICD_DEBUG] Enable verbose debug logging.
--disabled [env: SIMPLY_CICD_DISABLED] Skip this job entirely, logging a warning instead
of running it.
--dry-run Compile and pack the package without publishing it, copying the tarball into
the project directory.
--env-file=<value> [default: subscriberPackageVersionId.env] Dotenv file to read
SIMPLY_CICD_BUILT_SUBSCRIBER_PACKAGE_VERSION_ID from when it isn't passed as
a flag or set in the environment.
--npm-access=<option> [env: SIMPLY_CICD_NPM_ACCESS] Passed through to npm publish --access. Needed
on npmjs.com to publish a scoped package publicly.
<options: public|restricted>
--npm-dist-tag=<value> Dist-tag to publish under, overriding the one derived from the git tag's
suffix.
--npm-package-name=<value> [env: SIMPLY_CICD_NPM_PACKAGE_NAME] npm package name to publish the page
objects under. Required unless `plugins.simply.utam.packageName` is set in
sfdx-project.json; the flag wins when both are present.
--npm-registry=<value> [env: SIMPLY_CICD_NPM_REGISTRY] Registry to publish to. Defaults to whatever
npm itself is configured to use. Authenticating to it is the job's
responsibility — see the description.
--out=<value> [default: subscriberPackageVersionId.env] Dotenv file to append the published
package name and version to.
--package-release-branch-prefix=<value> Prefix identifying release branches. Determines whether the npm version and
dist-tag carry a branch suffix.
--packaging-devhub=<value> (required) [env: SIMPLY_CICD_PACKAGING_DEVHUB] Alias of the Dev Hub that owns
the package version. Must already be authenticated.
--subscriber-package-version-id=<value> Subscriber package version ID (04t) to publish page objects for. Falls back
to SIMPLY_CICD_BUILT_SUBSCRIBER_PACKAGE_VERSION_ID (or the deprecated
SUBSCRIBER_PACKAGE_VERSION_ID) in the environment, then to the same key in
--env-file.
--utam-version=<value> [default: ^3, env: SIMPLY_CICD_UTAM_VERSION] npm version spec of the UTAM
compiler to install and compile with.
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Compile the project's UTAM page objects for a package version and publish them to an npm registry.
Gives every Salesforce Unlocked Package version a matching npm package of compiled UTAM page objects, so a UI-test
suite can install exactly the page objects that describe the package version it is testing against.
Runs after `build create-package-version`, whose `04t` it takes as input — from `--subscriber-package-version-id`,
from `SIMPLY_CICD_BUILT_SUBSCRIBER_PACKAGE_VERSION_ID` (or the deprecated `SUBSCRIBER_PACKAGE_VERSION_ID`) in the
environment (how a separate job receives that command's dotenv report), or from the dotenv file itself (how a later
step in the same job sees it). It copies every `**/__utam__/**/*.utam.json` page object and `**/__utam__/**/*.utam.js`
utility under the default package directory into a staging directory outside the repo, compiles them there with the
UTAM compiler, and publishes the result: the compiled page objects under `pageObjects/` (`.js`, `.cjs`, `.d.ts`,
`.d.cts`), the utilities under `utils/`, and the sources under `source/`. When page objects use profiles, the profiles
config is published as `profiles.config.json`, for a test suite to pass to its UTAM loader as
`<package>/profiles.config.json`. The compiler writes nothing into the repo; a relative `lint.lintingOutputFile` in
the project's compiler config is resolved against the working directory.
The npm version is derived from the Salesforce version number the same way `sfdx-project.json` writes a dependency
pin: `1.2.3.4` becomes `1.2.3-4`, with the git tag's suffix carried as a second prerelease identifier and as the
dist-tag, so `1.2.3.4` built from a `beta` package branch is `1.2.3-4.beta` at `beta`, and a release build is
`1.2.3-4` at `latest`.
The compiler is installed at run time rather than shipped with this plugin, so nothing is downloaded unless the
command actually runs.
Skips (without failing) when `SIMPLY_CICD_PACKAGE_CHANGED=FALSE` (or the deprecated `PACKAGE_CHANGED=FALSE`) is set in
the environment (see `build determine-package-changes`), when `--disabled` is passed, when no package version ID can
be found, when the project authors no page objects, or when this exact version is already on the registry — which is
what makes retrying a job that died after publishing succeed rather than fail on a version conflict. Any other failure
fails the job, including two page objects (or utilities) with the same file name, which would compile to the same
output file, and a compile that leaves any page object out: a missing or empty page-object package would silently
break every UI test pinned to that version.
On success, appends `SIMPLY_CICD_UTAM_PAGE_OBJECTS_PACKAGE` and `SIMPLY_CICD_UTAM_PAGE_OBJECTS_VERSION` to `--out`
(plus the deprecated `UTAM_PAGE_OBJECTS_PACKAGE` and `UTAM_PAGE_OBJECTS_VERSION`, which will be removed in a future
release), so a downstream job can install the package without knowing the mapping rule.
Registry authentication is not this command's job: set it up before the command runs, in user-level npm config (for
example `npm config set -- "//<registry host and path>/:_authToken=<token>"`, which writes `~/.npmrc`) or in an
`.npmrc` that `NPM_CONFIG_USERCONFIG` points at. npm runs from a staging directory outside the repo, so a
project-level `.npmrc` in the repo is not read.
Configure the package name, the compiler's type aliases, extra peer dependencies, and a project-owned compiler config
under `plugins.simply.utam` in `sfdx-project.json`.
EXAMPLES
Publish page objects for the version this pipeline just created, reading its ID from the dotenv file:
$ sf simply cicd build publish-utam-page-objects --packaging-devhub my-packaging-devhub
Publish to a GitLab project registry on a release-branch build:
$ sf simply cicd build publish-utam-page-objects --packaging-devhub my-packaging-devhub --ci-commit-ref-name \
release/1.2 --package-release-branch-prefix release/ --npm-registry \
https://gitlab.example.com/api/v4/projects/42/packages/npm/
Compile and pack without publishing, to inspect what would be produced:
$ sf simply cicd build publish-utam-page-objects --packaging-devhub my-packaging-devhub \
--subscriber-package-version-id 04tXXXXXXXXXXXXXXX --dry-run

See code: lib/commands/simply/cicd/build/publish-utam-page-objects.js

Push source to the scratch org created by build create-scratch.

USAGE
$ sf simply cicd build push-scratch [--json] [--flags-dir <value>] [--jwt-key-file <value>] [--debug] [--disabled]
[--ignore-warnings] [--scratch-org-source-dir <value>]
FLAGS
--debug [env: SIMPLY_CICD_DEBUG] Enable verbose debug logging.
--disabled [env: SIMPLY_CICD_DISABLED] Skip this job entirely, logging a warning instead of
running it.
--ignore-warnings Append --ignore-warnings to the underlying sf project deploy start call.
--jwt-key-file=<value> [env: SIMPLY_CICD_JWT_KEY_FILE] Path to the JWT private key file used to
re-authenticate the scratch org (or its Dev Hub) when it was JWT-authenticated. Not
needed when the Dev Hub was authenticated via web login or an SFDX auth URL — the
scratch org's own refresh token is used instead.
--scratch-org-source-dir=<value> Source directory to push to the scratch org, in addition to the default package
directory.
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Push source to the scratch org created by `build create-scratch`.
Reads `SCRATCH_ORG_INFO.json` (written by `build create-scratch`), authenticates as that scratch org, strips metadata
types the scratch org push doesn't support (Einstein Conversation Agent file types), and runs `sf project deploy
start`. When `--scratch-org-source-dir` is given, also deploys the default package directory's `seedMetadata.path`, if
declared in `sfdx-project.json`.
Skipped automatically when `SIMPLY_CICD_PACKAGE_CHANGED=FALSE` (or the deprecated `PACKAGE_CHANGED=FALSE`) is set in
the environment (see `build determine-package-changes`).
EXAMPLES
$ sf simply cicd build push-scratch --jwt-key-file ./server.key

See code: lib/commands/simply/cicd/build/push-scratch.js

Run Apex tests against the scratch org created by build create-scratch.

USAGE
$ sf simply cicd build test-scratch [--json] [--flags-dir <value>] [--jwt-key-file <value>] [--debug] [--disabled]
[--disable-apex-tests]
FLAGS
--debug [env: SIMPLY_CICD_DEBUG] Enable verbose debug logging.
--disable-apex-tests Skip running Apex tests, without skipping the rest of the job.
--disabled [env: SIMPLY_CICD_DISABLED] Skip this job entirely, logging a warning instead of running it.
--jwt-key-file=<value> [env: SIMPLY_CICD_JWT_KEY_FILE] Path to the JWT private key file used to re-authenticate the
scratch org (or its Dev Hub) when it was JWT-authenticated. Not needed when the Dev Hub was
authenticated via web login or an SFDX auth URL — the scratch org's own refresh token is used
instead.
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Run Apex tests against the scratch org created by `build create-scratch`.
Reads `SCRATCH_ORG_INFO.json` (written by `build create-scratch`), authenticates as that scratch org, and runs its
Apex tests with `RunLocalTests`.
Skipped automatically when `SIMPLY_CICD_PACKAGE_CHANGED=FALSE` (or the deprecated `PACKAGE_CHANGED=FALSE`) is set in
the environment (see `build determine-package-changes`).
EXAMPLES
$ sf simply cicd build test-scratch --jwt-key-file ./server.key

See code: lib/commands/simply/cicd/build/test-scratch.js