Skip to content

Commit c0935b7

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 c0935b7

File tree

2 files changed

+278
-6
lines changed

2 files changed

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

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

Lines changed: 211 additions & 6 deletions
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)