diff --git a/hack/update-conformance-yaml.sh b/hack/update-conformance-yaml.sh index fc66e411f24..68c387e1a7f 100755 --- a/hack/update-conformance-yaml.sh +++ b/hack/update-conformance-yaml.sh @@ -25,3 +25,8 @@ cd "${KUBE_ROOT}" test/conformance/gen-conformance-yaml.sh # replace checked-in yaml cp _output/conformance.yaml test/conformance/testdata/conformance.yaml + +# generate list of images +test/conformance/gen-test-image-list.sh +# replace checked-in list of images +cp _output/repo_list_images.txt test/conformance/testdata/repo_list_images.txt \ No newline at end of file diff --git a/hack/verify-conformance-yaml.sh b/hack/verify-conformance-yaml.sh index 0795d208e3f..171fae6f6ef 100755 --- a/hack/verify-conformance-yaml.sh +++ b/hack/verify-conformance-yaml.sh @@ -25,9 +25,18 @@ cd "${KUBE_ROOT}" test/conformance/gen-conformance-yaml.sh # diff generated and checked-in -if diff -u test/conformance/testdata/conformance.yaml _output/conformance.yaml; then - echo PASS - exit 0 +if ! diff -u test/conformance/testdata/conformance.yaml _output/conformance.yaml; then + echo FAIL + echo 'See instructions in test/conformance/README.md' + exit 1 fi -echo 'See instructions in test/conformance/README.md' -exit 1 + +# generate image list +test/conformance/gen-test-image-list.sh + +# diff generated and checked-in +if ! diff -u test/conformance/testdata/repo_list_images.txt _output/repo_list_images.txt; then + echo FAIL + exit 1 +fi +exit 0 diff --git a/test/conformance/gen-test-image-list.sh b/test/conformance/gen-test-image-list.sh new file mode 100755 index 00000000000..ab848721fa2 --- /dev/null +++ b/test/conformance/gen-test-image-list.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +# Copyright 2021 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. + +set -o errexit +set -o nounset +set -o pipefail + +# This will canonicalize the path +KUBE_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P) +cd "${KUBE_ROOT}" + +# dump list of images +./_output/bin/e2e.test --list-images | sort > "${KUBE_ROOT}/_output/repo_list_images.txt" diff --git a/test/conformance/testdata/repo_list_images.txt b/test/conformance/testdata/repo_list_images.txt new file mode 100644 index 00000000000..93509cb0614 --- /dev/null +++ b/test/conformance/testdata/repo_list_images.txt @@ -0,0 +1,52 @@ +gcr.io/authenticated-image-pulling/alpine:3.7 +gcr.io/authenticated-image-pulling/windows-nanoserver:v1 +gcr.io/k8s-authenticated-test/agnhost:2.6 +invalid.registry.k8s.io/invalid/alpine:3.1 +registry.k8s.io/build-image/distroless-iptables:v0.4.3 +registry.k8s.io/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver:v1.2.2 +registry.k8s.io/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver:v1.4.0 +registry.k8s.io/e2e-test-images/agnhost:2.45 +registry.k8s.io/e2e-test-images/apparmor-loader:1.4 +registry.k8s.io/e2e-test-images/busybox:1.29-2 +registry.k8s.io/e2e-test-images/busybox:1.36.1-1 +registry.k8s.io/e2e-test-images/cuda-vector-add:1.0 +registry.k8s.io/e2e-test-images/cuda-vector-add:2.3 +registry.k8s.io/e2e-test-images/httpd:2.4.38-4 +registry.k8s.io/e2e-test-images/httpd:2.4.39-4 +registry.k8s.io/e2e-test-images/ipc-utils:1.3 +registry.k8s.io/e2e-test-images/jessie-dnsutils:1.7 +registry.k8s.io/e2e-test-images/kitten:1.7 +registry.k8s.io/e2e-test-images/nautilus:1.7 +registry.k8s.io/e2e-test-images/nginx:1.14-4 +registry.k8s.io/e2e-test-images/nginx:1.15-4 +registry.k8s.io/e2e-test-images/node-perf/npb-ep:1.2 +registry.k8s.io/e2e-test-images/node-perf/npb-is:1.2 +registry.k8s.io/e2e-test-images/node-perf/tf-wide-deep:1.3 +registry.k8s.io/e2e-test-images/nonewprivs:1.3 +registry.k8s.io/e2e-test-images/nonroot:1.4 +registry.k8s.io/e2e-test-images/perl:5.26 +registry.k8s.io/e2e-test-images/redis:5.0.5-3 +registry.k8s.io/e2e-test-images/regression-issue-74839:1.2 +registry.k8s.io/e2e-test-images/resource-consumer:1.13 +registry.k8s.io/e2e-test-images/sample-apiserver:1.17.7 +registry.k8s.io/e2e-test-images/volume/iscsi:2.6 +registry.k8s.io/e2e-test-images/volume/nfs:1.3 +registry.k8s.io/e2e-test-images/volume/rbd:1.0.6 +registry.k8s.io/etcd:3.5.11-0 +registry.k8s.io/pause:3.9 +registry.k8s.io/prometheus-dummy-exporter:v0.1.0 +registry.k8s.io/prometheus-to-sd:v0.5.0 +registry.k8s.io/sd-dummy-exporter:v0.2.0 +registry.k8s.io/sig-storage/csi-attacher:v4.0.0 +registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.7.0 +registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.5.1 +registry.k8s.io/sig-storage/csi-provisioner:v3.4.0 +registry.k8s.io/sig-storage/csi-resizer:v1.6.0 +registry.k8s.io/sig-storage/csi-snapshotter:v5.0.1 +registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0 +registry.k8s.io/sig-storage/hello-populator:v1.0.1 +registry.k8s.io/sig-storage/hostpathplugin:v1.11.0 +registry.k8s.io/sig-storage/hostpathplugin:v1.9.0 +registry.k8s.io/sig-storage/livenessprobe:v2.7.0 +registry.k8s.io/sig-storage/nfs-provisioner:v3.0.1 +registry.k8s.io/sig-storage/volume-data-source-validator:v1.0.0