Skip to content

Environment variables

Every simply-cicd command flag can still be passed explicitly, but flags that represent common configuration — org credentials, VCS provider settings, CI pipeline context, file locations — can also be set once as an environment variable, typically in your CI platform’s project- or group-level variables. This avoids re-specifying the same values on every stage of a pipeline.

For every flag listed below, resolution order is:

  1. The CLI flag, if passed explicitly.
  2. The environment variable, if set.
  3. The flag’s hardcoded default, if it has one.

This is oclif’s built-in env flag option — there’s no custom parsing involved, so --help output for any command shows the exact environment variable name backing each flag.

All variables use the form SIMPLY_CICD_<FLAG_NAME>, uppercased with hyphens converted to underscores — e.g. --vcs-provider is backed by SIMPLY_CICD_VCS_PROVIDER. Flags that are inherently per-invocation (a specific package version ID, a --dry-run toggle passed once, --from/--to diff ranges) intentionally do not have an environment variable — only flags a team would reasonably want to set once across a whole pipeline are covered. Flags that accept multiple values (--dev-hub, --teams-webhook-url) also don’t have an environment variable — a single variable can’t cleanly represent a repeated flag, so these must still be passed explicitly, once per value.

Org aliases (deploy, build, notify commands)

Section titled “Org aliases (deploy, build, notify commands)”

simply-cicd never authenticates Salesforce orgs itself — every flag below just takes an alias that must already be authenticated by the pipeline before the command runs, however it chooses to do that (sf org login jwt, sf org login web, sf org login sfdx-url, or the Client Credentials flow available via @simplysf/simply-core).

FlagEnvironment variable
--aliasSIMPLY_CICD_ALIAS
--packaging-devhubSIMPLY_CICD_PACKAGING_DEVHUB

See DevHub (build commands) below for the scratch-org lifecycle’s --dev-hub/--jwt-key-file flags — the one place simply-cicd still authenticates on its own behalf.

FlagEnvironment variable
--vcs-providerSIMPLY_CICD_VCS_PROVIDER
--vcs-hostSIMPLY_CICD_VCS_HOST
--ci-job-tokenSIMPLY_CICD_CI_JOB_TOKEN
--project-access-tokenSIMPLY_CICD_PROJECT_ACCESS_TOKEN

CI/pipeline context (deploy, build, notify)

Section titled “CI/pipeline context (deploy, build, notify)”
FlagEnvironment variable
--ci-commit-ref-nameSIMPLY_CICD_CI_COMMIT_REF_NAME
--ci-commit-shaSIMPLY_CICD_CI_COMMIT_SHA
--ci-pipeline-idSIMPLY_CICD_CI_PIPELINE_ID
--ci-pipeline-urlSIMPLY_CICD_CI_PIPELINE_URL
--ci-pipeline-sourceSIMPLY_CICD_CI_PIPELINE_SOURCE
--ci-project-pathSIMPLY_CICD_CI_PROJECT_PATH
--ci-project-id (diff commands)SIMPLY_CICD_CI_PROJECT_ID
--ci-project-titleSIMPLY_CICD_CI_PROJECT_TITLE
--ci-environment-nameSIMPLY_CICD_CI_ENVIRONMENT_NAME
--ci-job-nameSIMPLY_CICD_CI_JOB_NAME
--ci-job-stageSIMPLY_CICD_CI_JOB_STAGE
--ci-job-statusSIMPLY_CICD_CI_JOB_STATUS
--ci-merge-request-iidSIMPLY_CICD_CI_MERGE_REQUEST_IID
--ci-merge-request-project-urlSIMPLY_CICD_CI_MERGE_REQUEST_PROJECT_URL
--ci-repository (diff commands)SIMPLY_CICD_CI_REPOSITORY
--ci-pull-request-number (diff commands)SIMPLY_CICD_CI_PULL_REQUEST_NUMBER
--ci-run-id (diff commands)SIMPLY_CICD_CI_RUN_ID
--ci-server-url (diff commands)SIMPLY_CICD_CI_SERVER_URL

The --ci-project-id/--ci-merge-request-iid pair is GitLab-only and the --ci-repository/--ci-pull-request-number/--ci-run-id/--ci-server-url group is GitHub-only; the diff commands read whichever set matches --vcs-provider. Most of these correspond 1:1 with a predefined CI variable of the same shape on their platform (e.g. CI_COMMIT_REF_NAME, CI_PIPELINE_ID) — set the SIMPLY_CICD_* variable to $CI_COMMIT_REF_NAME etc. once at the pipeline or job level rather than passing --ci-commit-ref-name "$CI_COMMIT_REF_NAME" on every command.

