Skip to content

Commit 9e5a0dd

Browse files
committed
Regenerate cpflow wrappers from merged upstream
1 parent 4eea355 commit 9e5a0dd

13 files changed

Lines changed: 54 additions & 57 deletions

.controlplane/docs/testing-cpflow-github-actions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ and tag ship, repin wrappers to the release tag, such as `v5.0.1`.
3636

3737
1. Open or reuse a same-repository PR.
3838
2. Comment exactly `+review-app-deploy`.
39-
3. Confirm the deploy job checks out the expected upstream
40-
`control_plane_flow_ref`.
39+
3. Confirm the deploy job checks out the expected upstream Control Plane Flow
40+
source selected by the generated wrapper's `uses:` ref.
4141
4. Confirm `Setup environment`, `Check if review app exists`,
4242
`Build Docker image`, and `Deploy to Control Plane` all pass.
4343
5. Open the review-app URL from the PR comment and verify it returns HTTP 200.

.controlplane/shakacode-team.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ only by the protected `production` Environment after approval.
6666
Advanced optional settings are documented upstream in the
6767
[`control-plane-flow` CI automation guide](https://github.com/shakacode/control-plane-flow/blob/main/docs/ci-automation.md).
6868

69-
Current workflow wrappers are pinned to upstream `control-plane-flow` PR #318 at
70-
`19ca93eadcba81e7438f26ab55a0f2ca7ace82b0` for downstream testing. After 5.0.1
71-
ships, repin the wrappers to `v5.0.1`; do not treat the temporary SHA as the
72-
steady-state master configuration.
69+
Current workflow wrappers are pinned to merged upstream `control-plane-flow`
70+
commit `c0ca750c4838dacf6a1d81d52cb151301516cb77` for downstream testing. After
71+
5.0.1 ships, repin the wrappers to `v5.0.1`; do not treat the temporary SHA as
72+
the steady-state master configuration.
7373

7474
If staging moves off `master`, update both `STAGING_APP_BRANCH` and the branch
7575
filter in `.github/workflows/cpflow-deploy-staging.yml`.

.github/cpflow-help.md

Lines changed: 11 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/main/docs/ci-automation.md).
5+
[CI automation guide](https://github.com/shakacode/control-plane-flow/blob/c0ca750c4838dacf6a1d81d52cb151301516cb77/docs/ci-automation.md).
66

77
## Pull Request Commands
88

@@ -55,14 +55,18 @@ the environment approval gate passes.
5555

5656
## Version Locking
5757

58-
Current wrappers pin both the reusable workflow `uses:` ref and
59-
`control_plane_flow_ref` to `19ca93eadcba81e7438f26ab55a0f2ca7ace82b0` only for
60-
upstream PR testing. Do not leave production automation on this temporary SHA:
61-
after `cpflow` 5.0.1 ships, switch both refs to `v5.0.1`.
58+
Generated wrappers pin Control Plane Flow once with the reusable workflow
59+
`uses:` ref, for example `@c0ca750c4838dacf6a1d81d52cb151301516cb77`. For stable releases,
60+
this ref should be a release tag. The upstream reusable workflow automatically
61+
loads its matching shared actions from GitHub's workflow context, so downstream
62+
wrappers should not pass a duplicate Control Plane Flow ref input. If your
63+
generated wrappers still include a `with:` block whose only purpose is to repeat
64+
the same ref, regenerate them with a newer `cpflow`.
65+
6266
Leave `CPFLOW_VERSION` unset so the workflow builds cpflow from the same
6367
checked-out upstream source. If you set `CPFLOW_VERSION`, it must match the
64-
release tag, for example `CPFLOW_VERSION=5.0.1` with
65-
`control_plane_flow_ref: v5.0.1`.
68+
release tag, for example `CPFLOW_VERSION=5.0.1` with a wrapper pinned to
69+
`uses: ...@v5.0.1`.
6670

6771
Do not leave downstream apps pinned to a moving branch such as `main`. For a
6872
short-lived test of an unreleased upstream PR, pin to a full 40-character commit

.github/testing-github-actions.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ guide:
2525
4. For comment-triggered review-app commands, test a real `+review-app-deploy`
2626
after the trusted default-branch wrapper points at the code under test.
2727
5. When testing unreleased upstream `control-plane-flow` changes downstream, pin
28-
both the reusable workflow `uses:` ref and `control_plane_flow_ref` to the
29-
same upstream commit SHA.
28+
the generated reusable workflow `uses:` refs to the same upstream commit SHA.
29+
Newer upstream workflows load their matching shared actions automatically; do
30+
not add a duplicate ref input to downstream wrappers.
3031

3132
Avoid testing production automation against moving branch refs such as `main` or
3233
a feature branch. Use release tags for normal operation and full commit SHAs for

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ permissions:
1010

1111
jobs:
1212
cleanup:
13-
# Cleanup targets qa-react-webpack-rails-tutorial-<PR>. Manually delete any
14-
# legacy qa-react-webpack-rails-tutorial-pr-<PR> apps during migration.
15-
uses: shakacode/control-plane-flow/.github/workflows/cpflow-cleanup-stale-review-apps.yml@19ca93eadcba81e7438f26ab55a0f2ca7ace82b0
16-
with:
17-
control_plane_flow_ref: 19ca93eadcba81e7438f26ab55a0f2ca7ace82b0
13+
# Cleanup targets the current inferred review-app prefix. If you changed
14+
# naming conventions, manually delete review apps under the old prefix.
15+
uses: shakacode/control-plane-flow/.github/workflows/cpflow-cleanup-stale-review-apps.yml@c0ca750c4838dacf6a1d81d52cb151301516cb77
1816
secrets:
1917
CPLN_TOKEN_STAGING: ${{ secrets.CPLN_TOKEN_STAGING }}

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,18 @@ permissions:
1919

2020
jobs:
2121
delete-review-app:
22+
# pull_request_target is intentional: fork PR-close events need access to
23+
# staging secrets to delete review apps and update PR comments. The upstream
24+
# reusable workflow checks out trusted base-branch action code, not fork code.
2225
if: |
2326
(github.event_name == 'issue_comment' &&
2427
github.event.issue.pull_request &&
2528
contains(fromJson('["+review-app-delete","+review-app-delete\n","+review-app-delete\r\n"]'), github.event.comment.body) &&
2629
contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) ||
2730
(github.event_name == 'pull_request_target' && github.event.action == 'closed') ||
2831
github.event_name == 'workflow_dispatch'
29-
uses: shakacode/control-plane-flow/.github/workflows/cpflow-delete-review-app.yml@19ca93eadcba81e7438f26ab55a0f2ca7ace82b0
30-
with:
31-
control_plane_flow_ref: 19ca93eadcba81e7438f26ab55a0f2ca7ace82b0
32+
# This `if:` mirrors the upstream job guard to avoid a billable workflow_call
33+
# when the event does not match. Keep both conditions in sync.
34+
uses: shakacode/control-plane-flow/.github/workflows/cpflow-delete-review-app.yml@c0ca750c4838dacf6a1d81d52cb151301516cb77
3235
secrets:
3336
CPLN_TOKEN_STAGING: ${{ secrets.CPLN_TOKEN_STAGING }}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +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@19ca93eadcba81e7438f26ab55a0f2ca7ace82b0
34-
with:
35-
control_plane_flow_ref: 19ca93eadcba81e7438f26ab55a0f2ca7ace82b0
33+
uses: shakacode/control-plane-flow/.github/workflows/cpflow-deploy-review-app.yml@c0ca750c4838dacf6a1d81d52cb151301516cb77
3634
secrets:
3735
CPLN_TOKEN_STAGING: ${{ secrets.CPLN_TOKEN_STAGING }}
3836
DOCKER_BUILD_SSH_KEY: ${{ secrets.DOCKER_BUILD_SSH_KEY }}

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@ on:
88
# deploy branches unless `cpflow generate-github-actions --staging-branch BRANCH`
99
# was used. If STAGING_APP_BRANCH is later changed in repository variables, keep
1010
# this list in sync so pushes to that branch actually trigger the workflow.
11-
branches: ["main", "master"]
11+
branches: ["master"]
1212
workflow_dispatch:
1313

1414
permissions:
1515
contents: read
1616

1717
jobs:
1818
deploy-staging:
19-
uses: shakacode/control-plane-flow/.github/workflows/cpflow-deploy-staging.yml@19ca93eadcba81e7438f26ab55a0f2ca7ace82b0
19+
uses: shakacode/control-plane-flow/.github/workflows/cpflow-deploy-staging.yml@c0ca750c4838dacf6a1d81d52cb151301516cb77
2020
with:
21-
control_plane_flow_ref: 19ca93eadcba81e7438f26ab55a0f2ca7ace82b0
22-
staging_app_branch_default: ""
21+
staging_app_branch_default: "master"
2322
secrets:
2423
CPLN_TOKEN_STAGING: ${{ secrets.CPLN_TOKEN_STAGING }}
2524
DOCKER_BUILD_SSH_KEY: ${{ secrets.DOCKER_BUILD_SSH_KEY }}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +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@19ca93eadcba81e7438f26ab55a0f2ca7ace82b0
27-
with:
28-
control_plane_flow_ref: 19ca93eadcba81e7438f26ab55a0f2ca7ace82b0
26+
uses: shakacode/control-plane-flow/.github/workflows/cpflow-help-command.yml@c0ca750c4838dacf6a1d81d52cb151301516cb77

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@ permissions:
1616
jobs:
1717
promote-to-production:
1818
if: github.event.inputs.confirm_promotion == 'promote'
19-
# Keep the @ref in `uses:` and `control_plane_flow_ref` below in sync: the
20-
# first selects the reusable workflow, the second selects its shared actions.
21-
uses: shakacode/control-plane-flow/.github/workflows/cpflow-promote-staging-to-production.yml@19ca93eadcba81e7438f26ab55a0f2ca7ace82b0
19+
uses: shakacode/control-plane-flow/.github/workflows/cpflow-promote-staging-to-production.yml@c0ca750c4838dacf6a1d81d52cb151301516cb77
2220
with:
23-
control_plane_flow_ref: 19ca93eadcba81e7438f26ab55a0f2ca7ace82b0
2421
# Keep CPLN_TOKEN_PRODUCTION as a secret on this protected GitHub
2522
# Environment. The caller passes the environment name, the upstream
2623
# reusable workflow runs its production job in that environment, and

0 commit comments

Comments
 (0)