diff --git a/hack/jenkins/common.sh b/hack/jenkins/common.sh index 742df580838d0198e0077cc05fb48f978cc9f927..5d310f0253635b37f8c28c77bdd1c796cdc7ee8e 100644 --- a/hack/jenkins/common.sh +++ b/hack/jenkins/common.sh @@ -71,7 +71,7 @@ sudo rm -rf $HOME/.kube || true # Allow this to fail, we'll switch on the return code below. set +e -${SUDO_PREFIX}out/e2e-${OS_ARCH} -minikube-args="--vm-driver=${VM_DRIVER} --v=10" -test.v -test.timeout=30m -binary=out/minikube-${OS_ARCH} +${SUDO_PREFIX}out/e2e-${OS_ARCH} -minikube-args="--vm-driver=${VM_DRIVER} --v=10 --logtostderr" -test.v -test.timeout=30m -binary=out/minikube-${OS_ARCH} result=$? set -e @@ -85,6 +85,7 @@ if [[ $result -eq 0 ]]; then status="success" else status="failure" + source print-debug-info.sh fi set +x diff --git a/hack/jenkins/print-debug-info.sh b/hack/jenkins/print-debug-info.sh new file mode 100644 index 0000000000000000000000000000000000000000..b8b47de01590ddfc9a6d81a7cb26cbdf83dc83ca --- /dev/null +++ b/hack/jenkins/print-debug-info.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Copyright 2016 The Kubernetes Authors All rights reserved. +# +# 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. + +# Prints some debug info about the state of the cluster +# +# We don't check the error on these commands, since they might fail depending on +# the cluster state. +set +e + +kubectl get pods --all-namespaces +kubectl cluster-info dump + +docker ps + +MINIKUBE=${SUDO_PREFIX}out/minikube-${OS_ARCH} +${MINIKUBE} status +${MINIKUBE} ip +${MINIKUBE} ssh -- cat /etc/VERSION +${MINIKUBE} ssh -- docker ps +${MINIKUBE} logs + +set -e