fix shellcheck in hack/make-rules/...
update pull request update pull request update pull request update pull request update pull request update pull request update pull request update pull request
This commit is contained in:
		| @@ -76,12 +76,9 @@ | |||||||
| ./hack/lib/version.sh | ./hack/lib/version.sh | ||||||
| ./hack/list-feature-tests.sh | ./hack/list-feature-tests.sh | ||||||
| ./hack/local-up-cluster.sh | ./hack/local-up-cluster.sh | ||||||
| ./hack/make-rules/build.sh |  | ||||||
| ./hack/make-rules/clean.sh | ./hack/make-rules/clean.sh | ||||||
| ./hack/make-rules/cross.sh |  | ||||||
| ./hack/make-rules/helpers/cache_go_dirs.sh | ./hack/make-rules/helpers/cache_go_dirs.sh | ||||||
| ./hack/make-rules/make-help.sh | ./hack/make-rules/make-help.sh | ||||||
| ./hack/make-rules/test-cmd.sh |  | ||||||
| ./hack/make-rules/test-e2e-node.sh | ./hack/make-rules/test-e2e-node.sh | ||||||
| ./hack/make-rules/test-integration.sh | ./hack/make-rules/test-integration.sh | ||||||
| ./hack/make-rules/test-kubeadm-cmd.sh | ./hack/make-rules/test-kubeadm-cmd.sh | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ set -o errexit | |||||||
| set -o nounset | set -o nounset | ||||||
| set -o pipefail | set -o pipefail | ||||||
|  |  | ||||||
| KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../.. | KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../.. | ||||||
| KUBE_VERBOSE="${KUBE_VERBOSE:-1}" | KUBE_VERBOSE="${KUBE_VERBOSE:-1}" | ||||||
| source "${KUBE_ROOT}/hack/lib/init.sh" | source "${KUBE_ROOT}/hack/lib/init.sh" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ set -o errexit | |||||||
| set -o nounset | set -o nounset | ||||||
| set -o pipefail | set -o pipefail | ||||||
|  |  | ||||||
| KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../.. | KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../.. | ||||||
| source "${KUBE_ROOT}/hack/lib/init.sh" | source "${KUBE_ROOT}/hack/lib/init.sh" | ||||||
|  |  | ||||||
| # NOTE: Using "${array[*]}" here is correct.  [@] becomes distinct words (in | # NOTE: Using "${array[*]}" here is correct.  [@] becomes distinct words (in | ||||||
|   | |||||||
| @@ -21,11 +21,15 @@ set -o errexit | |||||||
| set -o nounset | set -o nounset | ||||||
| set -o pipefail | set -o pipefail | ||||||
|  |  | ||||||
| KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../.. | KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../.. | ||||||
| source "${KUBE_ROOT}/hack/lib/init.sh" | source "${KUBE_ROOT}/hack/lib/init.sh" | ||||||
| source "${KUBE_ROOT}/hack/lib/test.sh" | source "${KUBE_ROOT}/hack/lib/test.sh" | ||||||
| source "${KUBE_ROOT}/test/cmd/legacy-script.sh" | source "${KUBE_ROOT}/test/cmd/legacy-script.sh" | ||||||
|  |  | ||||||
|  | # Runs kube-apiserver | ||||||
|  | # | ||||||
|  | # Exports: | ||||||
|  | #   APISERVER_PID | ||||||
| function run_kube_apiserver() { | function run_kube_apiserver() { | ||||||
|   kube::log::status "Building kube-apiserver" |   kube::log::status "Building kube-apiserver" | ||||||
|   make -C "${KUBE_ROOT}" WHAT="cmd/kube-apiserver" |   make -C "${KUBE_ROOT}" WHAT="cmd/kube-apiserver" | ||||||
| @@ -58,11 +62,15 @@ function run_kube_apiserver() { | |||||||
|     --cert-dir="${TMPDIR:-/tmp/}" \ |     --cert-dir="${TMPDIR:-/tmp/}" \ | ||||||
|     --service-cluster-ip-range="10.0.0.0/24" \ |     --service-cluster-ip-range="10.0.0.0/24" \ | ||||||
|     --token-auth-file=hack/testdata/auth-tokens.csv 1>&2 & |     --token-auth-file=hack/testdata/auth-tokens.csv 1>&2 & | ||||||
|   APISERVER_PID=$! |   export APISERVER_PID=$! | ||||||
|  |  | ||||||
|   kube::util::wait_for_url "http://127.0.0.1:${API_PORT}/healthz" "apiserver" |   kube::util::wait_for_url "http://127.0.0.1:${API_PORT}/healthz" "apiserver" | ||||||
| } | } | ||||||
|  |  | ||||||
|  | # Runs run_kube_controller_manager | ||||||
|  | #  | ||||||
|  | # Exports: | ||||||
|  | #   CTLRMGR_PID | ||||||
| function run_kube_controller_manager() { | function run_kube_controller_manager() { | ||||||
|   kube::log::status "Building kube-controller-manager" |   kube::log::status "Building kube-controller-manager" | ||||||
|   make -C "${KUBE_ROOT}" WHAT="cmd/kube-controller-manager" |   make -C "${KUBE_ROOT}" WHAT="cmd/kube-controller-manager" | ||||||
| @@ -73,13 +81,16 @@ function run_kube_controller_manager() { | |||||||
|     --port="${CTLRMGR_PORT}" \ |     --port="${CTLRMGR_PORT}" \ | ||||||
|     --kube-api-content-type="${KUBE_TEST_API_TYPE-}" \ |     --kube-api-content-type="${KUBE_TEST_API_TYPE-}" \ | ||||||
|     --master="127.0.0.1:${API_PORT}" 1>&2 & |     --master="127.0.0.1:${API_PORT}" 1>&2 & | ||||||
|   CTLRMGR_PID=$! |   export CTLRMGR_PID=$! | ||||||
|  |  | ||||||
|   kube::util::wait_for_url "http://127.0.0.1:${CTLRMGR_PORT}/healthz" "controller-manager" |   kube::util::wait_for_url "http://127.0.0.1:${CTLRMGR_PORT}/healthz" "controller-manager" | ||||||
| } | } | ||||||
|  |  | ||||||
| # Creates a node object with name 127.0.0.1. This is required because we do not | # Creates a node object with name 127.0.0.1. This is required because we do not | ||||||
| # run kubelet. | # run kubelet. | ||||||
|  | #  | ||||||
|  | # Exports: | ||||||
|  | #   SUPPORTED_RESOURCES(Array of all resources supported by the apiserver). | ||||||
| function create_node() { | function create_node() { | ||||||
|   kubectl create -f - -s "http://127.0.0.1:${API_PORT}" << __EOF__ |   kubectl create -f - -s "http://127.0.0.1:${API_PORT}" << __EOF__ | ||||||
| { | { | ||||||
| @@ -103,7 +114,7 @@ setup | |||||||
| run_kube_apiserver | run_kube_apiserver | ||||||
| run_kube_controller_manager | run_kube_controller_manager | ||||||
| create_node | create_node | ||||||
| SUPPORTED_RESOURCES=("*") | export SUPPORTED_RESOURCES=("*") | ||||||
| # WARNING: Do not wrap this call in a subshell to capture output, e.g. output=$(runTests) | # WARNING: Do not wrap this call in a subshell to capture output, e.g. output=$(runTests) | ||||||
| # Doing so will suppress errexit behavior inside runTests | # Doing so will suppress errexit behavior inside runTests | ||||||
| runTests | runTests | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 xichengliudui
					xichengliudui