forked from s204431/mlops-CAPTCHA
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
32 lines (28 loc) · 798 Bytes
/
cloudbuild.yaml
File metadata and controls
32 lines (28 loc) · 798 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
steps:
- name: 'gcr.io/cloud-builders/docker'
id: 'Build container image'
args: [
'build',
'.',
'-t',
'europe-west1-docker.pkg.dev/mlops-captcha/mlops-docker/training',
'-f',
'dockerfiles/train.dockerfile',
'--build-arg',
'WANDB_API_KEY=$$WANDB_API_KEY'
]
secretEnv: ['WANDB_API_KEY']
- name: 'gcr.io/cloud-builders/docker'
id: 'Push container image'
args: [
'push',
'europe-west1-docker.pkg.dev/mlops-captcha/mlops-docker/training'
]
options:
logging: CLOUD_LOGGING_ONLY
availableSecrets:
secretManager:
- versionName: projects/1048604560911/secrets/WANDB_API_KEY/versions/latest
env: 'WANDB_API_KEY'
## This is the code need to run the script and create the image to google cloud
# gcloud builds submit --config=cloudbuild.yaml