From c00f8c61740df1c9a84de7502409c3ca6be64b23 Mon Sep 17 00:00:00 2001 From: Bruno Bressi Date: Tue, 26 Sep 2023 21:01:21 +0200 Subject: [PATCH] debug: switch to own k3d installation --- .github/workflows/end2end.yaml | 37 +++++++++++++--------------------- Makefile | 3 ++- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/.github/workflows/end2end.yaml b/.github/workflows/end2end.yaml index c6e1064..1f9f0cd 100644 --- a/.github/workflows/end2end.yaml +++ b/.github/workflows/end2end.yaml @@ -7,14 +7,13 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v3 - - name: Create Cluster - uses: AbsaOSS/k3d-action@v2 - with: - cluster-name: cosign-tests - k3d-version: v5.4.6 - - name: Create Local Registry + - name: Install k3d + run: | + curl -s https://raw.githubusercontent.com/rancher/k3d/main/install.sh | bash + k3d version + - name: Create Cluster & Registry run: | - k3d registry create registry.localhost --port 5000 + make test-create-cluster - name: Check Cluster Nodes run: | kubectl get nodes @@ -61,19 +60,11 @@ jobs: make test-deploy - name: Check Deployment run: | - STATUS=$(kubectl -n cosignwebhook get deployment cosignwebhook -o jsonpath={.status.readyReplicas}) - if [[ $STATUS -ne 1 ]] - then - echo "Deployment cosignwebhook not ready" - kubectl -n cosignwebhook get events - kubectl logs -n cosignwebhook deployment/cosignwebhook cosignwebhook - kubectl logs -n cosignwebhook deployment/cosignwebhook sccosign - kubectl logs -n cosignwebhook deployment/cosignwebhook scwebhook - kubectl describe -n cosignwebhook deployment/cosignwebhook - exit 1 - else - echo "Deployment cosignwebhook OK" - fi - - name: Run End2End Tests - run: | - make test-e2e + echo "Waiting for deployment to be ready" + sleep 60 + echo "Deployment cosignwebhook not ready" + kubectl -n cosignwebhook get events + kubectl describe -n cosignwebhook deployment/cosignwebhook +# - name: Run End2End Tests +# run: | +# make test-e2e diff --git a/Makefile b/Makefile index f8533b5..283746e 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,8 @@ test-deploy: --set image.repository=k3d-registry.localhost:5000/cosignwebhook \ --set image.tag=dev \ --set-file cosign.scwebhook.key=cosign.pub \ - --set logLevel=debug + --set logLevel=debug \ + --wait --debug .PHONY: test-e2e test-e2e: