Skip to content

Commit 2e547f8

Browse files
committed
image pushing: configure jobs for all Kubernetes-CSI repos
This is part of rolling out multi-architecture image building for GCR, see kubernetes-csi/csi-release-tools#86
1 parent 822ccd5 commit 2e547f8

File tree

2 files changed

+277
-6
lines changed

2 files changed

+277
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#! /bin/bash -e
2+
# Copyright 2020 The Kubernetes Authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
output="$(dirname $0)/k8s-staging-csi.yaml"
17+
repos="
18+
csi-driver-host-path
19+
csi-test
20+
external-attacher
21+
external-provisioner
22+
external-resizer
23+
external-snapshotter
24+
livenessprobe
25+
node-driver-registrar
26+
"
27+
28+
cat >"$output" <<EOF
29+
# Automatically generated by k8s-staging-csi-gen.sh.
30+
31+
postsubmits:
32+
EOF
33+
34+
for repo in $repos; do
35+
cat >>"$output" <<EOF
36+
kubernetes-csi/$repo:
37+
- name: post-$repo-push-images
38+
cluster: k8s-infra-prow-build-trusted
39+
annotations:
40+
testgrid-dashboards: sig-storage-csi-$repo
41+
decorate: true
42+
branches:
43+
# For publishing canary images. Publishing canary images for release branches can
44+
# be added later, but then will depend on which release branches in each repo have
45+
# the necessary cloud build files.
46+
- ^master$
47+
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
48+
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
49+
# files and thus the job will fail.
50+
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
51+
spec:
52+
serviceAccountName: gcb-builder
53+
containers:
54+
- image: gcr.io/k8s-testimages/image-builder:v20200422-c760048
55+
command:
56+
- /run.sh
57+
args:
58+
# this is the project GCB will run in, which is the same as the GCR
59+
# images are pushed to.
60+
- --project=k8s-staging-csi
61+
# This is the same as above, but with -gcb appended.
62+
- --scratch-bucket=gs://k8s-staging-csi-gcb
63+
- --env-passthrough=PULL_BASE_REF
64+
- .
65+
EOF
66+
done

config/jobs/image-pushing/k8s-staging-csi.yaml

