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
87 lines (80 loc) · 1.87 KB
/
Copy pathcloudbuild.yaml
File metadata and controls
87 lines (80 loc) · 1.87 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
steps:
- name: 'gcr.io/cloud-builders/docker'
id: start_arango
entrypoint: /bin/sh
args:
[
'-c',
'docker run -d --network=cloudbuild -p=8529:8529 -e ARANGO_ROOT_PASSWORD=$_DB_PASS --name=arangodb arangodb',
]
- name: mikewilliamson/wait-for
id: wait
args: ['arangodb:8529']
- name: node:alpine
id: install
dir: api-js
entrypoint: npm
args: ['ci', '--no-optional']
- name: node:alpine
id: lint
dir: api-js
entrypoint: npm
args: ['run', lint]
- name: node:alpine
id: test
dir: api-js
entrypoint: npm
args: ['test']
env:
- DB_PASS=$_DB_PASS
- DB_URL=$_DB_URL
- DB_NAME=$_DB_NAME
- AUTHENTICATED_KEY=$_AUTHENTICATED_KEY
- SIGN_IN_KEY=$_SIGN_IN_KEY
- NOTIFICATION_API_KEY=$_NOTIFICATION_API_KEY
- NOTIFICATION_API_URL=$_NOTIFICATION_API_URL
- DMARC_REPORT_API_SECRET=$_DMARC_REPORT_API_SECRET
- TOKEN_HASH=$_TOKEN_HASH
- DMARC_REPORT_API_TOKEN=$_DMARC_REPORT_API_TOKEN
- DMARC_REPORT_API_URL=$_DMARC_REPORT_API_URL
- DEPTH_LIMIT=$_DEPTH_LIMIT
- COST_LIMIT=$_COST_LIMIT
- SCALAR_COST=$_SCALAR_COST
- OBJECT_COST=$_OBJECT_COST
- LIST_FACTOR=$_LIST_FACTOR
- name: node:alpine
id: lingui-extract
dir: api-js
entrypoint: npm
args: ['run', 'extract']
- name: node:alpine
id: lingui-compile
dir: api-js
entrypoint: npm
args: ['run', 'compile']
- name: 'gcr.io/cloud-builders/docker'
id: build-if-master
entrypoint: 'bash'
dir: api-js
args:
- '-c'
- |
if [[ "$BRANCH_NAME" == "master" ]]
then
docker build -t gcr.io/$PROJECT_ID/api-js:$BRANCH_NAME-$SHORT_SHA .
else
exit 0
fi
- name: 'gcr.io/cloud-builders/docker'
id: push-if-master
entrypoint: 'bash'
args:
- '-c'
- |
if [[ "$BRANCH_NAME" == "master" ]]
then
docker push gcr.io/$PROJECT_ID/api-js:$BRANCH_NAME-$SHORT_SHA
else
exit 0
fi
timeout: 1200s