Skip to content

Commit e605798

Browse files
committed
fix wait_for_pipelines debug
rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED
1 parent 9177668 commit e605798

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

operator/test/test.sh

+9-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,15 @@ setup_test() {
8989
wait_for_pipeline() {
9090
if ! kubectl wait --for=condition=succeeded "$1" -n "$2" --timeout 300s >"$DEBUG_OUTPUT"; then
9191
echo "[ERROR] Pipeline failed to complete successful" >&2
92-
kubectl get pipelineruns "$1" -n "$2" >"$DEBUG_OUTPUT"
92+
kubectl get "$1" -n "$2" >"$DEBUG_OUTPUT"
93+
# just in case we are not running with debug on
94+
echo "$DEBUG_OUTPUT"
95+
prefix="pipelineruns/"
96+
string_to_prune="$1"
97+
tkn_param=${string_to_prune#"$prefix"}
98+
tkn pr logs "$tkn_param" -n "$2" >> "$DEBUG_OUTPUT"
99+
# just in case we are not running with debug on
100+
echo "$DEBUG_OUTPUT"
93101
exit 1
94102
fi
95103
}

0 commit comments

Comments
 (0)