From 9fcc73d61019bf574085d32d9afc450a5bfa5679 Mon Sep 17 00:00:00 2001 From: Xin Jiang Date: Wed, 17 Jul 2024 11:39:17 +0800 Subject: [PATCH] for debugging purpose rh-pre-commit.version: 2.1.0 rh-pre-commit.check-secrets: ENABLED --- .tekton/pipeline/test-pipeline-service-deployment.yaml | 6 +++--- .tekton/pipeline/test-pipeline-service-upgrade.yaml | 6 +++--- operator/test/test.sh | 5 ++++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.tekton/pipeline/test-pipeline-service-deployment.yaml b/.tekton/pipeline/test-pipeline-service-deployment.yaml index cbf9ca77c..c1718f052 100644 --- a/.tekton/pipeline/test-pipeline-service-deployment.yaml +++ b/.tekton/pipeline/test-pipeline-service-deployment.yaml @@ -89,9 +89,9 @@ spec: taskRef: name: destroy-cluster when: - - input: "$(tasks.deploy-cluster.status)" - operator: notin - values: ["None", "Failed"] + - input: "$(tasks.test-pipeline-service.status)" + operator: in + values: ["Succeeded"] params: - name: cluster-name value: "$(tasks.generate-cluster-name.results.cluster-name)" diff --git a/.tekton/pipeline/test-pipeline-service-upgrade.yaml b/.tekton/pipeline/test-pipeline-service-upgrade.yaml index 20bffd5c0..b6e6d4570 100644 --- a/.tekton/pipeline/test-pipeline-service-upgrade.yaml +++ b/.tekton/pipeline/test-pipeline-service-upgrade.yaml @@ -147,9 +147,9 @@ spec: taskRef: name: destroy-cluster when: - - input: "$(tasks.deploy-cluster.status)" - operator: notin - values: ["None", "Failed"] + - input: "$(tasks.test-baseline.status)" + operator: in + values: ["Succeeded"] params: - name: cluster-name value: "$(tasks.generate-cluster-name.results.cluster-name)" diff --git a/operator/test/test.sh b/operator/test/test.sh index fd9b97bd7..5930a806c 100755 --- a/operator/test/test.sh +++ b/operator/test/test.sh @@ -81,7 +81,10 @@ init() { setup_test() { echo "[Setup]" echo -n " - Namespace configuration: " - kubectl apply -k "$SCRIPT_DIR/manifests/setup/pipeline-service" >"$DEBUG_OUTPUT" + if ! timeout 300s bash -c "while ! kubectl apply -k \"$SCRIPT_DIR/manifests/setup/pipeline-service\" >\"$DEBUG_OUTPUT\" 2>&1; do printf '.'; sleep 3; done"; then + echo "Setup test is not ready" >&2 + exit 1 + fi echo "OK" echo }