-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or request
Description
See code here: https://github.com/shakacode/hichee/blob/master/lib/tasks/cpl.rake (private repo for ShakaCode).
We should abstract out this code and ever to the controlplane.yml file for values.
In the below code, cpl:cleanup_review_apps
could potentially be configured by the controlplane.yml file and be a new CLI:
cpl cleanup_apps -a <app prefix>
This is what we have in CI.
Database cleanups would be app specific.
nightly-cleanup-review-apps-and-staging-org:
<<: *cpln-defaults
steps:
- checkout
- run: *install-control-plane-tools
- run:
name: Setup Control Plane tools
command: |
cpln profile create default --token $CPLN_TOKEN_STAGING --org $CPLN_ORG_STAGING
- run:
name: Cleanup stale review apps based on open PRs
command: |
cpl run:detached -a $APP_NAME_STAGING --image latest --use-local-token -- LOG_LEVEL=warn GH_TOKEN=$GH_TOKEN rails \
cpl:setup_cpln \
cpl:cleanup_review_apps \
cpl:cleanup_review_app_databases
We need some hook, like the release script to:
- create resources for a review app
- cleanup resources for a review app
and we could configure those hooks in controlplane.yml
.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request