File tree 7 files changed +2230
-2
lines changed
packages/lit-dev-cloudbuild-cleanup
7 files changed +2230
-2
lines changed Original file line number Diff line number Diff line change
1
+ # lit.dev Cloud Build config for cleanup of build artifacts
2
+ #
3
+ # https://cloud.google.com/cloud-build/docs/build-config
4
+
5
+ steps :
6
+ - id : cleanup
7
+ name : node:16
8
+ script : |
9
+ cd packages/lit-dev-cloudbuild-cleanup
10
+ npm ci
11
+ npm run build
12
+ npm start
13
+ env :
14
+ - ' PROJECT_ID=$PROJECT_ID'
15
+ - ' REPO_NAME=$REPO_NAME'
16
+ - ' _DEPLOY_REGION=$_DEPLOY_REGION'
17
+
18
+ tags :
19
+ - lit-dev
20
+ - cloudbuild-cleanup
21
+
22
+ options :
23
+ machineType : ' N1_HIGHCPU_8'
24
+
25
+ timeout : 45m
Original file line number Diff line number Diff line change 37
37
- ' --image=$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/lit-dev:$COMMIT_SHA'
38
38
- ' --quiet'
39
39
- ' --no-traffic'
40
+ # If this tag format changes, also update route-traffic- steps below and
41
+ # the cleanup script in packages/lit-dev-cloudbuild-cleanup/src/cleanup.ts
40
42
- ' --tag=main-$SHORT_SHA'
41
43
# IMPORTANT: If you change --memory, be sure to also change
42
44
# --max-old-space-size in ./Dockerfile, and this same flag in
70
72
- ' --image=$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/lit-dev:$COMMIT_SHA'
71
73
- ' --quiet'
72
74
- ' --no-traffic'
75
+ # If this tag format changes, also update route-traffic- steps below and
76
+ # the cleanup script in packages/lit-dev-cloudbuild-cleanup/src/cleanup.ts
73
77
- ' --tag=main-$SHORT_SHA'
74
78
# IMPORTANT: If you change --memory, be sure to also change
75
79
# --max-old-space-size in ./Dockerfile, and this same flag in
@@ -119,8 +123,8 @@ steps:
119
123
- beta
120
124
- run
121
125
- services
122
- - update-traffic # Service name
123
- - lit-dev-playground
126
+ - update-traffic
127
+ - lit-dev-playground # Service name
124
128
- ' --region=$_DEPLOY_REGION'
125
129
- ' --platform=managed'
126
130
- ' --quiet'
Original file line number Diff line number Diff line change 22
22
- --cache=true
23
23
- --cache-ttl=168h # 1 week
24
24
- --build-arg=LITDEV_ENV=pr
25
+ # If this tag format changes, also update the cleanup script in
26
+ # packages/lit-dev-cloudbuild-cleanup/src/cleanup.ts
25
27
- --build-arg=REVISION_TAG=pr$_PR_NUMBER-$SHORT_SHA
26
28
- --build-arg=SHORT_SHA=$SHORT_SHA
27
29
42
44
- ' --image=$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/lit-dev:$COMMIT_SHA'
43
45
- ' --quiet'
44
46
- ' --no-traffic'
47
+ # If this tag format changes, also update the cleanup script in
48
+ # packages/lit-dev-cloudbuild-cleanup/src/cleanup.ts
45
49
- ' --tag=pr$_PR_NUMBER-$SHORT_SHA'
46
50
# IMPORTANT: If you change --memory, be sure to also change
47
51
# --max-old-space-size in ./Dockerfile, and this same flag in
75
79
- ' --image=$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/lit-dev:$COMMIT_SHA'
76
80
- ' --quiet'
77
81
- ' --no-traffic'
82
+ # If this tag format changes, also update the cleanup script in
83
+ # packages/lit-dev-cloudbuild-cleanup/src/cleanup.ts
78
84
- ' --tag=pr$_PR_NUMBER-$SHORT_SHA'
79
85
# IMPORTANT: If you change --memory, be sure to also change
80
86
# --max-old-space-size in ./Dockerfile, and this same flag in
You can’t perform that action at this time.
0 commit comments