-
Notifications
You must be signed in to change notification settings - Fork 373
Clarify production environment secret setup #753
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -89,6 +89,19 @@ self-review, and consider disabling administrator bypass. Do not store | |||||||
| promotion wrapper does not use `secrets: inherit`; GitHub exposes the production | ||||||||
| token only after the environment approval gate passes. | ||||||||
|
|
||||||||
| If promotion fails with | ||||||||
| `CPLN_TOKEN_PRODUCTION is not set. Add it as a secret on the 'production' GitHub Environment.`, | ||||||||
| the token is missing from the environment scope. A repository or organization | ||||||||
| secret with the same name is not enough for this workflow. Create or verify the | ||||||||
| environment secret with: | ||||||||
| You need permission to manage repository environments and secrets to run these | ||||||||
| commands. | ||||||||
|
|
||||||||
| ```sh | ||||||||
| gh secret set CPLN_TOKEN_PRODUCTION --repo shakacode/react-webpack-rails-tutorial --env production | ||||||||
|
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.
Suggested change
|
||||||||
| gh secret list --repo shakacode/react-webpack-rails-tutorial --env production | ||||||||
| ``` | ||||||||
|
|
||||||||
| The matching Control Plane resources are: | ||||||||
|
|
||||||||
| | Resource | Name | | ||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -59,6 +59,19 @@ passes `production_environment: production`; the upstream reusable workflow runs | |||||||||||||
| its production job in that environment, and GitHub injects the production token | ||||||||||||||
| only after approval. | ||||||||||||||
|
|
||||||||||||||
| If promotion fails with | ||||||||||||||
| `CPLN_TOKEN_PRODUCTION is not set. Add it as a secret on the 'production' GitHub Environment.`, | ||||||||||||||
| the token is missing from the environment scope. A repository or organization | ||||||||||||||
| secret with the same name is not enough for this workflow. Create or verify the | ||||||||||||||
| environment secret with: | ||||||||||||||
| You need permission to manage repository environments and secrets to run these | ||||||||||||||
| commands. | ||||||||||||||
|
Comment on lines
+65
to
+68
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. Same prose-flow issue as in
Suggested change
|
||||||||||||||
|
|
||||||||||||||
|
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 other two files (
This is the key clarification that prevents confusion. It's missing here, leaving team members without the explicit warning.
Suggested change
Member
Author
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. Fixed in f76c3a1 by adding the missing repository/organization-secret warning to |
||||||||||||||
| ```sh | ||||||||||||||
| gh secret set CPLN_TOKEN_PRODUCTION --repo shakacode/react-webpack-rails-tutorial --env production | ||||||||||||||
| gh secret list --repo shakacode/react-webpack-rails-tutorial --env production | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| Generated caller workflows pass only the named secrets each upstream workflow | ||||||||||||||
| needs. They do not use `secrets: inherit`; `CPLN_TOKEN_PRODUCTION` is supplied | ||||||||||||||
| only by the protected `production` Environment after approval. | ||||||||||||||
|
|
||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -70,6 +70,19 @@ prevent self-review. The generated promotion wrapper passes only the staging | |||||||||||||
| token from repository secrets; GitHub injects `CPLN_TOKEN_PRODUCTION` only after | ||||||||||||||
| the environment approval gate passes. | ||||||||||||||
|
|
||||||||||||||
| If promotion fails with | ||||||||||||||
| `CPLN_TOKEN_PRODUCTION is not set. Add it as a secret on the 'production' GitHub Environment.`, | ||||||||||||||
| the token is missing from the environment scope. A repository or organization | ||||||||||||||
| secret with the same name is not enough for this workflow. Create or verify the | ||||||||||||||
| environment secret with: | ||||||||||||||
| You need permission to manage repository environments and secrets to run these | ||||||||||||||
| commands. | ||||||||||||||
|
Comment on lines
+76
to
+79
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. Same prose-flow issue — permission note interrupts the colon→code-block expectation.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| ```sh | ||||||||||||||
| gh secret set CPLN_TOKEN_PRODUCTION --repo shakacode/react-webpack-rails-tutorial --env production | ||||||||||||||
| gh secret list --repo shakacode/react-webpack-rails-tutorial --env production | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| Before the first promotion, bootstrap the production app the same way in the | ||||||||||||||
| production org, using production-only secrets and values. | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
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.
The permission note was inserted between the colon-ending sentence and its code block, breaking the prose flow. A sentence ending with
:implies the code block immediately follows — a reader following the colon lands on a second sentence instead.Consider either folding the caveat into the lead-in line or placing it after the block: