Skip to content

Commit 5b37d4c

Browse files
authored
ci: Improve failure logging/debugging (#734)
Signed-off-by: Ryan Northey <[email protected]>
1 parent da242d7 commit 5b37d4c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

verify-common.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ bring_up_example () {
6262
run_log "Snooze for ${DELAY} while ${NAME} gets started"
6363
sleep "$DELAY"
6464
fi
65+
if [[ -z "$ENVOY_EXAMPLES_DEBUG" ]]; then
66+
return
67+
fi
6568
for path in "${paths[@]}"; do
6669
pushd "$path" > /dev/null || return 1
6770
"${DOCKER_COMPOSE[@]}" ps

verify_example.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ EXAMPLE_DIR="${2}"
55
TMPOUT=$(mktemp)
66
RUNDIR=$(mktemp -d)
77

8-
export TERM=xterm-256color
8+
export COMPOSE_INTERACTIVE_NO_CLI=1
9+
export COMPOSE_PROGRESS=quiet
910

1011
complete () {
1112
EXITCODE="$(tail -n 1 "${TMPOUT}" | grep -oP '(?<=COMMAND_EXIT_CODE=")[0-9]+')"
@@ -37,7 +38,7 @@ verify () {
3738
else
3839
cd "${EXAMPLE_NAME}"
3940
fi
40-
script -q -c "unbuffer ./verify.sh" "$TMPOUT" >/dev/null
41+
script -q -c "./verify.sh" "$TMPOUT" >/dev/null
4142
}
4243

4344
trap complete EXIT

0 commit comments

Comments
 (0)