forked from kubernetes/kops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
79 lines (79 loc) · 2.36 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# See https://cloud.google.com/cloud-build/docs/build-config
timeout: 1800s
options:
substitution_option: ALLOW_LOOSE
machineType: 'N1_HIGHCPU_8'
steps:
# Push the images
- name: 'gcr.io/k8s-testimages/kubekins-e2e:v20210825-f1955d1-experimental'
id: images
entrypoint: make
env:
# _GIT_TAG is not a valid semver, we use CI=1 instead
# - VERSION=$_GIT_TAG
- CI=$_CI
- PULL_BASE_REF=$_PULL_BASE_REF
- DOCKER_REGISTRY=$_DOCKER_REGISTRY
- DOCKER_IMAGE_PREFIX=$_DOCKER_IMAGE_PREFIX
args:
- kops-controller-push
- dns-controller-push
- kube-apiserver-healthcheck-push
# Push the artifacts
- name: 'gcr.io/k8s-testimages/kubekins-e2e:v20210825-f1955d1-experimental'
id: artifacts
entrypoint: make
env:
# _GIT_TAG is not a valid semver, we use CI=1 instead
# - VERSION=$_GIT_TAG
- CI=$_CI
- PULL_BASE_REF=$_PULL_BASE_REF
- DOCKER_REGISTRY=$_DOCKER_REGISTRY
- DOCKER_IMAGE_PREFIX=$_DOCKER_IMAGE_PREFIX
- GCS_LOCATION=$_GCS_LOCATION
- LATEST_FILE=markers/${_PULL_BASE_REF}/latest-ci.txt
args:
- gcs-upload-and-tag
# Push the manifests
- name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20210722-085d930'
id: manifests
waitFor: [images]
entrypoint: make
env:
- DOCKER_CLI_EXPERIMENTAL=enabled
- CI=$_CI
- PULL_BASE_REF=$_PULL_BASE_REF
- DOCKER_REGISTRY=$_DOCKER_REGISTRY
- DOCKER_IMAGE_PREFIX=$_DOCKER_IMAGE_PREFIX
args:
- kops-controller-manifest
- dns-controller-manifest
- kube-apiserver-healthcheck-manifest
# Build cloudbuild artifacts (for attestation)
- name: 'gcr.io/k8s-testimages/kubekins-e2e:v20210825-f1955d1-experimental'
id: cloudbuild-artifacts
entrypoint: make
env:
# _GIT_TAG is not a valid semver, we use CI=1 instead
# - VERSION=$_GIT_TAG
- CI=$_CI
- PULL_BASE_REF=$_PULL_BASE_REF
- DOCKER_REGISTRY=$_DOCKER_REGISTRY
- DOCKER_IMAGE_PREFIX=$_DOCKER_IMAGE_PREFIX
- GCS_LOCATION=$_GCS_LOCATION
- LATEST_FILE=markers/${_PULL_BASE_REF}/latest-ci.txt
args:
- cloudbuild-artifacts
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
_CI: '1'
_GIT_TAG: '12345'
_PULL_BASE_REF: 'dev'
_DOCKER_REGISTRY: 'gcr.io'
_DOCKER_IMAGE_PREFIX: 'k8s-staging-kops/'
_GCS_LOCATION: 'gs://k8s-staging-kops/kops/releases/'
artifacts:
objects:
location: '$_GCS_LOCATION/$_GIT_TAG/cloudbuild/'
paths: ["cloudbuild/*"]