-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
37 lines (37 loc) · 1.3 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
35
36
37
steps:
- id: test
name: golang:latest
entrypoint: bash
args:
- '-c'
- |
go test ./... -v
- id: deploy-api
name: gcr.io/cloud-builders/gcloud
waitFor:
- test
entrypoint: bash
args:
- '-c'
- |
gcloud builds submit --tag asia-southeast2-docker.pkg.dev/salmonping/salmonping/app:latest
gcloud run deploy salmonping --image asia-southeast2-docker.pkg.dev/salmonping/salmonping/app:latest \
--allow-unauthenticated \
--concurrency 16 \
--cpu 1 \
--max-instances 5 \
--memory 128Mi \
--min-instances 0 \
--region=asia-southeast2 \
--service-account [email protected] \
--set-env-vars GIN_MODE=release \
--set-secrets API_KEY=salmonping_API_KEY:latest \
--set-secrets DATABASE_URL=salmonping_DATABASE_URL:latest \
--set-secrets GOFOOD_NOTIFICATION_SECRET_KEY=salmonping_GOFOOD_NOTIFICATION_SECRET_KEY:latest \
--set-secrets TELEGRAM_BOT_TOKEN=salmonping_TELEGRAM_BOT_TOKEN:latest \
--set-secrets TELEGRAM_CHAT_ID=salmonping_TELEGRAM_CHAT_ID:latest \
--tag=main \
--timeout 30s \
--update-labels service=salmonping
options:
logging: CLOUD_LOGGING_ONLY