-
Notifications
You must be signed in to change notification settings - Fork 19
Feature team_permission, EnvironmentVariable, EnvironmentSecret, and Team extended by team-sync and external-groups #585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
WolfgangFischerEtas
wants to merge
11
commits into
eclipse-csi:main
Choose a base branch
from
etas-contrib:feature/teampermission_release
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
75c28f2
Feature development: team with team-sync, external groups, team-permi…
WolfgangFischerEtas ad5268c
Merge remote-tracking branch 'upstream/main' into feature/teampermiss…
WolfgangFischerEtas f6fdfc8
chore: ruff finding
WolfgangFischerEtas fcff059
fix: removed double team definition
WolfgangFischerEtas 0d0d73e
Merge remote-tracking branch 'upstream/main' into feature/teampermiss…
WolfgangFischerEtas 9404cc0
fix: add # type: ignore to calm down mypy to ignore missing library s…
WolfgangFischerEtas 01d136b
Merge remote-tracking branch 'upstream/main' into feature/teampermiss…
WolfgangFischerEtas deb604f
Merge branch 'main' into feature/teampermission_release
WolfgangFischerEtas bb2acc9
Merge remote-tracking branch 'upstream/main' into feature/teampermiss…
WolfgangFischerEtas 5319611
Merge branch 'main' into feature/teampermission_release
WolfgangFischerEtas 619e596
Merge branch 'main' into feature/teampermission_release
WolfgangFischerEtas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
docs/reference/organization/repository/environment/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| 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](../actor.md)\] | 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](../branch-or-tag.md)\] | List of branch or tag patterns which can deploy to this environment | only applicable if `deployment_branch_policy` is set to `selected` | | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the settings for secrets and variables are missing afaict. |
||
| ## Jsonnet Function | ||
|
|
||
| ``` jsonnet | ||
| 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, | ||
| }, | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
64 changes: 64 additions & 0 deletions
64
docs/reference/organization/repository/environment/secret.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| Definition of a `Secret` on repository environment level, the following properties are supported: | ||
|
|
||
| | Key | Value | Description | Note | | ||
| |-------------------------|----------------|------------------------------------------------|------| | ||
| | _name_ | string | The name of the secret | | | ||
| | _value_ | string | The secret value | | | ||
|
|
||
| The secret value can be resolved via a credential provider. The supported format is `<credential_provider>:<provider specific data>`. | ||
|
|
||
| - Bitwarden: `bitwarden:<bitwarden item id>@<custom_field_key>` | ||
|
|
||
| ``` json | ||
| "secret": "bitwarden:118276ad-158c-4720-b68d-af8c00fe3481@secret" | ||
| ``` | ||
|
|
||
| - Pass: `pass:<path/to/secret>` | ||
|
|
||
| ``` json | ||
| "secret": "pass:path/to/repo/secret" | ||
| ``` | ||
|
|
||
| !!! note | ||
|
|
||
| After executing an `import` operation, the secret will be set to `********` as GitHub will not disclose the | ||
| secret value anymore via its API. You will need to update the configuration with the real secret value, either | ||
| by entering the secret value (not advised), or referencing it via a credential provider. | ||
|
|
||
| Secrets which have a redacted value defined will be skipped during processing. | ||
|
|
||
| ## Jsonnet Function | ||
|
|
||
| ``` jsonnet | ||
| orgs.newEnvSecret('<name>') { | ||
| <key>: <value> | ||
| } | ||
| ``` | ||
|
|
||
| ## Validation rules | ||
|
|
||
| - redacted secret values (`********`) trigger a validation info and will skip the secret during processing | ||
|
|
||
| ## Example usage | ||
|
|
||
| === "jsonnet" | ||
| ``` jsonnet | ||
| orgs.newOrg('OtterdogTest') { | ||
| ... | ||
| _repositories+:: [ | ||
| ... | ||
| orgs.newRepo('test-repo') { | ||
| ... | ||
| environments: [ | ||
| orgs.newEnvironment('Environment') { | ||
| secrets: [ | ||
| orgs.newEnvSecret('TEST_SECRET') { | ||
| value: "pass:path/to/secret", | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
| } | ||
| ] | ||
| } | ||
| ``` |
42 changes: 42 additions & 0 deletions
42
docs/reference/organization/repository/environment/variable.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| Definition of a `Variable` on repository environment level, the following properties are supported: | ||
|
|
||
| | Key | Value | Description | Note | | ||
| |-------------------------|----------------|--------------------------|------| | ||
| | _name_ | string | The name of the variable | | | ||
| | _value_ | string | The variable value | | | ||
|
|
||
| ## Jsonnet Function | ||
|
|
||
| ``` jsonnet | ||
| orgs.newEnvVariable('<name>') { | ||
| <key>: <value> | ||
| } | ||
| ``` | ||
|
|
||
| ## Validation rules | ||
|
|
||
| - None | ||
|
|
||
| ## Example usage | ||
|
|
||
| === "jsonnet" | ||
| ``` jsonnet | ||
| orgs.newOrg('OtterdogTest') { | ||
| ... | ||
| _repositories+:: [ | ||
| ... | ||
| orgs.newRepo('test-repo') { | ||
| ... | ||
| environments: [ | ||
| orgs.newEnvironment('Environment') { | ||
| variables: [ | ||
| orgs.newEnvVariable('TEST_VARIABLE') { | ||
| value: "TESTVALUE", | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
| } | ||
| ] | ||
| } | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| Definition of a `Team Permission`, the following properties are supported: | ||
|
|
||
| | Key | Value | Description | Notes | | ||
| |----------------------------|-----------------------------------------|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| | _name_ | string | The name of the team in the organization. | | | ||
| | _permission_ | string | The name of the permission. | allowed are the following: `pull`, `triage`, `push`, `maintain`, `admin` or `READ`, `WRITE`, `MAINTAIN`, `TRIAGE`, `ADMIN` (The latter values come from github graphql) | | ||
|
|
||
| ## Jsonnet Function | ||
|
|
||
| ``` jsonnet | ||
| orgs.newTeamPermission('<name>') { | ||
| <key>: <value> | ||
| } | ||
| ``` | ||
|
|
||
| ## Validation rules | ||
|
|
||
| - allowed values are the following `pull`, `triage`, `push`, `maintain`, `admin` or `READ`, `WRITE`, `MAINTAIN`, `TRIAGE`, `ADMIN`. | ||
|
|
||
| ## Example usage | ||
|
|
||
| === "jsonnet" | ||
| ``` jsonnet | ||
| orgs.newOrg('OtterdogTest') { | ||
| ... | ||
| _repositories+:: [ | ||
| ... | ||
| orgs.newRepo('test-repo') { | ||
| ... | ||
| team_permissions: [ | ||
| orgs.newTeamPermission('team') { | ||
| permission: "maintain", | ||
| }, | ||
| ], | ||
| } | ||
| ] | ||
| } | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this moves the existing file environment.md from the repository to a new directory which makes sense, but the existing file should be removed afaict.