-
Notifications
You must be signed in to change notification settings - Fork 19
Add environment variables/secrets, repository and org dependabot secrets #614
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
10
commits into
eclipse-csi:main
Choose a base branch
from
etas-contrib:feature/pr_environment
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
10 commits
Select commit
Hold shift + click to select a range
137ef10
feat: Added variables and secrets
WolfgangFischerEtas a468e5a
Merge branch 'main' into feature/pr_environment
WolfgangFischerEtas e33d3dc
Merge remote-tracking branch 'upstream/main' into feature/pr_environment
WolfgangFischerEtas 8c70648
fix: review findings
WolfgangFischerEtas f6ce440
fix: two warnings added if unexpected results detected for get_secret…
WolfgangFischerEtas eddae95
Merge branch 'main' into feature/pr_environment
WolfgangFischerEtas f44cf9c
Merge branch 'main' into feature/pr_environment
WolfgangFischerEtas 231583a
Merge branch 'main' into feature/pr_environment
WolfgangFischerEtas 21a862f
Merge branch 'main' into feature/pr_environment
WolfgangFischerEtas 731f206
Merge remote-tracking branch 'upstream/main' into feature/pr_environment
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| Definition of a `Codespaces Secret` on organization level, the following properties are supported: | ||
|
|
||
| | Key | Value | Description | Note | | ||
| |-------------------------|----------------|------------------------------------------------|------------------------------------------------------| | ||
| | _name_ | string | The name of the secret | | | ||
| | _selected_repositories_ | list[string] | List of repositories that can use the codespaces secret | only applicable if `visibility` is set to `selected` | | ||
| | _value_ | string | The codespaces secret value | | | ||
| | _visibility_ | string | Controls which repositories can use the codespaces secret | `public`, `private` or `selected` | | ||
|
|
||
| The codespaces 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/org/secret" | ||
| ``` | ||
|
|
||
| !!! note | ||
|
|
||
| After executing an `import` operation, the codespaces 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.newOrgCodespacesSecret('<name>') { | ||
| <key>: <value> | ||
| } | ||
| ``` | ||
|
|
||
| ## Validation rules | ||
|
|
||
| - redacted codespaces secret values (`********`) trigger a validation info and will skip the secret during processing | ||
| - `visibility` of `private` is not supported by GitHub with a billing plan of type `free` | ||
| - specifying a non-empty list of `selected_repositories` while `visibility` is not set to `selected` triggers a warning | ||
|
|
||
| ## Example usage | ||
|
|
||
| === "jsonnet" | ||
| ``` jsonnet | ||
| orgs.newOrg('OtterdogTest') { | ||
| ... | ||
| secrets+: [ | ||
| orgs.newOrgCodespacesSecret('TEST_CODESPACES_SECRET') { | ||
| selected_repositories+: [ | ||
| "test-repo" | ||
| ], | ||
| value: "pass:path/to/my/secret/value", | ||
| visibility: "selected", | ||
| }, | ||
| ], | ||
| ... | ||
| } | ||
| ``` | ||
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,63 @@ | ||
| Definition of a `Dependabot Secret` on organization level, the following properties are supported: | ||
|
|
||
| | Key | Value | Description | Note | | ||
| |-------------------------|----------------|------------------------------------------------|------------------------------------------------------| | ||
| | _name_ | string | The name of the secret | | | ||
| | _selected_repositories_ | list[string] | List of repositories that can use the dependabot secret | only applicable if `visibility` is set to `selected` | | ||
| | _value_ | string | The dependabot secret value | | | ||
| | _visibility_ | string | Controls which repositories can use the dependabot secret | `public`, `private` or `selected` | | ||
|
|
||
| The dependabot 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/org/secret" | ||
| ``` | ||
|
|
||
| !!! note | ||
|
|
||
| After executing an `import` operation, the dependabot 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.newOrgDependabotSecret('<name>') { | ||
| <key>: <value> | ||
| } | ||
| ``` | ||
|
|
||
| ## Validation rules | ||
|
|
||
| - redacted dependabot secret values (`********`) trigger a validation info and will skip the secret during processing | ||
| - `visibility` of `private` is not supported by GitHub with a billing plan of type `free` | ||
| - specifying a non-empty list of `selected_repositories` while `visibility` is not set to `selected` triggers a warning | ||
|
|
||
| ## Example usage | ||
|
|
||
| === "jsonnet" | ||
| ``` jsonnet | ||
| orgs.newOrg('OtterdogTest') { | ||
| ... | ||
| secrets+: [ | ||
| orgs.newOrgDependabotSecret('TEST_DEPENDABOT_SECRET') { | ||
| selected_repositories+: [ | ||
| "test-repo" | ||
| ], | ||
| value: "pass:path/to/my/secret/value", | ||
| visibility: "selected", | ||
| }, | ||
| ], | ||
| ... | ||
| } | ||
| ``` |
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
60 changes: 60 additions & 0 deletions
60
docs/reference/organization/repository/codespaces_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,60 @@ | ||
| Definition of a `Codespaces Secret` on repository level, the following properties are supported: | ||
|
|
||
| | Key | Value | Description | Note | | ||
| |-------------------------|----------------|------------------------------------------------|------| | ||
| | _name_ | string | The name of the secret | | | ||
| | _value_ | string | The secret value | | | ||
|
|
||
| The codespaces 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 codespaces 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.newRepoCodespacesSecret('<name>') { | ||
| <key>: <value> | ||
| } | ||
| ``` | ||
|
|
||
| ## Validation rules | ||
|
|
||
| - redacted dependabot secret values (`********`) trigger a validation info and will skip the secret during processing | ||
|
WolfgangFischerEtas marked this conversation as resolved.
|
||
|
|
||
| ## Example usage | ||
|
|
||
| === "jsonnet" | ||
| ``` jsonnet | ||
| orgs.newOrg('OtterdogTest') { | ||
| ... | ||
| _repositories+:: [ | ||
| ... | ||
| orgs.newRepo('test-repo') { | ||
| ... | ||
| codespaces_secrets+: [ | ||
| orgs.newRepoCodespacesSecret('TEST_CODESPACES_SECRET') { | ||
| value: "pass:path/to/secret", | ||
| }, | ||
| ], | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
60 changes: 60 additions & 0 deletions
60
docs/reference/organization/repository/dependabot_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,60 @@ | ||
| Definition of a `Dependabot Secret` on repository level, the following properties are supported: | ||
|
|
||
| | Key | Value | Description | Note | | ||
| |-------------------------|----------------|------------------------------------------------|------| | ||
| | _name_ | string | The name of the secret | | | ||
| | _value_ | string | The secret value | | | ||
|
|
||
| The dependabot 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 dependabot 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.newRepoDependabotSecret('<name>') { | ||
| <key>: <value> | ||
| } | ||
| ``` | ||
|
|
||
| ## Validation rules | ||
|
|
||
| - redacted codespaces 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') { | ||
| ... | ||
| dependabot_secrets+: [ | ||
| orgs.newRepoDependabotSecret('TEST_DEPENDABOT_SECRET') { | ||
| value: "pass:path/to/secret", | ||
| }, | ||
| ], | ||
| } | ||
| ] | ||
| } | ||
| ``` |
This file was deleted.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.