Environment
sfp server environment
sfp server environmentManage environments in the SFP server
Commands
sfp server environment create- Create a new environmentsfp server environment list- List environments with filtering optionssfp server environment get- Get detailed environment informationsfp server environment lock- Lock environment for exclusive accesssfp server environment unlock- Unlock environmentsfp server environment delete- Delete an environment
sfp server environment create
sfp server environment createCreate a new environment in the server.
USAGE
$ sfp server environment create -n <value> [--json] [-t <value>] [-d <value>]
[--sfdx-auth-url <value>] [--repository <value>] [-e <value> | -a <value>]
[--sfp-server-url <value>] [-g <value>...] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
FLAGS
-n, --name=<value> (required) Name of the environment
-t, --type=<value> Environment type (production, staging, dev, sandbox)
-d, --description=<value> Description of the environment
--sfdx-auth-url=<value> SFDX auth URL for the Salesforce org
--repository=<value> Repository identifier (e.g., owner/repo)
-m, --metadata=<value> JSON metadata to associate with the environment
AUTHENTICATION
-e, --email=<value> Email address for authenticated CLI user
-a, --application-token=<value> Application token for authentication
--sfp-server-url=<value> URL of the SFP server
OTHER OPTIONS
--json Format output as json
-g, --logsgroupsymbol=<value>... Symbol used by CICD platform to group/collapse logs
--loglevel=<option> [default: info] logging level
<options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
DESCRIPTION
Create a new environment in the server
Environments represent Salesforce orgs (production, sandbox, scratch orgs)
that can be targets for deployments and releases.
EXAMPLES
$ sfp server environment create --name production --type production
$ sfp server environment create --name staging --type staging --description "Staging environment for UAT"
$ sfp server environment create --name dev-sandbox --type sandbox --sfdx-auth-url force://...
$ sfp server environment create --name qa-env --type sandbox --repository myorg/myreposfp server environment list
sfp server environment listList environments from the SFP server with optional filtering.
Output Formats
Standard Output:
Matrix Output (for CI/CD):
sfp server environment get
sfp server environment getGet detailed information about a specific environment.
sfp server environment lock
sfp server environment lockLock an environment for exclusive access.
Output:
sfp server environment unlock
sfp server environment unlockUnlock an environment using the ticket ID.
sfp server environment delete
sfp server environment deleteDelete an environment from the server.
Use Cases
CI/CD Pipeline with Environment Locking
Environment Matrix for Parallel Testing
Best Practices
Always Lock for Deployments: Lock environments during deployments to prevent conflicts
Use Wait with Timeout: In CI/CD, use
--waitwith appropriate timeout valuesAlways Unlock: Ensure environments are unlocked in finally/always blocks
Document Environment Types: Maintain clear naming conventions for environment types
Regular Cleanup: Remove unused environments to keep the list manageable
Note: Environment locks have automatic expiration to prevent indefinite locks from failed processes.
Warning: Deleting an environment only removes it from the SFP server. The actual Salesforce org remains unchanged.
Last updated