You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .controlplane/readme.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,9 +71,11 @@ For production promotion, configure a protected GitHub Environment named
71
71
Protect the `production` environment with required reviewers, enable prevent
72
72
self-review, and consider disabling administrator bypass. Only release managers
73
73
or similarly trusted maintainers should be able to approve the promotion job.
74
-
The promotion workflow uses that environment before it can access
75
-
`CPLN_TOKEN_PRODUCTION`, so the production token is not exposed to ordinary
76
-
review-app or staging runs.
74
+
The generated caller passes `production_environment: production`; the upstream
75
+
reusable workflow runs its production job in that environment, so GitHub injects
76
+
`CPLN_TOKEN_PRODUCTION` only after the environment approval gate passes. The
77
+
production token is not exposed to ordinary review-app or staging runs.
78
+
77
79
Generated caller workflows pass only the named secrets each upstream workflow
78
80
needs. They do not use `secrets: inherit`; `CPLN_TOKEN_PRODUCTION` is supplied
79
81
only by the protected `production` Environment after approval.
@@ -502,7 +504,11 @@ The GitHub settings and Control Plane resources must match the app names in
502
504
`REVIEW_APP_PREFIX` unset and let the workflow infer
503
505
`qa-react-webpack-rails-tutorial`; generated review apps are named
504
506
`qa-react-webpack-rails-tutorial-<PR number>`.
505
-
If you have older review apps from the previous `qa-react-webpack-rails-tutorial-pr-<PR number>` naming, delete them manually after this flow lands; cleanup targets the current prefix convention.
507
+
If you have older review apps from the previous `qa-react-webpack-rails-tutorial-pr-<PR number>` naming, delete them manually after this flow lands; cleanup targets the current prefix convention. To inventory old apps, run:
Copy file name to clipboardExpand all lines: .github/cpflow-help.md
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,13 +35,15 @@ You asked for review app help. These commands are generated by [cpflow](https://
35
35
| Name | Required | Notes |
36
36
| --- | --- | --- |
37
37
|`CPLN_TOKEN_STAGING`| yes | Service-account token scoped to the staging Control Plane org on controlplane.com. |
38
-
|`CPLN_TOKEN_PRODUCTION`| yes for promote, as an environment secret | Store this as a secret on the protected `production` GitHub Environment, not as a repository or organization secret. |
38
+
|`CPLN_TOKEN_PRODUCTION`| yes for promote, as a production environment secret | Store this as a secret on the protected `production` GitHub Environment, not as a repository or organization secret. |
39
39
|`DOCKER_BUILD_SSH_KEY`| optional | Private SSH key used when Docker builds fetch private deps via `RUN --mount=type=ssh`. |
40
40
41
41
For normal generated review apps, `CPLN_TOKEN_STAGING` is the only required
42
42
GitHub setting. The review app prefix and staging org are inferred from
43
43
`.controlplane/controlplane.yml` when it defines exactly one app with
44
44
`match_if_app_name_starts_with: true`.
45
+
If more than one app has that flag, set `CPLN_ORG_STAGING` and
46
+
`REVIEW_APP_PREFIX` explicitly to disambiguate.
45
47
46
48
Those inferred values come from `.controlplane/controlplane.yml`: `cpln_org`
47
49
selects the Control Plane org and the app key with
@@ -52,8 +54,10 @@ expose a different public workload. Leave them unset for the standard setup.
52
54
53
55
For production promotion, create a GitHub Environment named `production`, add
54
56
required reviewers, enable prevent self-review, and store
55
-
`CPLN_TOKEN_PRODUCTION` as an environment secret there. The generated promotion
56
-
workflow uses that environment before it can access production secrets.
57
+
`CPLN_TOKEN_PRODUCTION` as an environment secret there. The generated caller
58
+
passes `production_environment: production`; the upstream reusable workflow
59
+
runs its production job in that environment, so GitHub injects
60
+
`CPLN_TOKEN_PRODUCTION` only after the environment approval gate passes.
57
61
Generated caller workflows pass only the named secrets each upstream workflow
58
62
needs. They do not use `secrets: inherit`; the production token is supplied by
59
63
the protected `production` Environment after approval.
@@ -63,9 +67,9 @@ the protected `production` Environment after approval.
63
67
| Name | Required | Notes |
64
68
| --- | --- | --- |
65
69
|`CPLN_ORG_STAGING`| optional for review apps; yes for staging | Override the staging/review Control Plane org inferred from `controlplane.yml`. |
66
-
|`CPLN_ORG_PRODUCTION`| yes for promote, preferably as environment variable | Control Plane org on controlplane.com for production. Prefer a `production` environment variable. |
70
+
|`CPLN_ORG_PRODUCTION`| yes for promote, preferably as production environment variable | Control Plane org on controlplane.com for production. Prefer a `production` environment variable. |
67
71
|`STAGING_APP_NAME`| yes | App name in `controlplane.yml` used as the staging deploy target. |
68
-
|`PRODUCTION_APP_NAME`| yes for promote, preferably as environment variable | App name in `controlplane.yml` used as the production deploy target. Prefer a `production` environment variable. |
72
+
|`PRODUCTION_APP_NAME`| yes for promote, preferably as production environment variable | App name in `controlplane.yml` used as the production deploy target. Prefer a `production` environment variable. |
69
73
|`REVIEW_APP_PREFIX`| optional | Override the review-app app key inferred from the `match_if_app_name_starts_with: true` entry in `controlplane.yml`. |
70
74
|`REVIEW_APP_DEPLOYING_ICON_URL`| optional, advanced | Cosmetic custom image URL for the animated deploying icon in review-app PR comments. Set to `none` to use the text fallback icon. |
71
75
|`STAGING_APP_BRANCH`| optional | Custom staging branch. Custom branches must also appear in `cpflow-deploy-staging.yml`'s push filter. |
@@ -81,7 +85,15 @@ the protected `production` Environment after approval.
81
85
Generated review app names use `<review-app-prefix>-<PR number>`, for example
82
86
`my-app-review-123`. If you are migrating from older local workflow glue that
83
87
created names like `<review-app-prefix>-pr-123`, delete those old review apps
84
-
manually after merging this flow.
88
+
manually after merging this flow. To inventory old apps, run:
0 commit comments