Skip to content

Commit 03fef8e

Browse files
authored
Merge pull request #717 from fargito/feat/cdk-gc
feat(cdk): add garbage collection for cdk assets
2 parents 4bb3a27 + a011f3b commit 03fef8e

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

.github/workflows/merge-main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949

5050
- name: Install dependencies
5151
run: pnpm install --frozen-lockfile
52+
5253
- name: 💾 Cache Nx cache
5354
id: package-cache
5455
uses: actions/cache@v4
@@ -57,16 +58,24 @@ jobs:
5758
nx-cache
5859
# Cache will be updated at every run: https://github.com/actions/cache/blob/main/workarounds.md#update-a-cache
5960
key: ${{ runner.os }}-nx-cache-${{ steps.setup-node.outputs.node-version }}-${{ github.run_id }}
61+
6062
- name: '🏗 Package'
6163
run: pnpm nx affected --targets=package,build --parallel=2
64+
6265
- name: '🧪 Run tests'
6366
run: pnpm nx affected --targets=test-linter,test-type,test-unit,test-circular,test-cdk --parallel=2
67+
6468
- name: Configure AWS Credentials
6569
uses: aws-actions/configure-aws-credentials@v4
6670
with:
6771
aws-region: ${{ env.AWS_REGION }}
6872
role-to-assume: ${{ secrets.AWS_DEPLOY_ROLE_STAGING }}
73+
6974
- name: '🚀 Deploy staging'
7075
run: pnpm nx affected --target=deploy-staging --parallel=2
76+
7177
- name: '🔎 Run integration tests on staging'
7278
run: SLS_ENV=staging pnpm nx affected --target=test-integration --parallel=2
79+
80+
- name: '🧹 Clean Unused CDK assets'
81+
run: pnpm nx affected --target=cdk-gc

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ jobs:
7070
- name: '🔎 Run integration tests on production'
7171
run: SLS_ENV=production pnpm nx affected --target=test-integration --parallel=2
7272

73+
- name: '🧹 Clean Unused CDK assets'
74+
run: pnpm nx affected --target=cdk-gc
75+
7376
- name: Get latest release matching release tag type
7477
id: get-latest-release
7578
uses: rez0n/actions-github-release@main

.husky/commit-msg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
pnpm commitlint --edit $1

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
pnpm lint-staged

services/validation/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"bootstrap": "cdk bootstrap --profile event-scout-developer",
1010
"bootstrap-production": "cdk bootstrap --context stage=production",
1111
"bootstrap-staging": "cdk bootstrap --context stage=staging",
12+
"cdk-gc": "cdk gc --unstable='gc' --type='s3' --created-buffer-days=1 --confirm=false",
1213
"deploy": "cdk deploy --profile event-scout-developer",
1314
"deploy-production": "cdk deploy --context stage=production",
1415
"deploy-staging": "cdk deploy --context stage=staging",

0 commit comments

Comments
 (0)