Review Environments

Create an assignment rule for automatic pool or environment resolution

sfp server review-envs rules create

Create an assignment rule for automatic pool or environment resolution

USAGE
  $ sfp server review-envs rules create -r <value> -b <value> --priority <value> [--json] [-e <value>] [-t <value>] [--sfp-server-url
    <value>] [-g <value>...] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] [-p
    <value> | -e <value>] [-d <value>...] [--description <value>] [--inactive] [--pool-type SANDBOX|SCRATCH_ORG]

FLAGS
  -b, --branch=<value>              (required) Git branch pattern (supports wildcards: *, feature/*, */hotfix)
  -d, --domain=<value>...           SFP domain pattern(s) - can be specified multiple times or comma-separated (supports
                                    wildcards: *, sales-*, *-analytics). Leave empty to match any domain
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -e, --environment-name=<value>    Dedicated environment name to assign when patterns match (mutually exclusive with
                                    --pool-tag)
  -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.
  -p, --pool-tag=<value>            Pool tag to assign when patterns match (mutually exclusive with --environment-name)
  -r, --repository=<value>          (required) Repository identifier in format owner/repo (GitHub/GitLab) or
                                    org/project/repo (Azure DevOps)
  -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).
      --description=<value>         Description of the assignment rule
      --inactive                    Create the rule as inactive
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --pool-type=<option>          Type of pool (SANDBOX or SCRATCH_ORG). If not specified, the server will auto-detect
                                    based on the pool tag
                                    <options: SANDBOX|SCRATCH_ORG>
      --priority=<value>            (required) Priority for conflict resolution (0-1000, higher wins)
      --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

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Create an assignment rule for automatic pool or environment resolution

EXAMPLES
  $ sfp server review-envs rules create --repository myorg/myrepo --pool-tag feature_dev --branch "feature/*" --domain "sales" --domain "service" --priority 10

  $ sfp server review-envs rules create --repository myorg/myrepo --pool-tag prod --branch main --domain "*" --priority 100 --description "Production branch uses prod pool"

  $ sfp server review-envs rules create --repository myorg/myrepo --pool-tag hotfix --branch "hotfix/*" --priority 50 --description "Hotfix branches match any domain"

  $ sfp server review-envs rules create --repository myorg/myrepo --environment-name my-review-env --branch main --priority 100 --description "Main branch uses dedicated environment"

  $ sfp server review-envs rules create --repository myorg/myrepo --pool-tag scratch_dev --branch "dev/*" --priority 30 --pool-type SCRATCH_ORG

See code: src/commands/server/review-envs/rules/create.tsarrow-up-right

sfp server review-envs rules delete ID

Delete a pool assignment rule

See code: src/commands/server/review-envs/rules/delete.tsarrow-up-right

sfp server review-envs rules update ID

Update a pool assignment rule

See code: src/commands/server/review-envs/rules/update.tsarrow-up-right

Last updated

Was this helpful?