@@ -345,23 +345,26 @@ apply_yaml_files() {
345345 common::create_configmap_from_file " dynamic-global-header-config" " $project " \
346346 " dynamic-global-header-config.yaml" " $dir /resources/config_map/dynamic-global-header-config.yaml"
347347
348- # Skip Tekton and Topology resources for K8s deployments (AKS/EKS/GKE)
348+ # Skip Tekton resources for K8s deployments (AKS/EKS/GKE)
349349 # Tekton tests are not executed in showcase-k8s or showcase-rbac-k8s projects
350350 if [[ " $JOB_NAME " != * " aks" * && " $JOB_NAME " != * " eks" * && " $JOB_NAME " != * " gke" * ]]; then
351351 # Create Pipeline run for tekton test case.
352352 oc apply -f " $dir /resources/pipeline-run/hello-world-pipeline.yaml"
353353 oc apply -f " $dir /resources/pipeline-run/hello-world-pipeline-run.yaml"
354354
355- # Create Deployment and Pipeline for Topology test.
356- oc apply -f " $dir /resources/topology_test/topology-test.yaml"
357- if [[ -z " ${IS_OPENSHIFT} " || " ${IS_OPENSHIFT} " == " false" ]]; then
358- kubectl apply -f " $dir /resources/topology_test/topology-test-ingress.yaml"
359- else
360- oc apply -f " $dir /resources/topology_test/topology-test-route.yaml"
361- fi
362355 else
363- log::info " Skipping Tekton Pipeline and Topology resources for K8s deployment (${JOB_NAME} )"
356+ log::info " Skipping Tekton Pipeline resources for K8s deployment (${JOB_NAME} )"
364357 fi
358+
359+ # Create Deployment and Pipeline for Topology test.
360+ oc apply -f " $dir /resources/topology_test/topology-test.yaml"
361+
362+ if [[ -z " ${IS_OPENSHIFT} " || " ${IS_OPENSHIFT} " == " false" ]]; then
363+ kubectl apply -f " $dir /resources/topology_test/topology-test-ingress.yaml"
364+ else
365+ oc apply -f " $dir /resources/topology_test/topology-test-route.yaml"
366+ fi
367+
365368}
366369
367370deploy_test_backstage_customization_provider () {
@@ -514,19 +517,29 @@ cluster_setup_ocp_operator() {
514517
515518cluster_setup_k8s_operator () {
516519 operator::install_olm
517- # Tekton not installed for K8s deployments (AKS/EKS/GKE)
518- # Tekton tests are not executed in showcase-k8s or showcase-rbac-k8s projects
519- # operator::install_tekton
520+ # Install Tekton Pipelines for K8s deployments (AKS/EKS/GKE) for topology tests to work
521+ operator::install_tekton
520522 # operator::install_postgres_k8s # Works with K8s but disabled in values file
523+
524+ # Wait for Tekton Pipelines to be ready before proceeding
525+ log::info " Waiting for Tekton Pipelines to be ready..."
526+ k8s_wait::deployment " tekton-pipelines" " tekton-pipelines-webhook" 30 10 || return 1
527+ k8s_wait::endpoint " tekton-pipelines-webhook" " tekton-pipelines" 1800 10 || return 1
528+ k8s_wait::crd " pipelines.tekton.dev" 120 5 || return 1
521529}
522530
523531cluster_setup_k8s_helm () {
524- # Tekton not installed for K8s deployments (AKS/EKS/GKE)
525- # Tekton tests are not executed in showcase-k8s or showcase-rbac-k8s projects
526- log::info " Skipping Tekton installation for K8s Helm deployment"
532+ # Install Tekton Pipelines for K8s deployments (AKS/EKS/GKE) for topology tests to work
533+ log::info " Installing Tekton Pipelines for K8s Helm deployment"
527534 # operator::install_olm
528- # operator::install_tekton
535+ operator::install_tekton
529536 # operator::install_postgres_k8s # Works with K8s but disabled in values file
537+
538+ # # Wait for Tekton Pipelines to be ready before proceeding
539+ log::info " Waiting for Tekton Pipelines to be ready..."
540+ k8s_wait::deployment " tekton-pipelines" " tekton-pipelines-webhook" 30 10 || return 1
541+ k8s_wait::endpoint " tekton-pipelines-webhook" " tekton-pipelines" 1800 10 || return 1
542+ k8s_wait::crd " pipelines.tekton.dev" 120 5 || return 1
530543}
531544
532545# ==============================================================================
0 commit comments