-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
54 lines (48 loc) · 1.5 KB
/
Copy pathcloudbuild.yaml
File metadata and controls
54 lines (48 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
steps:
- name: "node:24-alpine"
entrypoint: "npm"
args: ["ci"]
# - name: "node:24-alpine"
# entrypoint: "npm"
# args: ["run", "test", "--", "--run"]
- name: "gcr.io/cloud-builders/docker"
entrypoint: "bash"
args:
- "-c"
- |
docker build \
-t $_AR_HOSTNAME/$_AR_PROJECT_ID/$_AR_REPOSITORY/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA \
.
- name: "gcr.io/cloud-builders/docker"
args:
- push
- $_AR_HOSTNAME/$_AR_PROJECT_ID/$_AR_REPOSITORY/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk:slim"
entrypoint: gcloud
args:
- run
- services
- update
- $_SERVICE_NAME
- --platform=managed
- --image=$_AR_HOSTNAME/$_AR_PROJECT_ID/$_AR_REPOSITORY/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA
- --region=$_DEPLOY_REGION
- --command
- ""
- --args
- ""
- --quiet
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk:slim"
entrypoint: "bash"
args:
- "-c"
- |
echo "🚀 Purging Cloudflare Cache for Zone: $_CLOUDFLARE_ZONE_ID..."
CLEAN_TOKEN=$$(echo -n "$_CLOUDFLARE_API_TOKEN" | tr -d '\n\r ')
curl -s -X POST "https://api.cloudflare.com/client/v4/zones/$_CLOUDFLARE_ZONE_ID/purge_cache" \
-H "Authorization: Bearer $$CLEAN_TOKEN" \
-H "Content-Type: application/json" \
--data '{"purge_everything": true}'
options:
logging: CLOUD_LOGGING_ONLY
substitutionOption: ALLOW_LOOSE