forked from kubernetes/test-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
2 changed files
with
277 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters