Skip to content

Commit 6565ded

Browse files
committed
Clarify production environment secret setup
1 parent 6378189 commit 6565ded

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

.controlplane/readme.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,17 @@ self-review, and consider disabling administrator bypass. Do not store
8989
promotion wrapper does not use `secrets: inherit`; GitHub exposes the production
9090
token only after the environment approval gate passes.
9191

92+
If promotion fails with
93+
`CPLN_TOKEN_PRODUCTION is not set. Add it as a secret on the 'production' GitHub Environment.`,
94+
the token is missing from the environment scope. A repository or organization
95+
secret with the same name is not enough for this workflow. Create or verify the
96+
environment secret with:
97+
98+
```sh
99+
gh secret set CPLN_TOKEN_PRODUCTION --repo shakacode/react-webpack-rails-tutorial --env production
100+
gh secret list --repo shakacode/react-webpack-rails-tutorial --env production
101+
```
102+
92103
The matching Control Plane resources are:
93104

94105
| Resource | Name |

.controlplane/shakacode-team.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ passes `production_environment: production`; the upstream reusable workflow runs
5959
its production job in that environment, and GitHub injects the production token
6060
only after approval.
6161

62+
If promotion fails with
63+
`CPLN_TOKEN_PRODUCTION is not set. Add it as a secret on the 'production' GitHub Environment.`,
64+
the token is missing from the environment scope. Configure it with:
65+
66+
```sh
67+
gh secret set CPLN_TOKEN_PRODUCTION --repo shakacode/react-webpack-rails-tutorial --env production
68+
gh secret list --repo shakacode/react-webpack-rails-tutorial --env production
69+
```
70+
6271
Generated caller workflows pass only the named secrets each upstream workflow
6372
needs. They do not use `secrets: inherit`; `CPLN_TOKEN_PRODUCTION` is supplied
6473
only by the protected `production` Environment after approval.

.github/cpflow-help.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ prevent self-review. The generated promotion wrapper passes only the staging
7070
token from repository secrets; GitHub injects `CPLN_TOKEN_PRODUCTION` only after
7171
the environment approval gate passes.
7272

73+
If promotion fails with
74+
`CPLN_TOKEN_PRODUCTION is not set. Add it as a secret on the 'production' GitHub Environment.`,
75+
the token is missing from the environment scope. A repository or organization
76+
secret with the same name is not enough for this workflow. Create or verify the
77+
environment secret with:
78+
79+
```sh
80+
gh secret set CPLN_TOKEN_PRODUCTION --repo shakacode/react-webpack-rails-tutorial --env production
81+
gh secret list --repo shakacode/react-webpack-rails-tutorial --env production
82+
```
83+
7384
Before the first promotion, bootstrap the production app the same way in the
7485
production org, using production-only secrets and values.
7586

0 commit comments

Comments
 (0)