fix(actions): stop using argocd cli to wait for app sync, use kubectl instead
All checks were successful
/ validate (push) Successful in 3m20s
All checks were successful
/ validate (push) Successful in 3m20s
This commit is contained in:
parent
7e545e39c3
commit
14f420a13d
1 changed files with 10 additions and 23 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue