mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
cleanup CI integration scripts
- stop setting ARTIFACTS from WORKSPACE, CI handles setting ARTIFACTS and WORKSPACE isn't used anymore (bazel?) - stop cd-ing GOPATH, CI sets the working dir already and local users won't necessarily have GOPATH - sop clobbering PATH with hardcoded assumptions, source install-etcd.sh instead (which updates PATH) - don't redundantly set KUBE_COVER to the default - pass logging env inline so the command can be pasted locally - set -x so the command is visible - add TODO about needing a wrapper script just to call install-etcd
This commit is contained in:
parent
9e42056a0d
commit
d798d86981
@ -19,20 +19,11 @@ set -o nounset
|
||||
set -o pipefail
|
||||
set -o xtrace
|
||||
|
||||
# Runs test-cmd,
|
||||
# producing JUnit-style XML test
|
||||
# reports in ${WORKSPACE}/artifacts. This script is intended to be run from
|
||||
# kubekins-test container with a kubernetes repo mapped in. See
|
||||
# k8s.io/test-infra/scenarios/kubernetes_verify.py
|
||||
# Runs test-cmd, intended to be run in prow.k8s.io
|
||||
set -x;
|
||||
|
||||
export PATH=${GOPATH}/bin:${PWD}/third_party/etcd:/usr/local/go/bin:${PATH}
|
||||
|
||||
# Set artifacts directory
|
||||
export ARTIFACTS=${ARTIFACTS:-"${WORKSPACE}/artifacts"}
|
||||
|
||||
cd "${GOPATH}/src/k8s.io/kubernetes"
|
||||
|
||||
./hack/install-etcd.sh
|
||||
# TODO: make test-cmd should handle this automatically
|
||||
source ./hack/install-etcd.sh
|
||||
|
||||
make test-cmd
|
||||
|
||||
|
@ -19,32 +19,14 @@ set -o nounset
|
||||
set -o pipefail
|
||||
set -o xtrace
|
||||
|
||||
# Runs test-cmd and test-integration,
|
||||
# producing JUnit-style XML test
|
||||
# reports in ${WORKSPACE}/artifacts. This script is intended to be run from
|
||||
# kubekins-test container with a kubernetes repo mapped in. See
|
||||
# k8s.io/test-infra/scenarios/kubernetes_verify.py
|
||||
# Runs test-cmd and test-integration, intended to be run in prow.k8s.io
|
||||
set -x;
|
||||
|
||||
export PATH=${GOPATH}/bin:${PWD}/third_party/etcd:/usr/local/go/bin:${PATH}
|
||||
# TODO: make test-integration should handle this automatically
|
||||
source ./hack/install-etcd.sh
|
||||
|
||||
# Install tools we need
|
||||
hack_tools_gotoolchain="${GOTOOLCHAIN:-}"
|
||||
if [ -n "${KUBE_HACK_TOOLS_GOTOOLCHAIN:-}" ]; then
|
||||
hack_tools_gotoolchain="${KUBE_HACK_TOOLS_GOTOOLCHAIN}";
|
||||
fi
|
||||
GOTOOLCHAIN="${hack_tools_gotoolchain}" go -C "./hack/tools" install gotest.tools/gotestsum
|
||||
|
||||
# Disable coverage report
|
||||
export KUBE_COVER="n"
|
||||
# Set artifacts directory
|
||||
export ARTIFACTS=${ARTIFACTS:-"${WORKSPACE}/artifacts"}
|
||||
# Save the verbose stdout as well.
|
||||
export KUBE_KEEP_VERBOSE_TEST_OUTPUT=y
|
||||
export LOG_LEVEL=4
|
||||
|
||||
cd "${GOPATH}/src/k8s.io/kubernetes"
|
||||
|
||||
./hack/install-etcd.sh
|
||||
|
||||
make test-cmd
|
||||
make test-integration
|
||||
|
@ -19,27 +19,11 @@ set -o nounset
|
||||
set -o pipefail
|
||||
set -o xtrace
|
||||
|
||||
# Runs test-integration,
|
||||
# producing JUnit-style XML test
|
||||
# reports in ${WORKSPACE}/artifacts. This script is intended to be run from
|
||||
# kubekins-test container with a kubernetes repo mapped in. See
|
||||
# k8s.io/test-infra/scenarios/kubernetes_verify.py
|
||||
# Runs test-integration
|
||||
# This script is intended to be run from prow.k8s.io
|
||||
set -x;
|
||||
|
||||
export PATH=${GOPATH}/bin:${PWD}/third_party/etcd:/usr/local/go/bin:${PATH}
|
||||
# TODO: make test-integration should handle this automatically
|
||||
source ./hack/install-etcd.sh
|
||||
|
||||
# Install tools we need
|
||||
go -C "./hack/tools" install gotest.tools/gotestsum
|
||||
|
||||
# Disable coverage report
|
||||
export KUBE_COVER="n"
|
||||
# Set artifacts directory
|
||||
export ARTIFACTS=${ARTIFACTS:-"${WORKSPACE}/artifacts"}
|
||||
# Save the verbose stdout as well.
|
||||
export KUBE_KEEP_VERBOSE_TEST_OUTPUT=y
|
||||
export LOG_LEVEL=4
|
||||
|
||||
cd "${GOPATH}/src/k8s.io/kubernetes"
|
||||
|
||||
./hack/install-etcd.sh
|
||||
|
||||
make test-integration
|
||||
make test-integration KUBE_KEEP_VERBOSE_TEST_OUTPUT=y LOG_LEVEL=4
|
||||
|
Loading…
Reference in New Issue
Block a user