-
Notifications
You must be signed in to change notification settings - Fork 84
/
cloudbuild.yaml
49 lines (42 loc) · 1.38 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
# 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
# TODO(image): Consider a smaller machine type
machineType: E2_HIGHCPU_32
steps:
- name: 'gcr.io/k8s-staging-releng/k8s-ci-builder:latest-default'
entrypoint: make
env:
- GIT_TAG=$_GIT_TAG
- PULL_BASE_REF=$_PULL_BASE_REF
- IMG_REGISTRY=gcr.io/$PROJECT_ID
- IMG_VERSION=$_IMG_VERSION
args:
- build-and-push-image
# TODO(image): Consider adding a container structure test
#- name: 'gcr.io/gcp-runtimes/container-structure-test'
# id: structure-test
# args:
# - test
# - --image=gcr.io/$PROJECT_ID/publishing-bot:$_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_REGISTRY: 'null-registry'
_IMG_VERSION: 'v0.0.0-1'
tags:
- 'publishing-bot'
- ${_GIT_TAG}
- ${_PULL_BASE_REF}
- ${_IMG_REGISTRY}
- ${_IMG_VERSION}
images:
- 'gcr.io/$PROJECT_ID/k8s-publishing-bot:$_GIT_TAG'
- 'gcr.io/$PROJECT_ID/k8s-publishing-bot:$_IMG_VERSION'
- 'gcr.io/$PROJECT_ID/k8s-publishing-bot:latest'