Skip to content

Commit 13ef071

Browse files
committed
Regenerate promotion wrappers after review follow-ups
1 parent f546d79 commit 13ef071

10 files changed

Lines changed: 35 additions & 23 deletions

.controlplane/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ For this repo, the update loop is:
577577
1. Generate from the desired `cpflow` release with `--staging-branch master`.
578578
2. Keep generated refs on a release tag once the upstream hardening changes ship.
579579
This branch temporarily pins refs to
580-
`9ef104c246670d6c1ea4132dfd22be68ef930a70` to test upstream promotion
580+
`01dd1d231ce3d8849bcb7ed36b9fd9d184eb3350` to test upstream promotion
581581
hardening before the next release tag. Leave `CPFLOW_VERSION` unset while
582582
testing a commit SHA.
583583
3. Keep app names and GitHub settings aligned with `.controlplane/controlplane.yml`.

.controlplane/shakacode-team.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Advanced optional settings are documented upstream in the
118118
[`control-plane-flow` CI automation guide](https://github.com/shakacode/control-plane-flow/blob/main/docs/ci-automation.md).
119119

120120
Current workflow wrappers are temporarily pinned to upstream
121-
`control-plane-flow` commit `9ef104c246670d6c1ea4132dfd22be68ef930a70` to test
121+
`control-plane-flow` commit `01dd1d231ce3d8849bcb7ed36b9fd9d184eb3350` to test
122122
promotion hardening before it ships in a release tag. Keep release tags as the
123123
steady-state configuration once the upstream PR is released; use a full commit
124124
SHA only for short-lived upstream PR testing and leave `CPFLOW_VERSION` unset in

.github/cpflow-help.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
These commands are generated by [cpflow](https://github.com/shakacode/control-plane-flow).
44
For full setup, version-pinning, and troubleshooting details, see the upstream
5-
[CI automation guide](https://github.com/shakacode/control-plane-flow/blob/9ef104c246670d6c1ea4132dfd22be68ef930a70/docs/ci-automation.md).
5+
[CI automation guide](https://github.com/shakacode/control-plane-flow/blob/01dd1d231ce3d8849bcb7ed36b9fd9d184eb3350/docs/ci-automation.md).
66

77
## Pull Request Commands
88

@@ -23,11 +23,23 @@ 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+
2632
No repository variables are required for the standard review-app path when
2733
`.controlplane/controlplane.yml` has exactly one review app entry with
2834
`match_if_app_name_starts_with: true`. cpflow infers the review-app prefix and
2935
staging org from that config.
3036

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+
3143
Optional overrides exist for forks, clones, and unusual apps:
3244

3345
| Name | Notes |
@@ -100,11 +112,12 @@ production org, using production-only secrets and values.
100112

101113
Generated wrappers normally pin Control Plane Flow with a release tag, for
102114
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
107-
`environment: production` and receive production environment secrets directly.
115+
`01dd1d231ce3d8849bcb7ed36b9fd9d184eb3350` while testing merged-but-unreleased
116+
production promotion hardening. Reusable review-app, staging, cleanup, and
117+
helper workflows pin that ref in their `uses:` entry. Production promotion pins
118+
the same ref in the `Checkout control-plane-flow actions` step so the
119+
caller-owned job can keep `environment: production` and receive production
120+
environment secrets directly.
108121

109122
Leave `CPFLOW_VERSION` unset so the workflow builds cpflow from the same
110123
checked-out upstream source. If you set `CPFLOW_VERSION`, it must match the
@@ -143,7 +156,7 @@ Most apps do not need these:
143156
| Name | Notes |
144157
| --- | --- |
145158
| `DOCKER_BUILD_EXTRA_ARGS` | Newline-delimited extra Docker build tokens. |
146-
| `DOCKER_BUILD_SSH_KEY` | Private SSH key for Docker builds that fetch private dependencies. |
159+
| `DOCKER_BUILD_SSH_KEY` | Read-only, revocable deploy key for Docker builds that fetch private dependencies. Do not use a personal SSH key. |
147160
| `DOCKER_BUILD_SSH_KNOWN_HOSTS` | SSH known_hosts entries when SSH build hosts are not GitHub.com. |
148161
| `REVIEW_APP_DEPLOYING_ICON_URL` | Cosmetic custom image URL for the animated deploying icon. Set to `none` to use the text fallback icon. |
149162
| `STAGING_APP_BRANCH` | Custom staging branch. The branch must also appear in `cpflow-deploy-staging.yml`'s push filter. |

.github/workflows/cpflow-cleanup-stale-review-apps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ jobs:
1212
cleanup:
1313
# Cleanup targets the current inferred review-app prefix. If you changed
1414
# naming conventions, manually delete review apps under the old prefix.
15-
uses: shakacode/control-plane-flow/.github/workflows/cpflow-cleanup-stale-review-apps.yml@9ef104c246670d6c1ea4132dfd22be68ef930a70
15+
uses: shakacode/control-plane-flow/.github/workflows/cpflow-cleanup-stale-review-apps.yml@01dd1d231ce3d8849bcb7ed36b9fd9d184eb3350
1616
secrets:
1717
CPLN_TOKEN_STAGING: ${{ secrets.CPLN_TOKEN_STAGING }}

.github/workflows/cpflow-delete-review-app.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ jobs:
3131
github.event_name == 'workflow_dispatch'
3232
# This `if:` mirrors the upstream job guard to avoid a billable workflow_call
3333
# when the event does not match. Keep both conditions in sync.
34-
uses: shakacode/control-plane-flow/.github/workflows/cpflow-delete-review-app.yml@9ef104c246670d6c1ea4132dfd22be68ef930a70
34+
uses: shakacode/control-plane-flow/.github/workflows/cpflow-delete-review-app.yml@01dd1d231ce3d8849bcb7ed36b9fd9d184eb3350
3535
secrets:
3636
CPLN_TOKEN_STAGING: ${{ secrets.CPLN_TOKEN_STAGING }}

.github/workflows/cpflow-deploy-review-app.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
github.event.issue.pull_request &&
3131
contains(fromJson('["+review-app-deploy","+review-app-deploy\n","+review-app-deploy\r\n"]'), github.event.comment.body) &&
3232
contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association))
33-
uses: shakacode/control-plane-flow/.github/workflows/cpflow-deploy-review-app.yml@9ef104c246670d6c1ea4132dfd22be68ef930a70
33+
uses: shakacode/control-plane-flow/.github/workflows/cpflow-deploy-review-app.yml@01dd1d231ce3d8849bcb7ed36b9fd9d184eb3350
3434
secrets:
3535
CPLN_TOKEN_STAGING: ${{ secrets.CPLN_TOKEN_STAGING }}
3636
DOCKER_BUILD_SSH_KEY: ${{ secrets.DOCKER_BUILD_SSH_KEY }}

.github/workflows/cpflow-deploy-staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ permissions:
1616

1717
jobs:
1818
deploy-staging:
19-
uses: shakacode/control-plane-flow/.github/workflows/cpflow-deploy-staging.yml@9ef104c246670d6c1ea4132dfd22be68ef930a70
19+
uses: shakacode/control-plane-flow/.github/workflows/cpflow-deploy-staging.yml@01dd1d231ce3d8849bcb7ed36b9fd9d184eb3350
2020
with:
2121
staging_app_branch_default: "master"
2222
secrets:

.github/workflows/cpflow-help-command.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323
contains(fromJson('["+review-app-help","+review-app-help\n","+review-app-help\r\n"]'), github.event.comment.body) &&
2424
contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) ||
2525
github.event_name == 'workflow_dispatch'
26-
uses: shakacode/control-plane-flow/.github/workflows/cpflow-help-command.yml@9ef104c246670d6c1ea4132dfd22be68ef930a70
26+
uses: shakacode/control-plane-flow/.github/workflows/cpflow-help-command.yml@01dd1d231ce3d8849bcb7ed36b9fd9d184eb3350

.github/workflows/cpflow-promote-staging-to-production.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
7070
with:
7171
repository: shakacode/control-plane-flow
72-
ref: 9ef104c246670d6c1ea4132dfd22be68ef930a70
72+
ref: 01dd1d231ce3d8849bcb7ed36b9fd9d184eb3350
7373
path: .cpflow
7474
persist-credentials: false
7575

@@ -179,7 +179,7 @@ jobs:
179179
cpln_cli_version: ${{ vars.CPLN_CLI_VERSION }}
180180
cpflow_version: ${{ vars.CPFLOW_VERSION }}
181181
# The setup action validates CPFLOW_VERSION against this full workflow ref.
182-
control_plane_flow_ref: shakacode/control-plane-flow/.github/workflows/cpflow-promote-staging-to-production.yml@9ef104c246670d6c1ea4132dfd22be68ef930a70
182+
control_plane_flow_ref: shakacode/control-plane-flow/.github/workflows/cpflow-promote-staging-to-production.yml@01dd1d231ce3d8849bcb7ed36b9fd9d184eb3350
183183

184184
# Runs after Setup production environment so the pinned Ruby (>= 3.1) is on PATH.
185185
# YAML.load_file(..., aliases: true) is not supported on Ruby 3.0 (system Ruby on ubuntu-22.04).
@@ -307,6 +307,9 @@ jobs:
307307
fi
308308
}
309309
310+
# check_required_vars intentionally mutates env_check_failed in this
311+
# shell; keep calls outside subshells so failures aggregate before the
312+
# final exit.
310313
env_check_failed=0
311314
312315
staging_vars="$(list_gvc_env_names "${CPLN_TOKEN_STAGING}" "${CPLN_ORG_STAGING}" "${STAGING_APP_NAME}")"
@@ -467,13 +470,9 @@ jobs:
467470
copy_image_attempts=$((copy_image_retries + 1))
468471
copy_image_retry_interval=$((10#${COPY_IMAGE_RETRY_INTERVAL}))
469472
470-
if [[ "${STAGING_IMAGE}" == *@* ]]; then
471-
staging_image="${STAGING_IMAGE}"
472-
else
473-
staging_image="${STAGING_IMAGE%%@*}"
474-
fi
473+
staging_image="${STAGING_IMAGE}"
475474
if [[ -z "${staging_image}" ]]; then
476-
echo "::error::Staging image '${STAGING_IMAGE}' did not contain a usable image reference."
475+
echo "::error::STAGING_IMAGE is not set or is empty."
477476
exit 1
478477
fi
479478

.github/workflows/cpflow-review-app-help.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
# to PR-open help. Remove it, or uncomment and adapt this guard, if forks or
1919
# clones should stay quiet until Control Plane is configured:
2020
# if: vars.REVIEW_APP_PREFIX != '' || vars.CPLN_ORG_STAGING != ''
21-
uses: shakacode/control-plane-flow/.github/workflows/cpflow-review-app-help.yml@9ef104c246670d6c1ea4132dfd22be68ef930a70
21+
uses: shakacode/control-plane-flow/.github/workflows/cpflow-review-app-help.yml@01dd1d231ce3d8849bcb7ed36b9fd9d184eb3350

0 commit comments

Comments
 (0)