From 3ebe89ecb543ad1c34cf71f0eab8ded026630840 Mon Sep 17 00:00:00 2001 From: Lennart Jern Date: Sun, 5 Jan 2025 21:18:33 +0200 Subject: [PATCH] Expand chainsaw test --- .github/workflows/kind-deploy.yaml | 2 ++ .github/workflows/kustomize-build.yaml | 2 +- chainsaw-test.yaml | 49 ++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) diff --git a/.github/workflows/kind-deploy.yaml b/.github/workflows/kind-deploy.yaml index 501c0ce..f882cca 100644 --- a/.github/workflows/kind-deploy.yaml +++ b/.github/workflows/kind-deploy.yaml @@ -18,3 +18,5 @@ jobs: - name: Chainsaw test run: chainsaw test + env: + BITWARDEN_ACCESS_TOKEN: ${{ secrets.BITWARDEN_ACCESS_TOKEN }} diff --git a/.github/workflows/kustomize-build.yaml b/.github/workflows/kustomize-build.yaml index 26e961e..3540eb1 100644 --- a/.github/workflows/kustomize-build.yaml +++ b/.github/workflows/kustomize-build.yaml @@ -6,7 +6,7 @@ on: - main jobs: - kustomize-sops-build: + kustomize-build: strategy: matrix: path: diff --git a/chainsaw-test.yaml b/chainsaw-test.yaml index 72f170c..a17ea19 100644 --- a/chainsaw-test.yaml +++ b/chainsaw-test.yaml @@ -40,3 +40,52 @@ spec: # and that this element status is `True` (conditions[?type == 'Available']): - status: 'True' + - try: + # Apply the app of apps + - script: + timeout: 10s + content: kubectl apply -k apps/kind + # Ensure that the external-secrets are operational before continuing + - assert: + timeout: 2m + resource: + apiVersion: apps/v1 + kind: Deployment + metadata: + name: external-secrets-webhook + namespace: external-secrets + status: + (conditions[?type == 'Available']): + - status: 'True' + # Create secret store and token secret + - script: + timeout: 10s + content: | + kubectl -n external-secrets create secret generic bitwarden-access-token --from-literal=token=${BITWARDEN_ACCESS_TOKEN} + kubectl apply -f secret-store/test-secretstore.yaml + # Verify that nextcloud becomes ready + - assert: + timeout: 5m + resource: + apiVersion: apps/v1 + kind: Deployment + metadata: + name: nextcloud + namespace: nextcloud + status: + (conditions[?type == 'Available']): + - status: 'True' + # Verify app of apps + - assert: + timeout: 5m + resource: + apiVersion: argoproj.io/v1alpha1 + kind: Application + metadata: + name: apps + namespace: argocd + status: + health: + status: Healthy + sync: + status: Synced