-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
38 lines (33 loc) · 1012 Bytes
/
cloudbuild.yaml
File metadata and controls
38 lines (33 loc) · 1012 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
34
35
36
37
38
#This is the cloudbuild file that generates the new scoreboard
# run on a trigger in google cloud builds when it detects a modification to a file in /bots
timeout: 9001s #2.5 hour time-out
options:
machineType: 'UNSPECIFIED' # 'N1_HIGHCPU_8' # 'E2_HIGHCPU_32'
steps:
# spin up a docker container to do the scoreboard generation
- name: 'jupyter/scipy-notebook:notebook-6.4.4'
entrypoint: 'bash'
env:
- 'DOCKER=1'
args:
- -c
- |
pwd
whoami
ls -la /home/jovyan
ls -la
python3 scoreboard.py $(git diff --name-only HEAD HEAD~1)
chmod 777 /home/jovyan/data_out.json
chmod 777 /home/jovyan/scoreboard_out.md
ls -la /home/jovyan
# save output json file to cloud storage
artifacts:
objects:
location: gs://gops-results/
paths:
- /home/jovyan/data_out.json
- /home/jovyan/scoreboard_out.md
# --NOTES
# To download a directory named folder from your cloud bucket
# named my-bucket into the current location
# gsutil cp -r gs://my-bucket/folder .