From 14f420a13d1d1af2b6fff1d933ad3d87d6852c6c Mon Sep 17 00:00:00 2001 From: jad0s Date: Fri, 12 Jun 2026 21:37:28 +0200 Subject: [PATCH] fix(actions): stop using argocd cli to wait for app sync, use kubectl instead --- .forgejo/workflows/validate.yaml | 33 ++++++++++---------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/.forgejo/workflows/validate.yaml b/.forgejo/workflows/validate.yaml index c2b4f45..a971d4a 100644 --- a/.forgejo/workflows/validate.yaml +++ b/.forgejo/workflows/validate.yaml @@ -25,8 +25,7 @@ jobs: ./manifests/ - name: Create test cluster - run: | - k3d cluster create test --wait + run: k3d cluster create test --wait - name: Install ArgoCD run: | @@ -40,18 +39,6 @@ jobs: -n argocd kubectl wait --for=condition=available --timeout=60s \ deployment/sealed-secrets-controller -n kube-system - kubectl -n argocd patch secret argocd-secret -p \ - '{"stringData": {"admin.password": "$2a$10$rRyBsGSHK6.uc8fntPwVIuV8td2RMkiY1oiCQGiFLLsZjaGEPTnXK", "admin.passwordMtime": "2024-01-01T00:00:00Z"}}' - kubectl rollout restart deployment/argocd-server -n argocd - kubectl rollout status deployment/argocd-server -n argocd --timeout=60s - - #- name: Login to ArgoCD - # run: | - # argocd login argocd-server.argocd.svc.cluster.local \ - # --plaintext \ - # --grpc-web \ - # --username admin \ - # --password argocd-ci - name: Import SealedSecrets key env: @@ -62,20 +49,20 @@ jobs: kubectl rollout status deployment/sealed-secrets-controller -n kube-system --timeout=60s - name: Apply ArgoCD apps - run: | - kubectl apply -f apps/ + run: kubectl apply -f apps/ - name: Wait for ArgoCD sync run: | - APPS=$(argocd app list -o name) - argocd app sync --core --async $APPS - argocd app wait --core --health --timeout 300 $APPS + sleep 10 + kubectl wait applications \ + --all \ + --namespace argocd \ + --for=jsonpath='{.status.health.status}'=Healthy \ + --timeout=300s - name: Wait for all deployments - run: | - kubectl wait --for=condition=available --timeout=300s deployment --all --all-namespaces + run: kubectl wait --for=condition=available --timeout=300s deployment --all --all-namespaces - name: Cleanup if: always() - run: | - k3d cluster delete test + run: k3d cluster delete test