Skip to content

Latest commit

 

History

History
46 lines (39 loc) · 2.4 KB

File metadata and controls

46 lines (39 loc) · 2.4 KB

Definition of an Environment on repository level, the following properties are supported:

Key Value Description Notes
name string The name of the environment
wait_timer int The amount of time to wait before allowing deployments to proceed
reviewers list[Actor] Users or Teams that may approve workflow runs that access this environment
deployment_branch_policy string Limit which branches can deploy to this environment based on rules or naming patterns all, protected or selected
branch_policies list[BranchOrTag] List of branch or tag patterns which can deploy to this environment only applicable if deployment_branch_policy is set to selected

Jsonnet Function

orgs.newEnvironment('<name>') {
  <key>: <value>
}

Validation rules

  • specifying a non-empty list of branch_policies while deployment_branch_policy is not set to selected triggers a warning

Example usage

=== "jsonnet" jsonnet orgs.newOrg('OtterdogTest') { ... _repositories+:: [ ... orgs.newRepo('test-repo') { ... environments: [ orgs.newEnvironment('linux') { deployment_branch_policy: "protected", reviewers+: [ "@OtterdogTest/eclipsefdn-security", "@netomi" ], wait_timer: 30, }, ] } ] }