From 1cafdb8653d9e3837bce267958d73b5321744cb7 Mon Sep 17 00:00:00 2001 From: Erik Wilson Date: Thu, 24 Oct 2019 22:30:40 -0700 Subject: [PATCH 1/2] Show failing logs --- scripts/sonobuoy-e2e-tests | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/scripts/sonobuoy-e2e-tests b/scripts/sonobuoy-e2e-tests index 5952b8b5b5..9f57691119 100755 --- a/scripts/sonobuoy-e2e-tests +++ b/scripts/sonobuoy-e2e-tests @@ -17,6 +17,28 @@ mkdir -p ${OUTPUT} pids=() output=() +show-logs() { + for pid in "${pids[@]}"; do + logdir=$(pwd)/logs/${pid} + if [ ! -d $logdir ]; then + continue + fi + echo + echo "#- Begin: logs for sonobuoy run pid ${pid}" + for log in $(pwd)/logs/${pid}/*; do + if [ -f ${log} ]; then + echo + echo "#- Start: ${log}" + cat ${log} + echo "#- End: ${log}" + echo + fi + done + echo "#- Finish: logs for sonobuoy run pid ${pid}" + echo + done +} + cleanup() { exit_status=$? set +e @@ -29,6 +51,7 @@ cleanup() { echo "passed" else echo "failed" + show-logs fi exit ${exit_status} } From e0211b3f5ff549053e52a19975bc4f4466d5aebd Mon Sep 17 00:00:00 2001 From: Erik Wilson Date: Fri, 25 Oct 2019 02:29:32 -0700 Subject: [PATCH 2/2] Enable arm sonobuoy for drone but don't run tests Bring up the cluster but early exit, arm images do not exist for sonobuoy testing. --- .drone.yml | 8 ++++++++ scripts/sonobuoy | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/.drone.yml b/.drone.yml index 06a0131db1..232ae9bd5d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -212,6 +212,14 @@ steps: event: - tag +- name: sonobuoy-e2e-tests + image: rancher/dapper:v0.4.2 + commands: + - dapper -f Dockerfile.sonobuoy.dapper + volumes: + - name: docker + path: /var/run/docker.sock + volumes: - name: docker host: diff --git a/scripts/sonobuoy b/scripts/sonobuoy index 97c4b27b37..e9c54b448c 100755 --- a/scripts/sonobuoy +++ b/scripts/sonobuoy @@ -195,5 +195,10 @@ echo "Started ${K3S_AGENT}" timeout --foreground 1m bash -c wait-for-nodes timeout --foreground 1m bash -c wait-for-services +if [ "$ARCH" = "arm" ]; then + echo "Aborting sonobuoy tests, images not available for $ARCH" + exit 0 +fi + echo "Starting sonobuoy tests" sonobuoy-test "${@}"