mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
Merge pull request #60618 from rmmh/verify-explicit
Automatic merge from submit-queue (batch tested with PRs 60530, 60618). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Add support for `make verify WHAT=typecheck` This will be used to make the typecheck job emit junit and avoids duplicating the rest of the verify logic. **Release note**: ```release-note NONE ```
This commit is contained in:
commit
f9f5677b3e
@ -112,10 +112,12 @@ define VERIFY_HELP_INFO
|
|||||||
#
|
#
|
||||||
# Args:
|
# Args:
|
||||||
# BRANCH: Branch to be passed to verify-godeps.sh script.
|
# BRANCH: Branch to be passed to verify-godeps.sh script.
|
||||||
|
# WHAT: List of checks to run
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# make verify
|
# make verify
|
||||||
# make verify BRANCH=branch_x
|
# make verify BRANCH=branch_x
|
||||||
|
# make verify WHAT="bazel typecheck"
|
||||||
endef
|
endef
|
||||||
.PHONY: verify
|
.PHONY: verify
|
||||||
ifeq ($(PRINT_HELP),y)
|
ifeq ($(PRINT_HELP),y)
|
||||||
|
@ -40,5 +40,4 @@ export LOG_LEVEL=4
|
|||||||
|
|
||||||
cd /go/src/k8s.io/kubernetes
|
cd /go/src/k8s.io/kubernetes
|
||||||
|
|
||||||
./hack/install-etcd.sh
|
|
||||||
make verify
|
make verify
|
||||||
|
@ -103,6 +103,9 @@ kube::etcd::cleanup() {
|
|||||||
kube::etcd::install() {
|
kube::etcd::install() {
|
||||||
(
|
(
|
||||||
cd "${KUBE_ROOT}/third_party"
|
cd "${KUBE_ROOT}/third_party"
|
||||||
|
if [[ $(readlink etcd) == etcd-v${ETCD_VERSION}-* ]]; then
|
||||||
|
return # already installed
|
||||||
|
fi
|
||||||
if [[ $(uname) == "Darwin" ]]; then
|
if [[ $(uname) == "Darwin" ]]; then
|
||||||
download_file="etcd-v${ETCD_VERSION}-darwin-amd64.zip"
|
download_file="etcd-v${ETCD_VERSION}-darwin-amd64.zip"
|
||||||
url="https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/${download_file}"
|
url="https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/${download_file}"
|
||||||
|
@ -73,6 +73,17 @@ function is-quick {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function is-explicitly-chosen {
|
||||||
|
local name="${1#verify-}"
|
||||||
|
name="${name%.*}"
|
||||||
|
for e in ${WHAT}; do
|
||||||
|
if [[ $e == "$name" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
function run-cmd {
|
function run-cmd {
|
||||||
local filename="${2##*/verify-}"
|
local filename="${2##*/verify-}"
|
||||||
local testname="${filename%%.*}"
|
local testname="${filename%%.*}"
|
||||||
@ -109,13 +120,19 @@ function run-checks {
|
|||||||
for t in $(ls ${pattern})
|
for t in $(ls ${pattern})
|
||||||
do
|
do
|
||||||
local check_name="$(basename "${t}")"
|
local check_name="$(basename "${t}")"
|
||||||
if is-excluded "${t}" ; then
|
if [[ ! -z ${WHAT:-} ]]; then
|
||||||
echo "Skipping ${check_name}"
|
if ! is-explicitly-chosen "${check_name}"; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if ${QUICK} && ! is-quick "${t}" ; then
|
else
|
||||||
echo "Skipping ${check_name} in quick mode"
|
if is-excluded "${t}" ; then
|
||||||
continue
|
echo "Skipping ${check_name}"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if ${QUICK} && ! is-quick "${t}" ; then
|
||||||
|
echo "Skipping ${check_name} in quick mode"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
echo -e "Verifying ${check_name}"
|
echo -e "Verifying ${check_name}"
|
||||||
local start=$(date +%s)
|
local start=$(date +%s)
|
||||||
|
@ -22,6 +22,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
|||||||
source "${KUBE_ROOT}/hack/lib/init.sh"
|
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||||
|
|
||||||
kube::golang::setup_env
|
kube::golang::setup_env
|
||||||
|
kube::etcd::install
|
||||||
|
|
||||||
make -C "${KUBE_ROOT}" WHAT=cmd/kube-apiserver
|
make -C "${KUBE_ROOT}" WHAT=cmd/kube-apiserver
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
|||||||
source "${KUBE_ROOT}/hack/lib/init.sh"
|
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||||
|
|
||||||
kube::golang::setup_env
|
kube::golang::setup_env
|
||||||
|
kube::etcd::install
|
||||||
|
|
||||||
make -C "${KUBE_ROOT}" WHAT=cmd/kube-apiserver
|
make -C "${KUBE_ROOT}" WHAT=cmd/kube-apiserver
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user