Merge pull request #69368 from dims/upstream-heptio-kube-conformance

upstream heptio/kube-conformance
This commit is contained in:
k8s-ci-robot
2018-10-12 19:13:33 -07:00
committed by GitHub
12 changed files with 393 additions and 7 deletions

49
hack/dev-push-conformance.sh Executable file
View File

@@ -0,0 +1,49 @@
#!/usr/bin/env bash
# Copyright 2014 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.
# This script builds some binaries and then the conformance image.
# REGISTRY and VERSION must be set.
# Example usage:
# $ export REGISTRY=gcr.io/someone
# $ export VERSION=v1.4.0-testfix
# ./hack/dev-push-conformance.sh
# That will build and push gcr.io/someone/conformance-amd64:v1.4.0-testfix
set -o errexit
set -o nounset
set -o pipefail
KUBE_ROOT="$(dirname "${BASH_SOURCE}")/.."
source "${KUBE_ROOT}/build/common.sh"
if [[ -z "${REGISTRY:-}" ]]; then
echo "REGISTRY must be set"
exit -1
fi
if [[ -z "${VERSION:-}" ]]; then
echo "VERSION must be set"
exit -1
fi
IMAGE="${REGISTRY}/conformance-amd64:${VERSION}"
kube::build::verify_prereqs
kube::build::build_image
kube::build::run_build_command make WHAT="vendor/github.com/onsi/ginkgo/ginkgo test/e2e/e2e.test cmd/kubectl"
kube::build::copy_output
make -C "${KUBE_ROOT}/cluster/images/conformance" build
docker push "${IMAGE}"

View File

@@ -57,6 +57,20 @@ IFS=" " read -ra KUBE_SERVER_IMAGE_TARGETS <<< "$(kube::golang::server_image_tar
readonly KUBE_SERVER_IMAGE_TARGETS
readonly KUBE_SERVER_IMAGE_BINARIES=("${KUBE_SERVER_IMAGE_TARGETS[@]##*/}")
# The set of conformance targets we build docker image for
kube::golang::conformance_image_targets() {
# NOTE: this contains cmd targets for kube::release::build_conformance_image
local targets=(
vendor/github.com/onsi/ginkgo/ginkgo
test/e2e/e2e.test
cmd/kubectl
)
echo "${targets[@]}"
}
IFS=" " read -ra KUBE_CONFORMANCE_IMAGE_TARGETS <<< "$(kube::golang::conformance_image_targets)"
readonly KUBE_CONFORMANCE_IMAGE_TARGETS
# The set of server targets that we are only building for Kubernetes nodes
# If you update this list, please also update build/BUILD.
kube::golang::node_targets() {