forked from CAVEconnectome/MaterializationEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
34 lines (34 loc) · 1.18 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
steps:
- 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'
# args: [ 'build', '-t', 'gcr.io/$PROJECT_ID/materializationengine', '.' ]
- name: "gcr.io/cloud-builders/docker"
entrypoint: "bash"
args:
- "-c"
- |
docker build -t gcr.io/$PROJECT_ID/materializationengine:$TAG_NAME .
timeout: 600s
- name: "gcr.io/cloud-builders/docker"
entrypoint: "bash"
args:
[
"-c",
"docker tag gcr.io/$PROJECT_ID/materializationengine:$TAG_NAME $$USERNAME/materializationengine:$TAG_NAME",
]
secretEnv: ["USERNAME"]
- name: "gcr.io/cloud-builders/docker"
entrypoint: "bash"
args: ["-c", "docker push $$USERNAME/materializationengine:$TAG_NAME"]
secretEnv: ["USERNAME"]
images:
- "gcr.io/$PROJECT_ID/materializationengine:$TAG_NAME"
availableSecrets:
secretManager:
- versionName: projects/$PROJECT_ID/secrets/docker-password/versions/1
env: "PASSWORD"
- versionName: projects/$PROJECT_ID/secrets/docker-username/versions/1
env: "USERNAME"