Skip to content

Commit

Permalink
image pushing: configure jobs for all Kubernetes-CSI repos
Browse files Browse the repository at this point in the history
This is part of rolling out multi-architecture image building for GCR,
see kubernetes-csi/csi-release-tools#86
  • Loading branch information
pohly committed May 28, 2020
1 parent 822ccd5 commit 2e547f8
Show file tree
Hide file tree
Showing 2 changed files with 277 additions and 6 deletions.
66 changes: 66 additions & 0 deletions config/jobs/image-pushing/k8s-staging-csi-gen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#! /bin/bash -e
# Copyright 2020 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

output="$(dirname $0)/k8s-staging-csi.yaml"
repos="
csi-driver-host-path
csi-test
external-attacher
external-provisioner
external-resizer
external-snapshotter
livenessprobe
node-driver-registrar
"

cat >"$output" <<EOF
# Automatically generated by k8s-staging-csi-gen.sh.
postsubmits:
EOF

for repo in $repos; do
cat >>"$output" <<EOF
kubernetes-csi/$repo:
- name: post-$repo-push-images
cluster: k8s-infra-prow-build-trusted
annotations:
testgrid-dashboards: sig-storage-csi-$repo
decorate: true
branches:
# For publishing canary images. Publishing canary images for release branches can
# be added later, but then will depend on which release branches in each repo have
# the necessary cloud build files.
- ^master$
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
# files and thus the job will fail.
- ^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-]+)*))?$
spec:
serviceAccountName: gcb-builder
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200422-c760048
command:
- /run.sh
args:
# this is the project GCB will run in, which is the same as the GCR
# images are pushed to.
- --project=k8s-staging-csi
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-csi-gcb
- --env-passthrough=PULL_BASE_REF
- .
EOF
done
217 changes: 211 additions & 6 deletions config/jobs/image-pushing/k8s-staging-csi.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,223 @@
# Automatically generated by k8s-staging-csi-gen.sh.

