Skip to content

Commit 0fd9ff6

Browse files
quertijohnbieren
authored andcommitted
feat(RELEASE-2158): add self-hosted Quay e2e test
Add a new e2e test pipeline that validates push-to-external-registry works with self-hosted Quay. Unlike other e2e tests which use the stage cluster, this one uses an ephemeral Kind cluster where Quay is deployed and used for testing. The test runs an inline taskSpec that clones release-service-catalog at the PR's commit SHA and runs a test-kind.sh script directly, keeping e2e test ownership in this repo. The pipeline discovery script is updated so the test triggers alongside push-to-external-registry changes. Two changes were made to the push-to-external-registry pipeline to ensure its compatibility with self-hosted Quay: - Mount the ca-bundle.crt from trusted-ca configmap to /etc/ssl/certs/. This ensures that the self-signed CA cert of the internal Quay instance is known to 3rd party tools like skopeo and cosign. Without it, the tools would fail with a TLS error. - Update regexes to support a Quay URL with a port number. The regexes assumed only one ":" would be present in the url. Several other changes were made to support this functionality: - Mounting the CA bundle in Conforma task[1] - Support self-hosted Quay deployment in the Kind cluster[2] - Add init-quay task and skip-quay parameter[3] [1] conforma/cli#3148 [2] konflux-ci/konflux-ci#5689 [3] konflux-ci/tekton-integration-catalog#272 Assisted-by: Cursor Signed-off-by: Lubomir Gallovic <lgallovi@redhat.com>
1 parent e8177aa commit 0fd9ff6

30 files changed

Lines changed: 1119 additions & 5 deletions

File tree

integration-tests/lib/test-functions.sh

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,70 @@ wait_for_plr_to_complete() {
523523
echo "PipelineRun URL: $(get_build_pipeline_run_url "${tenant_namespace}" "${application_name}" "${component_push_plr_name}")"
524524
}
525525

526+
# Function to diagnose a failed PipelineRun by printing conditions, TaskRun summaries,
527+
# and logs from failed TaskRuns.
528+
# Arguments:
529+
# $1: PipelineRun name
530+
# $2: namespace
531+
diagnose_failed_pipelinerun() {
532+
local plr_name="$1"
533+
local namespace="$2"
534+
535+
echo ""
536+
echo "=== Diagnosing failed PipelineRun: ${plr_name} ==="
537+
538+
echo " PipelineRun conditions:"
539+
kubectl get pipelinerun "${plr_name}" -n "${namespace}" \
540+
-o jsonpath='{range .status.conditions[*]} Type={.type} Status={.status} Reason={.reason}{"\n"} Message={.message}{"\n"}{end}' \
541+
2>/dev/null || true
542+
543+
echo ""
544+
echo " TaskRun summary:"
545+
kubectl get taskruns -n "${namespace}" \
546+
-l "tekton.dev/pipelineRun=${plr_name}" \
547+
-o custom-columns='TASK:.metadata.labels.tekton\.dev/pipelineTask,STATUS:.status.conditions[0].reason,MESSAGE:.status.conditions[0].message' \
548+
2>/dev/null || true
549+
550+
echo ""
551+
local failed_taskruns
552+
failed_taskruns=$(kubectl get taskruns -n "${namespace}" \
553+
-l "tekton.dev/pipelineRun=${plr_name}" \
554+
-o jsonpath='{.items[?(@.status.conditions[0].status=="False")].metadata.name}' \
555+
2>/dev/null || true)
556+
557+
if [ -z "${failed_taskruns}" ]; then
558+
echo " No individually failed TaskRuns found. Check PipelineRun conditions above."
559+
return
560+
fi
561+
562+
for tr_name in ${failed_taskruns}; do
563+
local task_label
564+
task_label=$(kubectl get taskrun "${tr_name}" -n "${namespace}" \
565+
-o jsonpath='{.metadata.labels.tekton\.dev/pipelineTask}' 2>/dev/null || echo "unknown")
566+
567+
echo " --- Failed task: ${task_label} (TaskRun: ${tr_name}) ---"
568+
569+
local error_msg
570+
error_msg=$(kubectl get taskrun "${tr_name}" -n "${namespace}" \
571+
-o jsonpath='{.status.conditions[0].message}' 2>/dev/null || true)
572+
echo " Error: ${error_msg}"
573+
574+
echo " Logs (last 50 lines):"
575+
if command -v tkn &>/dev/null; then
576+
tkn taskrun logs "${tr_name}" -n "${namespace}" 2>/dev/null | tail -50 | sed 's/^/ /' || true
577+
else
578+
local pod_name
579+
pod_name=$(kubectl get taskrun "${tr_name}" -n "${namespace}" \
580+
-o jsonpath='{.status.podName}' 2>/dev/null || true)
581+
if [ -n "${pod_name}" ]; then
582+
kubectl logs "${pod_name}" -n "${namespace}" --all-containers --tail=50 \
583+
2>/dev/null | sed 's/^/ /' || true
584+
fi
585+
fi
586+
echo ""
587+
done
588+
}
589+
526590
# Function to wait for Releases to complete
527591
# Relies on global variables: component_push_plr_name, tenant_namespace, SUITE_DIR
528592
wait_for_releases() {

0 commit comments

Comments
 (0)