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
+24-8Lines changed: 24 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -364,27 +364,43 @@ openssl rand -hex 64
364
364
365
365
_Note, some of the URL references are internal for the ShakaCode team._
366
366
367
-
Review Apps (deployment of apps based on a PR) are done via Github Actions.
367
+
Review Apps (deployment of apps based on a PR) are done via the generated
368
+
`cpflow-*` GitHub Actions flow.
368
369
369
-
The review apps work by creating isolated deployments for each branch through this automated process. When a branch is pushed, the action:
370
+
The review apps work by creating isolated deployments for pull requests through
371
+
this automated process. When an approved collaborator comments exactly
372
+
`/deploy-review-app` on a PR, the action:
370
373
371
374
1. Sets up the necessary environment and tools
372
-
2. Creates a unique deployment for that branch if it doesn't exist
373
-
3. Builds a Docker image tagged with the branch's commit SHA
375
+
2. Creates a unique review app if it doesn't exist
376
+
3. Builds a Docker image tagged with the PR commit SHA
374
377
4. Deploys this image to Control Plane with its own isolated environment
375
378
379
+
After the review app exists, new pushes to the PR redeploy it automatically.
380
+
Use `/delete-review-app` to delete it manually; closing the PR deletes it
381
+
automatically. Pushes to the staging branch deploy staging, and production
382
+
promotion is manual from the `cpflow-promote-staging-to-production` workflow.
383
+
384
+
The repository variables and secrets must match the app names in
385
+
`.controlplane/controlplane.yml`. In particular, `REVIEW_APP_PREFIX` should
386
+
include the `-pr` suffix for this app, such as
387
+
`qa-react-webpack-rails-tutorial-pr`, so generated review apps are named
388
+
`qa-react-webpack-rails-tutorial-pr-1234`.
389
+
376
390
This allows teams to:
377
391
- Preview changes in a production-like environment
378
392
- Test features independently
379
393
- Share working versions with stakeholders
380
394
- Validate changes before merging to main branches
381
395
382
-
The system uses Control Plane's infrastructure to manage these deployments, with each branch getting its own resources as defined in the controlplane.yml configuration.
396
+
The system uses Control Plane's infrastructure to manage these deployments, with
397
+
each review app getting its own resources as defined in the controlplane.yml
398
+
configuration.
383
399
384
400
385
-
### Workflow for Developing Github Actions for Review Apps
401
+
### Workflow for Developing GitHub Actions for Review Apps
386
402
387
-
1. Create a PR with changes to the Github Actions workflow
403
+
1. Create a PR with changes to the GitHub Actions workflow
388
404
2. Make edits to files such as `.github/actions/cpflow-build-docker-image/action.yml` or `.github/workflows/cpflow-deploy-review-app.yml`
389
405
3. Run a script like `ga .github && gc -m fixes && gp` to commit and push changes (ga = git add, gc = git commit, gp = git push)
390
-
4. Check the Github Actions tab in the PR to see the status of the workflow
406
+
4. Check the GitHub Actions tab in the PR to see the status of the workflow
0 commit comments