forked from GoogleCloudPlatform/cloud-sdk-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
44 lines (41 loc) · 1.59 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/docker'
id: alpine
args: ['build', '-t', 'google/cloud-sdk:alpine', '-t', 'google/cloud-sdk:$TAG_NAME-alpine', 'alpine/']
waitFor: ['-']
- name: 'gcr.io/cloud-builders/docker'
id: debian_slim
args: ['build', '-t', 'google/cloud-sdk:slim', '-t', 'google/cloud-sdk:$TAG_NAME-slim', 'debian_slim/']
waitFor: ['-']
- name: 'gcr.io/cloud-builders/docker'
id: default
args: ['build', '-t', 'google/cloud-sdk:latest', '-t', 'google/cloud-sdk:$TAG_NAME', '.']
waitFor: ['-']
- name: 'gcr.io/cloud-builders/docker'
id: dockersecret
entrypoint: 'bash'
args: ['-c', 'docker login --username=[USERNAME] --password=$$PASSWORD']
secretEnv: ['PASSWORD']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'google/cloud-sdk:alpine']
waitFor: ['dockersecret', 'alpine']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'google/cloud-sdk:$TAG_NAME-alpine']
waitFor: ['dockersecret', 'alpine']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'google/cloud-sdk:slim']
waitFor: ['dockersecret', 'debian_slim']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'google/cloud-sdk:$TAG_NAME-slim']
waitFor: ['dockersecret', 'debian_slim']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'google/cloud-sdk:latest']
waitFor: ['dockersecret', 'default']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'google/cloud-sdk:$TAG_NAME']
waitFor: ['dockersecret', 'default']
secrets:
- kmsKeyName: projects/[PROJECT]/locations/global/keyRings/[KMSKEYRING]/cryptoKeys/[KMSKEY]
secretEnv:
PASSWORD: [KMSENCRYPTEDPASSWORD]
timeout: 1200s