postsubmits:
# This is the github repo we'll build from. This block needs to be repeated
# for each repo.
kubernetes-csi/csi-driver-host-path:
- name: post-csi-driver-host-path-push-images
cluster: k8s-infra-prow-build-trusted
annotations:
testgrid-dashboards: sig-storage-csi-csi-driver-host-path
decorate: true
branches:
# For publishing canary images. Publishing canary images for release branches can
# be added later, but then will depend on which release branches in each repo have
# the necessary cloud build files.
- ^master$
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
# files and thus the job will fail.
- ^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-]+)*))?$
spec:
serviceAccountName: gcb-builder
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200422-c760048
command:
- /run.sh
args:
# this is the project GCB will run in, which is the same as the GCR
# images are pushed to.
- --project=k8s-staging-csi
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-csi-gcb
- --env-passthrough=PULL_BASE_REF
- .
kubernetes-csi/csi-test:
- name: post-csi-test-push-images
cluster: k8s-infra-prow-build-trusted
annotations:
testgrid-dashboards: sig-storage-csi-csi-test
decorate: true
branches:
# For publishing canary images. Publishing canary images for release branches can
# be added later, but then will depend on which release branches in each repo have
# the necessary cloud build files.
- ^master$
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
# files and thus the job will fail.
- ^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-]+)*))?$
spec:
serviceAccountName: gcb-builder
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200422-c760048
command:
- /run.sh
args:
# this is the project GCB will run in, which is the same as the GCR
# images are pushed to.
- --project=k8s-staging-csi
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-csi-gcb
- --env-passthrough=PULL_BASE_REF
- .
kubernetes-csi/external-attacher:
- name: post-external-attacher-push-images
cluster: k8s-infra-prow-build-trusted
annotations:
testgrid-dashboards: sig-storage-csi-external-attacher
decorate: true
branches:
# For publishing canary images. Publishing canary images for release branches can
# be added later, but then will depend on which release branches in each repo have
# the necessary cloud build files.
- ^master$
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
# files and thus the job will fail.
- ^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-]+)*))?$
spec:
serviceAccountName: gcb-builder
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200422-c760048
command:
- /run.sh
args:
# this is the project GCB will run in, which is the same as the GCR
# images are pushed to.
- --project=k8s-staging-csi
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-csi-gcb
- --env-passthrough=PULL_BASE_REF
- .
kubernetes-csi/external-provisioner:
- name: post-external-provisioner-push-images
cluster: k8s-infra-prow-build-trusted
annotations:
testgrid-dashboards: sig-storage-csi-external-provisioner
decorate: true
branches:
# For publishing canary images. Publishing canary images for release branches can
# be added later, but then will depend on which release branches in each repo have
# the necessary cloud build files.
- ^master$
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
# files and thus the job will fail.
- ^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-]+)*))?$
spec:
serviceAccountName: gcb-builder
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200422-c760048
command:
- /run.sh
args:
# this is the project GCB will run in, which is the same as the GCR
# images are pushed to.
- --project=k8s-staging-csi
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-csi-gcb
- --env-passthrough=PULL_BASE_REF
- .
kubernetes-csi/external-resizer:
- name: post-external-resizer-push-images
cluster: k8s-infra-prow-build-trusted
annotations:
testgrid-dashboards: sig-storage-csi-external-resizer
decorate: true
branches:
# For publishing canary images. Publishing canary images for release branches can
# be added later, but then will depend on which release branches in each repo have
# the necessary cloud build files.
- ^master$
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
# files and thus the job will fail.
- ^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-]+)*))?$
spec:
serviceAccountName: gcb-builder
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200422-c760048
command:
- /run.sh
args:
# this is the project GCB will run in, which is the same as the GCR
# images are pushed to.
- --project=k8s-staging-csi
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-csi-gcb
- --env-passthrough=PULL_BASE_REF
- .
kubernetes-csi/external-snapshotter:
- name: post-external-snapshotter-push-images
cluster: k8s-infra-prow-build-trusted
annotations:
testgrid-dashboards: sig-storage-csi-external-snapshotter
decorate: true
branches:
# For publishing canary images. Publishing canary images for release branches can
# be added later, but then will depend on which release branches in each repo have
# the necessary cloud build files.
- ^master$
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
# files and thus the job will fail.
- ^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-]+)*))?$
spec:
serviceAccountName: gcb-builder
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200422-c760048
command:
- /run.sh
args:
# this is the project GCB will run in, which is the same as the GCR
# images are pushed to.
- --project=k8s-staging-csi
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-csi-gcb
- --env-passthrough=PULL_BASE_REF
- .
kubernetes-csi/livenessprobe:
- name: post-livenessprobe-push-images
cluster: k8s-infra-prow-build-trusted
annotations:
testgrid-dashboards: sig-storage-csi-livenessprobe
decorate: true
branches:
# For publishing canary images. Publishing canary images for release branches can
# be added later, but then will depend on which release branches in each repo have
# the necessary cloud build files.
- ^master$
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
# files and thus the job will fail.
- ^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-]+)*))?$
spec:
serviceAccountName: gcb-builder
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200422-c760048
command:
- /run.sh
args:
# this is the project GCB will run in, which is the same as the GCR
# images are pushed to.
- --project=k8s-staging-csi
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-csi-gcb
- --env-passthrough=PULL_BASE_REF
- .
kubernetes-csi/node-driver-registrar:
# The name should be changed to match the repo name above
- name: post-node-driver-registrar-push-images
cluster: k8s-infra-prow-build-trusted
annotations:
# This is the name of some testgrid dashboard to report to.
testgrid-dashboards: sig-storage-csi-node-driver-registrar
decorate: true
branches:
# For publishing canary images
# For publishing canary images. Publishing canary images for release branches can
# be added later, but then will depend on which release branches in each repo have
# the necessary cloud build files.
- ^master$
# this is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
# This is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
# This is okay for upcoming releases, but old releases will not have the necessary cloud build
# files and thus the job will fail.
- ^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-]+)*))?$
spec:
serviceAccountName: gcb-builder
Expand Down

0 comments on commit 2e547f8

Please sign in to comment.