forked from canada-ca/tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
33 lines (31 loc) · 854 Bytes
/
cloudbuild.yaml
File metadata and controls
33 lines (31 loc) · 854 Bytes
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
steps:
- name: 'gcr.io/track-compliance/ci'
id: test-result-queue
dir: services/result-queue
entrypoint: /bin/sh
args: ["-c", "pip3 install -r requirements.txt && python3 -m pytest"]
- name: 'gcr.io/cloud-builders/docker'
id: build-result-queue-if-master
entrypoint: 'bash'
dir: services/result-queue
args:
- '-c'
- |
if [[ "$BRANCH_NAME" == "master" ]]
then
docker build -t gcr.io/$PROJECT_ID/services/result-queue:$BRANCH_NAME-$SHORT_SHA .
else
exit 0
fi
- name: 'gcr.io/cloud-builders/docker'
id: push-result-queue-if-master
entrypoint: 'bash'
args:
- '-c'
- |
if [[ "$BRANCH_NAME" == "master" ]]
then
docker push gcr.io/$PROJECT_ID/services/result-queue:$BRANCH_NAME-$SHORT_SHA
else
exit 0
fi