Skip to content

Commit

Permalink
print operator logs
Browse files Browse the repository at this point in the history
Signed-off-by: Jeeva Kandasamy <jkandasa@redhat.com>
  • Loading branch information
jkandasa committed Sep 7, 2023
1 parent 836ab1f commit 25d5bdf
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion test/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@ function get_operator_namespace() {
echo ${operator_namespace}
}

# print operator logs
function print_operator_logs() {
echo "tekton-operator logs:"
echo "---------------------------------------"
kubectl logs -l app=tekton-operator,name=tekton-operator --namespace tekton-operator --all-containers
echo ""
echo "tekton-operator-webhook logs:"
echo "---------------------------------------"
kubectl logs -l app=tekton-operator,name=tekton-operator-webhook --namespace tekton-operator --all-containers
}

function install_latest_released_version() {
local platform=${1}
version=$(latest_released_version)
Expand All @@ -128,5 +139,6 @@ function install_latest_released_version() {

# Wait for pods to be running in the namespaces we are deploying to
local operator_namespace=$(get_operator_namespace)
wait_until_pods_running ${operator_namespace} || fail_test "Tekton Operator controller did not come up"
wait_until_pods_running ${operator_namespace} || (print_operator_logs && fail_test "Tekton Operator controller did not come up")

}

0 comments on commit 25d5bdf

Please sign in to comment.