diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 178d3dc..da9ce03 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,10 +74,18 @@ jobs: java-version: '17' - name: 🛃 Test generated trust stores + id: test_generated_stores run: ./testdata/e2e/testConfigMaps.sh + continue-on-error: true - - name: 📜 Show pod logs + - name: 📜 Print pod logs run: ./testdata/e2e/show-pod-logs.sh + + - name: ❌ Fail if 'Test generated trust stores' failed + if: steps.test_generated_stores.outcome=='failure' + run: | + echo "Step 'Test generated trust stores' failed: Check 'Test generated trust storesr' and 'Print pod logs' as well as the job summary for errors" + exit 1 helm: name: Helm Checks diff --git a/testdata/e2e/installChart.sh b/testdata/e2e/installChart.sh index 086ffac..f5de10e 100755 --- a/testdata/e2e/installChart.sh +++ b/testdata/e2e/installChart.sh @@ -5,5 +5,7 @@ helm upgrade --install java-truststore-injection-webhook chart \ --namespace jti \ --create-namespace \ -f testdata/e2e/e2e-values.yaml \ - --atomic + --atomic \ + --wait \ + --timeout 60s kubectl get pods -n jti diff --git a/testdata/e2e/show-pod-logs.sh b/testdata/e2e/show-pod-logs.sh index 874c141..879e7aa 100755 --- a/testdata/e2e/show-pod-logs.sh +++ b/testdata/e2e/show-pod-logs.sh @@ -3,5 +3,5 @@ set -e echo "## Pod adguardhome-origin logs" >> $GITHUB_STEP_SUMMARY echo '```' >> $GITHUB_STEP_SUMMARY -kubectl logs -l app.kubernetes.io/instance=java-truststore-injection-webhook >> $GITHUB_STEP_SUMMARY +kubectl logs -l app.kubernetes.io/instance=java-truststore-injection-webhook --namespace jti >> $GITHUB_STEP_SUMMARY echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/testdata/e2e/testConfigMaps.sh b/testdata/e2e/testConfigMaps.sh index 729bd26..ed842cb 100755 --- a/testdata/e2e/testConfigMaps.sh +++ b/testdata/e2e/testConfigMaps.sh @@ -1,6 +1,6 @@ #!/bin/bash set -e - +kubectl get svc -n jti echo "💾 Creating ConfigMaps" kubectl apply -n jti -f testdata/e2e/testConfigMaps.yaml