Unverified Commit d5674b9b authored by torgiren's avatar torgiren
Browse files

add wait for deploy to sync

Signed-off-by: torgiren's avatarMarcin Fabrykowski <git@fabrykowski.pl>
parent a383d614
No related merge requests found
Showing with 10 additions and 0 deletions
+10 -0
......@@ -27,6 +27,8 @@ upload:
- git config --global user.email "${GITLAB_USER_EMAIL}"
- mkdir -p ~/.ssh
- ssh-keyscan -t rsa gitlab.exphost.pl >> ~/.ssh/known_hosts
- curl -L "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl
- chmod +x /usr/local/bin/kubectl
script:
- export VERSION=$(git describe --tags)
- git clone $repo repo
......@@ -39,6 +41,14 @@ upload:
git commit -m "update by gitlab-ci" &&
git push
fi
- wait_timeout = 60
- for try in {1..60} do
state==$(kubectl -n argocd get applications "$waitapp" -o template='{{.status.health.status}},{{.status.sync.status}},{{.spec.source.targetRevision}}')
echo $state
[ "$state" == "Healthy,Synced,$$VERSION"] && break
sleep 5
done
- [ $$try -lt 60 ]
.deploy-to-git-subapp:
extends: .deploy-to-git
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment