-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
44 lines (40 loc) · 1.24 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
38
39
40
41
42
43
44
steps:
- name: 'gcr.io/cloud-builders/git'
id: 'clone-sherlock'
args:
- clone
- 'https://github.com/sherlockify/sherlock'
dir: './run-sherlock'
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
id: 'move-sherlock-require'
waitFor: ['clone-sherlock']
args:
- -c
- |
cat ./run-sherlock/sherlock/requirements.txt >> ./run-sherlock/requirements.txt
- name: 'gcr.io/kaniko-project/executor:latest'
id: 'build-docker'
waitFor: ['move-sherlock-require']
args:
- --destination=us-west1-docker.pkg.dev/sherlockify/run-sherlock-build/run-sherlock:$COMMIT_SHA
- --context=./run-sherlock
- --dockerfile=./Dockerfile
- --cache=true
# - name: 'gcr.io/cloud-builders/docker'
# id: 'push-docker'
# waitFor: ['build-docker']
# args:
# - push
# - 'us-west1-docker.pkg.dev/sherlockify/run-sherlock-build/run-sherlock:$COMMIT_SHA'
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
waitFor: ['build-docker']
entrypoint: gcloud
args:
- 'run'
- 'deploy'
- 'run-sherlock'
- '--image'
- 'us-west1-docker.pkg.dev/sherlockify/run-sherlock-build/run-sherlock:$COMMIT_SHA'
- '--region'
- 'us-west1'