-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
34 lines (34 loc) · 1.07 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/cloud-builders/docker"
args:
[
"build",
"-t",
"$_IMAGE_NAME:$COMMIT_SHA",
"."
]
- name: "gcr.io/cloud-builders/docker"
args: ["push", "$_IMAGE_NAME:$COMMIT_SHA"]
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
entrypoint: gcloud
args:
[
"run",
"deploy",
"gts",
"--image",
"$_IMAGE_NAME:$COMMIT_SHA",
"--set-env-vars",
"GTS_HOST=$_GTS_HOST,GTS_DB_ADDRESS=$_GTS_DB_ADDRESS,GTS_DB_PORT=$_GTS_DB_PORT,GTS_DB_USER=$_GTS_DB_USER,GTS_DB_DATABASE=$_GTS_DB_DATABASE",
"--set-env-vars",
"GTS_STORAGE_S3_ENDPOINT=$_GTS_STORAGE_S3_ENDPOINT,GTS_STORAGE_S3_BUCKET=$_GTS_STORAGE_S3_BUCKET",
"--set-secrets",
"GTS_DB_PASSWORD=GTS_DB_PASSWORD:latest,GTS_STORAGE_S3_ACCESS_KEY=GTS_STORAGE_S3_ACCESS_KEY:latest,GTS_STORAGE_S3_SECRET_KEY=GTS_STORAGE_S3_SECRET_KEY:latest",
"--region",
"$_REGION",
"--allow-unauthenticated",
]
images:
- "$_IMAGE_NAME:$COMMIT_SHA"
options:
logging: CLOUD_LOGGING_ONLY