forked from tradebyte/DevOps-Challenge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
36 lines (32 loc) · 975 Bytes
/
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
steps:
- name: 'python:3.9-slim'
id: UnitTest
entrypoint: /bin/sh
args:
- '-c'
- 'python tests/test.py'
- name: 'gcr.io/cloud-builders/docker'
id: PyAppBuild
args:
- 'build'
- '-t'
- 'gcr.io/essential-truth-365415/pytradebyteapp:${SHORT_SHA}'
- '.'
- name: 'gcr.io/cloud-builders/docker'
id: PyAppPush
args:
- 'push'
- 'gcr.io/essential-truth-365415/pytradebyteapp:${SHORT_SHA}'
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: gcloud
args:
[
"deploy", "releases", "create", "rel-${SHORT_SHA}",
"--delivery-pipeline", "pyapp-tradebyte",
"--region", "us-central1",
"--annotations", "commitId=${REVISION_ID}",
"--images", "pyappimage=gcr.io/essential-truth-365415/pytradebyteapp:${SHORT_SHA}"
]
images:
- 'gcr.io/essential-truth-365415/pytradebyteapp:${SHORT_SHA}'
# End