forked from GoogleContainerTools/base-images-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
35 lines (35 loc) · 1.51 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
# All items surrounded by ${} are variables to be replaced with real values.
# ${_REPO}: The repository to push debian to, e.g. gcr.io/myproject
# ${_TAG}: What the tag the image with, e.g. latest
# ${_VERSION}: The version of debian to build, e.g. jessie
# ${_VERSION_NUMBER}: The version number associated with the ${_VERSION} string, e.g. 8 for jessie
steps:
- name: gcr.io/gcp-runtimes/check_if_tag_exists
args:
- '--image=${_REPO}/debian${_VERSION_NUMBER}:${_TAG}'
- name: gcr.io/cloud-builders/docker
args:
- 'build'
- '--tag=${_REPO}/mkdebootstrap:${_VERSION}'
- '--no-cache'
- 'mkdebootstrap/'
- name: ${_REPO}/mkdebootstrap:${_VERSION}
args:
- '-d'
- '/workspace'
- 'debootstrap'
- '--variant=minbase'
- '${_VERSION}'
- 'http://httpredir.debian.org/debian'
- name: gcr.io/cloud-builders/docker
args:
- 'build'
- '--tag=${_REPO}/debian${_VERSION_NUMBER}:${_TAG}'
- '--no-cache'
- '.'
- name: gcr.io/gcp-runtimes/structure_test
args: [
'--image', '${_REPO}/debian${_VERSION_NUMBER}:${_TAG}',
'--config', '/workspace/tests/debian_test.json',
'--config', '/workspace/tests/security_test.json']
images: ['${_REPO}/mkdebootstrap:${_VERSION}', '${_REPO}/debian${_VERSION_NUMBER}:${_TAG}']