environment¶
Manage the targeted repository’s (deployment) environments.
Added in version 1.1.0.
Part of the github resource type: states operate on the repository
the state run was dispatched to, so there is no repo_name/owner
parameter. The profile parameter defaults to the profile named in
the resource declaration.
- saltext.github.resources.github.states.environment.present(name, wait_timer=None, prevent_self_review=None, reviewers=None, deployment_branches=None, profile=None)[source]¶
Ensure an environment is present in the targeted repository and configured as specified. Unspecified settings are left unmanaged.
Example:
release: environment.present: - deployment_branches: - main
- name
Name of the environment.
- wait_timer
Amount of time to delay a job after it is initially triggered, in minutes.
- prevent_self_review
Prevent a user who created a job from approving it.
- reviewers
People or teams that may review jobs that reference the environment, as a list of mappings with
type(UserorTeam) andid.- deployment_branches
Which branches can deploy to this environment. Either
all,protected(branches with branch protection rules) or a list of branch name patterns.- profile
Profile configuration name to use. Defaults to the resource declaration’s profile.