dcloud ci environments putCreate an environment or change its protection rules
Fields left out keep their value. `reviewers` are IAM user ids of this organization (up to six); one of them must approve each job. `deploymentBranchPolicy`: all, protected (branches with a protection rule) or custom (`deploymentPatterns`). Environment secrets are the org secrets environment with the same slug.
Synopsis
dcloud ci environments put repoId name [flags]Arguments
<repoId>Requiredstring
Also accepted as
--repo-id. Constraints: uuid<name>Requiredstring
Also accepted as
--name. Constraints: 1-255 chars
Flags
--urlOptionalstring
Link shown for the environment (where it is deployed), up to 2000 characters; null clears it; omitted: unchanged (none on a new environment)
Constraints: url, max 2000 chars
May be null.
--wait-timer-minutesOptionalnumber
Minutes a job waits at the environment before it continues, 0 to 43,200; omitted: unchanged (0 on a new environment). A job is held at most 5 h 30 min, so a longer timer never ends
Constraints: integer, 0-43200
--reviewersOptionalarray of string
IAM user ids of this organization (400 otherwise), up to 6; one of them must approve each job; empty: no review; omitted: unchanged (none on a new environment)
Constraints: uuid
--prevent-self-reviewOptionalboolean (--prevent-self-review / --no-prevent-self-review)
The person who started the run may not approve it; omitted: unchanged (off on a new environment)
--deployment-branch-policyOptionalenum
Which refs may deploy: all; protected (branches with a protection rule); custom (refs matching deploymentPatterns, which must then be in the same request, 400 otherwise); omitted: unchanged (all on a new environment)
One of:
all,protected,custom--deployment-patternsOptionalarray of json
Up to 50 { type: branch | tag, pattern } globs (pattern 1 to 255 characters), used by the custom policy; replaces the list; omitted: unchanged (none on a new environment)
Example
dcloud ci environments put repoId nameGenerated from the API description, the same one the API checks requests against and the CLI is built from.