22
33These commands are generated by [ cpflow] ( https://github.com/shakacode/control-plane-flow ) .
44For full setup, version-pinning, and troubleshooting details, see the upstream
5- [ CI automation guide] ( https://github.com/shakacode/control-plane-flow/blob/v5.0.4 /docs/ci-automation.md ) .
5+ [ CI automation guide] ( https://github.com/shakacode/control-plane-flow/blob/9ef104c246670d6c1ea4132dfd22be68ef930a70 /docs/ci-automation.md ) .
66
77## Pull Request Commands
88
@@ -23,23 +23,11 @@ For the normal generated review-app path, GitHub needs one repository secret:
2323| --- | --- | --- |
2424| ` CPLN_TOKEN_STAGING ` | Repository secret | Control Plane service-account token for the staging/review org. |
2525
26- For public repositories, use a staging/review token that cannot access
27- production Control Plane resources. Generated review-app deploys skip fork PR
28- heads because Docker builds use repository secrets. If a forked change needs a
29- review app, first move the reviewed change to a trusted branch in this
30- repository.
31-
3226No repository variables are required for the standard review-app path when
3327` .controlplane/controlplane.yml ` has exactly one review app entry with
3428` match_if_app_name_starts_with: true ` . cpflow infers the review-app prefix and
3529staging org from that config.
3630
37- Review apps run pull request code. Any value mounted through
38- ` cpln://secret/... ` can be read by that code after the workload starts, so keep
39- review-app secret dictionaries limited to disposable databases, review-only
40- renderer credentials, and license values that are acceptable for review-app
41- exposure.
42-
4331Optional overrides exist for forks, clones, and unusual apps:
4432
4533| Name | Notes |
@@ -89,7 +77,7 @@ normal environment-gated job cannot tell which secret scope supplied a nonempty
8977value, so a broader secret with the same name can mask a missing environment
9078secret.
9179
92- If promotion fails with
80+ If the promotion workflow fails with
9381` CPLN_TOKEN_PRODUCTION is not set. Add it as a secret on the 'production' GitHub Environment. ` ,
9482the token is missing from the environment scope or the workflow job is no longer
9583declaring ` environment: production ` . Create or verify the environment secret
@@ -98,27 +86,31 @@ You need permission to manage repository environments and secrets to run these
9886commands.
9987
10088``` sh
101- gh secret set CPLN_TOKEN_PRODUCTION --repo shakacode/react-webpack-rails-tutorial --env production
102- gh secret list --repo shakacode/react-webpack-rails-tutorial --env production
103- gh secret list --repo shakacode/react-webpack-rails-tutorial
104- gh secret list --org shakacode | grep ' ^CPLN_TOKEN_PRODUCTION[[:space:]]' || true
89+ gh secret set CPLN_TOKEN_PRODUCTION --repo OWNER/REPO --env production
90+ # Paste the token value when prompted.
91+ gh secret list --repo OWNER/REPO --env production
92+ gh secret list --repo OWNER/REPO
93+ gh secret list --org OWNER | grep ' ^CPLN_TOKEN_PRODUCTION[[:space:]]' || true
10594```
10695
10796Before the first promotion, bootstrap the production app the same way in the
10897production org, using production-only secrets and values.
10998
11099## Version Locking
111100
112- Generated wrappers pin Control Plane Flow with a release tag, for example
113- ` v5.0.4 ` . Reusable review-app, staging, cleanup, and helper workflows pin the
114- tag in their ` uses: ` ref. Production promotion pins the same tag in the
115- ` Checkout control-plane-flow actions ` step so the caller-owned job can keep
101+ Generated wrappers normally pin Control Plane Flow with a release tag, for
102+ example ` v5.1.0 ` . This branch temporarily pins the wrappers to upstream commit
103+ ` 9ef104c246670d6c1ea4132dfd22be68ef930a70 ` while testing unreleased production
104+ promotion hardening. Reusable review-app, staging, cleanup, and helper workflows
105+ pin that ref in their ` uses: ` entry. Production promotion pins the same ref in
106+ the ` Checkout control-plane-flow actions ` step so the caller-owned job can keep
116107` environment: production ` and receive production environment secrets directly.
117108
118109Leave ` CPFLOW_VERSION ` unset so the workflow builds cpflow from the same
119110checked-out upstream source. If you set ` CPFLOW_VERSION ` , it must match the
120- release tag, for example ` CPFLOW_VERSION=5.0.4 ` with a wrapper pinned to
121- ` uses: ...@v5.0.4 ` .
111+ release tag your wrappers are pinned to: a ` CPFLOW_VERSION=5.1.x ` runtime
112+ override goes with a wrapper pinned to ` uses: ...@v5.1.x ` (substitute the
113+ release you pinned above).
122114
123115After updating the ` cpflow ` gem in this repo, update the generated wrappers in
124116the same PR:
@@ -151,7 +143,7 @@ Most apps do not need these:
151143| Name | Notes |
152144| --- | --- |
153145| ` DOCKER_BUILD_EXTRA_ARGS ` | Newline-delimited extra Docker build tokens. |
154- | ` DOCKER_BUILD_SSH_KEY ` | Read-only, revocable deploy key for Docker builds that fetch private dependencies. Do not use a personal SSH key . |
146+ | ` DOCKER_BUILD_SSH_KEY ` | Private SSH key for Docker builds that fetch private dependencies. |
155147| ` DOCKER_BUILD_SSH_KNOWN_HOSTS ` | SSH known_hosts entries when SSH build hosts are not GitHub.com. |
156148| ` REVIEW_APP_DEPLOYING_ICON_URL ` | Cosmetic custom image URL for the animated deploying icon. Set to ` none ` to use the text fallback icon. |
157149| ` STAGING_APP_BRANCH ` | Custom staging branch. The branch must also appear in ` cpflow-deploy-staging.yml ` 's push filter. |
0 commit comments