+211-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,223 @@
1+
# Automatically generated by k8s-staging-csi-gen.sh.
2+
13
postsubmits:
2-
# This is the github repo we'll build from. This block needs to be repeated
3-
# for each repo.
4+
kubernetes-csi/csi-driver-host-path:
5+
- name: post-csi-driver-host-path-push-images
6+
cluster: k8s-infra-prow-build-trusted
7+
annotations:
8+
testgrid-dashboards: sig-storage-csi-csi-driver-host-path
9+
decorate: true
10+
branches:
11+
# For publishing canary images. Publishing canary images for release branches can
12+
# be added later, but then will depend on which release branches in each repo have
13+
# the necessary cloud build files.
14+
- ^master$
15+
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
16+
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
17+
# files and thus the job will fail.
18+
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
19+
spec:
20+
serviceAccountName: gcb-builder
21+
containers:
22+
- image: gcr.io/k8s-testimages/image-builder:v20200422-c760048
23+
command:
24+
- /run.sh
25+
args:
26+
# this is the project GCB will run in, which is the same as the GCR
27+
# images are pushed to.
28+
- --project=k8s-staging-csi
29+
# This is the same as above, but with -gcb appended.
30+
- --scratch-bucket=gs://k8s-staging-csi-gcb
31+
- --env-passthrough=PULL_BASE_REF
32+
- .
33+
kubernetes-csi/csi-test:
34+
- name: post-csi-test-push-images
35+
cluster: k8s-infra-prow-build-trusted
36+
annotations:
37+
testgrid-dashboards: sig-storage-csi-csi-test
38+
decorate: true
39+
branches:
40+
# For publishing canary images. Publishing canary images for release branches can
41+
# be added later, but then will depend on which release branches in each repo have
42+
# the necessary cloud build files.
43+
- ^master$
44+
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
45+
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
46+
# files and thus the job will fail.
47+
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
48+
spec:
49+
serviceAccountName: gcb-builder
50+
containers:
51+
- image: gcr.io/k8s-testimages/image-builder:v20200422-c760048
52+
command:
53+
- /run.sh
54+
args:
55+
# this is the project GCB will run in, which is the same as the GCR
56+
# images are pushed to.
57+
- --project=k8s-staging-csi
58+
# This is the same as above, but with -gcb appended.
59+
- --scratch-bucket=gs://k8s-staging-csi-gcb
60+
- --env-passthrough=PULL_BASE_REF
61+
- .
62+
kubernetes-csi/external-attacher:
63+
- name: post-external-attacher-push-images
64+
cluster: k8s-infra-prow-build-trusted
65+
annotations:
66+
testgrid-dashboards: sig-storage-csi-external-attacher
67+
decorate: true
68+
branches:
69+
# For publishing canary images. Publishing canary images for release branches can
70+
# be added later, but then will depend on which release branches in each repo have
71+
# the necessary cloud build files.
72+
- ^master$
73+
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
74+
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
75+
# files and thus the job will fail.
76+
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
77+
spec:
78+
serviceAccountName: gcb-builder
79+
containers:
80+
- image: gcr.io/k8s-testimages/image-builder:v20200422-c760048
81+
command:
82+
- /run.sh
83+
args:
84+
# this is the project GCB will run in, which is the same as the GCR
85+
# images are pushed to.
86+
- --project=k8s-staging-csi
87+
# This is the same as above, but with -gcb appended.
88+
- --scratch-bucket=gs://k8s-staging-csi-gcb
89+
- --env-passthrough=PULL_BASE_REF
90+
- .
91+
kubernetes-csi/external-provisioner:
92+
- name: post-external-provisioner-push-images
93+
cluster: k8s-infra-prow-build-trusted
94+
annotations:
95+
testgrid-dashboards: sig-storage-csi-external-provisioner
96+
decorate: true
97+
branches:
98+
# For publishing canary images. Publishing canary images for release branches can
99+
# be added later, but then will depend on which release branches in each repo have
100+
# the necessary cloud build files.
101+
- ^master$
102+
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
103+
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
104+
# files and thus the job will fail.
105+
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
106+
spec:
107+
serviceAccountName: gcb-builder
108+
containers:
109+
- image: gcr.io/k8s-testimages/image-builder:v20200422-c760048
110+
command:
111+
- /run.sh
112+
args:
113+
# this is the project GCB will run in, which is the same as the GCR
114+
# images are pushed to.
115+
- --project=k8s-staging-csi
116+
# This is the same as above, but with -gcb appended.
117+
- --scratch-bucket=gs://k8s-staging-csi-gcb
118+
- --env-passthrough=PULL_BASE_REF
119+
- .
120+
kubernetes-csi/external-resizer:
121+
- name: post-external-resizer-push-images
122+
cluster: k8s-infra-prow-build-trusted
123+
annotations:
124+
testgrid-dashboards: sig-storage-csi-external-resizer
125+
decorate: true
126+
branches:
127+
# For publishing canary images. Publishing canary images for release branches can
128+
# be added later, but then will depend on which release branches in each repo have
129+
# the necessary cloud build files.
130+
- ^master$
131+
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
132+
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
133+
# files and thus the job will fail.
134+
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
135+
spec:
136+
serviceAccountName: gcb-builder
137+
containers:
138+
- image: gcr.io/k8s-testimages/image-builder:v20200422-c760048
139+
command:
140+
- /run.sh
141+
args:
142+
# this is the project GCB will run in, which is the same as the GCR
143+
# images are pushed to.
144+
- --project=k8s-staging-csi
145+
# This is the same as above, but with -gcb appended.
146+
- --scratch-bucket=gs://k8s-staging-csi-gcb
147+
- --env-passthrough=PULL_BASE_REF
148+
- .
149+
kubernetes-csi/external-snapshotter:
150+
- name: post-external-snapshotter-push-images
151+
cluster: k8s-infra-prow-build-trusted
152+
annotations:
153+
testgrid-dashboards: sig-storage-csi-external-snapshotter
154+
decorate: true
155+
branches:
156+
# For publishing canary images. Publishing canary images for release branches can
157+
# be added later, but then will depend on which release branches in each repo have
158+
# the necessary cloud build files.
159+
- ^master$
160+
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
161+
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
162+
# files and thus the job will fail.
163+
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
164+
spec:
165+
serviceAccountName: gcb-builder
166+
containers:
167+
- image: gcr.io/k8s-testimages/image-builder:v20200422-c760048
168+
command:
169+
- /run.sh
170+
args:
171+
# this is the project GCB will run in, which is the same as the GCR
172+
# images are pushed to.
173+
- --project=k8s-staging-csi
174+
# This is the same as above, but with -gcb appended.
175+
- --scratch-bucket=gs://k8s-staging-csi-gcb
176+
- --env-passthrough=PULL_BASE_REF
177+
- .
178+
kubernetes-csi/livenessprobe:
179+
- name: post-livenessprobe-push-images
180+
cluster: k8s-infra-prow-build-trusted
181+
annotations:
182+
testgrid-dashboards: sig-storage-csi-livenessprobe
183+
decorate: true
184+
branches:
185+
# For publishing canary images. Publishing canary images for release branches can
186+
# be added later, but then will depend on which release branches in each repo have
187+
# the necessary cloud build files.
188+
- ^master$
189+
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
190+
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
191+
# files and thus the job will fail.
192+
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
193+
spec:
194+
serviceAccountName: gcb-builder
195+
containers:
196+
- image: gcr.io/k8s-testimages/image-builder:v20200422-c760048
197+
command:
198+
- /run.sh
199+
args:
200+
# this is the project GCB will run in, which is the same as the GCR
201+
# images are pushed to.
202+
- --project=k8s-staging-csi
203+
# This is the same as above, but with -gcb appended.
204+
- --scratch-bucket=gs://k8s-staging-csi-gcb
205+
- --env-passthrough=PULL_BASE_REF
206+
- .
4207
kubernetes-csi/node-driver-registrar:
5-
# The name should be changed to match the repo name above
6208
- name: post-node-driver-registrar-push-images
7209
cluster: k8s-infra-prow-build-trusted
8210
annotations:
9-
# This is the name of some testgrid dashboard to report to.
10211
testgrid-dashboards: sig-storage-csi-node-driver-registrar
11212
decorate: true
12213
branches:
13-
# For publishing canary images
214+
# For publishing canary images. Publishing canary images for release branches can
215+
# be added later, but then will depend on which release branches in each repo have
216+
# the necessary cloud build files.
14217
- ^master$
15-
# this is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
218+
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
219+
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
220+
# files and thus the job will fail.
16221
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
17222
spec:
18223
serviceAccountName: gcb-builder

0 commit comments

Comments
 (0)