diff --git a/.github/workflows/pull-requests.yaml b/.github/workflows/pull-requests.yaml index 22846aee..83d623cb 100644 --- a/.github/workflows/pull-requests.yaml +++ b/.github/workflows/pull-requests.yaml @@ -183,7 +183,16 @@ jobs: - name: Prepare environment run: | cd /tmp/$SANDBOX_NAME - make SANDBOX_NAME=$SANDBOX_NAME prepare-env + attempt=0 + until make SANDBOX_NAME=$SANDBOX_NAME prepare-env; do + attempt=$((attempt + 1)) + if [ $attempt -ge 3 ]; then + echo "❌ Attempt $attempt failed, exiting..." + exit 1 + fi + echo "❌ Attempt $attempt failed, retrying..." + done + echo "✅ The task completed successfully after $attempt attempts" install_cozystack: name: "Install Cozystack" @@ -228,7 +237,16 @@ jobs: - name: Install Cozystack into sandbox run: | cd /tmp/$SANDBOX_NAME - make -C packages/core/testing SANDBOX_NAME=$SANDBOX_NAME install-cozystack + attempt=0 + until make -C packages/core/testing SANDBOX_NAME=$SANDBOX_NAME install-cozystack; do + attempt=$((attempt + 1)) + if [ $attempt -ge 3 ]; then + echo "❌ Attempt $attempt failed, exiting..." + exit 1 + fi + echo "❌ Attempt $attempt failed, retrying..." + done + echo "✅ The task completed successfully after $attempt attempts." detect_test_matrix: name: "Detect e2e test matrix" @@ -259,7 +277,16 @@ jobs: - name: E2E Apps run: | cd /tmp/$SANDBOX_NAME - make -C packages/core/testing SANDBOX_NAME=$SANDBOX_NAME test-apps-${{ matrix.app }} + attempt=0 + until make -C packages/core/testing SANDBOX_NAME=$SANDBOX_NAME test-apps-${{ matrix.app }}; do + attempt=$((attempt + 1)) + if [ $attempt -ge 3 ]; then + echo "❌ Attempt $attempt failed, exiting..." + exit 1 + fi + echo "❌ Attempt $attempt failed, retrying..." + done + echo "✅ The task completed successfully after $attempt attempts" collect_report: name: Collect report diff --git a/hack/e2e-apps/clickhouse.bats b/hack/e2e-apps/clickhouse.bats index b1d1f29c..95d86d02 100644 --- a/hack/e2e-apps/clickhouse.bats +++ b/hack/e2e-apps/clickhouse.bats @@ -2,8 +2,7 @@ @test "Create DB ClickHouse" { name='test' - kubectl -n tenant-test get clickhouses.apps.cozystack.io $name || - kubectl create -f- <