-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathcloudbuild.yaml
34 lines (34 loc) · 1.08 KB
/
cloudbuild.yaml
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
steps:
- name: gcr.io/kaniko-project/executor
args:
- --context=/workspace/api/
- --destination=$_AR_HOSTNAME/$PROJECT_ID/cloud-run-source-deploy/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA
- --cache=true
- --cache-ttl=8h
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk:slim"
args:
- run
- services
- update
- $_SERVICE_NAME
- "--platform=managed"
- >-
--image=$_AR_HOSTNAME/$PROJECT_ID/cloud-run-source-deploy/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA
- >-
--labels=managed-by=gcp-cloud-build-deploy-cloud-run,commit-sha=$COMMIT_SHA,gcb-build-id=$BUILD_ID,gcb-trigger-id=$_TRIGGER_ID
- "--region=$_DEPLOY_REGION"
- "--quiet"
id: Deploy
entrypoint: gcloud
options:
substitutionOption: ALLOW_LOOSE
substitutions:
_TRIGGER_ID: 38d07b2e-552a-4bda-9cc4-4ab31fef8938
_PLATFORM: managed
_SERVICE_NAME: ask-astro-dev
_DEPLOY_REGION: us-central1
_AR_HOSTNAME: us-central1-docker.pkg.dev
tags:
- gcp-cloud-build-deploy-cloud-run
- gcp-cloud-build-deploy-cloud-run-managed
- ask-astro-dev