-
Notifications
You must be signed in to change notification settings - Fork 71
/
cloudbuild.yaml
50 lines (43 loc) · 1.37 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
45
46
47
48
49
50
# Google Cloud Build configuration: https://cloud.google.com/cloud-build/docs/build-config
# Image building process: https://git.k8s.io/test-infra/config/jobs/image-pushing/README.md
# this must be specified in seconds. If omitted, defaults to 600s (10 mins)
timeout: 1200s
options:
substitution_option: ALLOW_LOOSE
machineType: E2_HIGHCPU_32
steps:
- name: 'gcr.io/cloud-builders/docker'
entrypoint: make
env:
- GIT_TAG=$_GIT_TAG
- PULL_BASE_REF=$_PULL_BASE_REF
- CLOUDBUILD_REPO=$PROJECT_ID
- IMG_VERSION=$_IMG_VERSION
args:
- image-push
- name: 'gcr.io/gcp-runtimes/container-structure-test'
id: structure-test
args:
- test
- --image=gcr.io/$PROJECT_ID/kpromo:$_GIT_TAG
- --config=container-structure.yaml
substitutions:
# _GIT_TAG will be filled with a git-based tag for the image, of the form
# vYYYYMMDD-hash, and can be used as a substitution
_GIT_TAG: '12345'
_PULL_BASE_REF: 'dev'
_IMG_VERSION: 'v4.0.5-0'
tags:
- 'kpromo'
- ${_GIT_TAG}
- ${_PULL_BASE_REF}
- ${_IMG_VERSION}
images:
- 'gcr.io/$PROJECT_ID/kpromo:$_GIT_TAG'
- 'gcr.io/$PROJECT_ID/kpromo:$_IMG_VERSION'
- 'gcr.io/$PROJECT_ID/kpromo:latest'
- 'gcr.io/$PROJECT_ID/kpromo:latest-canary'
- 'gcr.io/$PROJECT_ID/kpromo-auditor:$_GIT_TAG'
- 'gcr.io/$PROJECT_ID/kpromo-auditor:$_IMG_VERSION'
- 'gcr.io/$PROJECT_ID/kpromo-auditor:latest'
- 'gcr.io/$PROJECT_ID/kpromo-auditor:latest-canary'