FlagEnvironment variable
--deploy-config-fileSIMPLY_CICD_DEPLOY_CONFIG_FILE
--deploy-progress-fileSIMPLY_CICD_DEPLOY_PROGRESS_FILE
--deploy-rules-fileSIMPLY_CICD_DEPLOY_RULES_FILE
--source-branch-nameSIMPLY_CICD_SOURCE_BRANCH_NAME
--test-levelSIMPLY_CICD_TEST_LEVEL
--test-suiteSIMPLY_CICD_TEST_SUITE
--testsSIMPLY_CICD_TESTS

The scratch-org lifecycle (build create-scratch/delete-scratch/cleanup-scratch-orgs/push-scratch/test-scratch/install-dependencies — see the scratch org lifecycle guide) is the one place simply-cicd still authenticates on its own behalf, because a scratch org’s username isn’t known until it’s created, so later stages (potentially in a fresh CI container) need to be able to mint a session for it on demand.

FlagEnvironment variable
--jwt-key-fileSIMPLY_CICD_JWT_KEY_FILE

--jwt-key-file is only accepted by install-dependencies/push-scratch/test-scratch/delete-scratch — the commands that re-authenticate the scratch org’s own identity after creation — and even there it’s only required when the Dev Hub that owns the scratch org was itself JWT-authenticated. A Dev Hub authenticated via web login or an SFDX auth URL leaves the scratch org with its own refresh token instead, which simply-cicd uses directly with no key file needed. create-scratch and cleanup-scratch-orgs never take --jwt-key-file at all — they only touch the Dev Hub itself, which is already authenticated by the pipeline, and sf org create scratch reads the Dev Hub’s key file path off that existing session internally. --dev-hub (create-scratch/cleanup-scratch-orgs/delete-scratch, one already-authenticated Dev Hub alias per repeated flag on the first two) accepts multiple values and is not backed by an environment variable — see the note on multi-value flags above.

FlagEnvironment variable
--enabledSIMPLY_CICD_ENABLED
--webhook-url (notify teams)SIMPLY_CICD_WEBHOOK_URL
--alm-base-urlSIMPLY_CICD_ALM_BASE_URL
--alm-project-keySIMPLY_CICD_ALM_PROJECT_KEY
--alm-providerSIMPLY_CICD_ALM_PROVIDER

--teams-webhook-url (notify project/notify happy-soup) accepts multiple values, one per Teams channel, and is not backed by an environment variable — see the note on multi-value flags above.

FlagEnvironment variable
--vcs-hostSIMPLY_CICD_VCS_HOST
--vcs-api-urlSIMPLY_CICD_VCS_API_URL
--vcs-tokenSIMPLY_CICD_VCS_TOKEN
--vcs-providerSIMPLY_CICD_VCS_PROVIDER
--root-group-idSIMPLY_CICD_ROOT_GROUP_ID
--devhub-usernameSIMPLY_CICD_DEVHUB_USERNAME
--dry-runSIMPLY_CICD_DRY_RUN
--project-allowlistSIMPLY_CICD_PROJECT_ALLOWLIST
--project-denylistSIMPLY_CICD_PROJECT_DENYLIST
--skip-archivedSIMPLY_CICD_SKIP_ARCHIVED
--skip-forksSIMPLY_CICD_SKIP_FORKS
--branch-prefixSIMPLY_CICD_BRANCH_PREFIX
--change-request-labelsSIMPLY_CICD_CHANGE_REQUEST_LABELS
--fail-on-errorSIMPLY_CICD_FAIL_ON_ERROR
--max-projectsSIMPLY_CICD_MAX_PROJECTS

sfdx-dependabot predates this convention and still honors its original SFDX_DEPENDABOT_* variables (e.g. SFDX_DEPENDABOT_VCS_API_URL, SFDX_DEPENDABOT_VCS_TOKEN) as a fallback below the SIMPLY_CICD_* variable in precedence, and --vcs-api-url additionally falls back to GitLab CI’s own CI_API_V4_URL if nothing else is set — so in a GitLab CI job you rarely need to set it explicitly at all. New pipelines should prefer the SIMPLY_CICD_* names.

Every command’s --debug flag is backed by SIMPLY_CICD_DEBUG. Every --disabled/--enabled guard flag is backed by SIMPLY_CICD_DISABLED/SIMPLY_CICD_ENABLED respectively, so a whole stage can be toggled off pipeline-wide by setting one CI/CD variable rather than editing every job.