-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcloudbuild_release.yaml
33 lines (33 loc) · 1.31 KB
/
cloudbuild_release.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
steps:
- name: 'gcr.io/${PROJECT_ID}/pytest_3'
args: [ '-v', 'tests' ]
- name: 'golang'
dir: lcservice-go
args: ['go', 'test', './...', '-v']
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args: ['-c', 'docker login --username=$$USERNAME --password=$$PASSWORD']
secretEnv: ['USERNAME', 'PASSWORD']
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args: ['-c', 'docker build -f Dockerfile -t refractionpoint/lc-service:latest .']
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args: ['-c', 'docker push refractionpoint/lc-service:latest']
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args: ['-c', 'docker login --username=$$USERNAME --password=$$PASSWORD']
secretEnv: ['USERNAME', 'PASSWORD']
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args: ['-c', 'docker build -f Dockerfile_grpc -t refractionpoint/lc-service:latest-grpc .']
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args: ['-c', 'docker push refractionpoint/lc-service:latest-grpc']
availableSecrets:
secretManager:
- versionName: projects/${PROJECT_ID}/secrets/DOCKERHUB/versions/latest
env: 'PASSWORD'
- versionName: projects/${PROJECT_ID}/secrets/DOCKERHUB_USERNAME/versions/latest
env: 'USERNAME'
timeout: 1h