build: Use argocd app apply instead of kubectl

This commit is contained in:
Nikolai Rodionov 2023-05-21 17:38:20 +02:00
parent 38d271958b
commit 26c8f97789
No known key found for this signature in database
GPG Key ID: 19DB54039EBF8F10

View File

@ -37,7 +37,7 @@ print `envsubst < ./kube/application.yaml > /tmp/application.yaml` or die $!;
print `yq -i '.spec.source.helm.values = load_str("/tmp/values.yaml")' /tmp/application.yaml` or die $!; print `yq -i '.spec.source.helm.values = load_str("/tmp/values.yaml")' /tmp/application.yaml` or die $!;
if(!defined $ENV{DEPLOY_SCRIPT_DEBUG}){ if(!defined $ENV{DEPLOY_SCRIPT_DEBUG}){
print `kubectl apply -f /tmp/application.yaml` or die $!; print `argocd app create -f /tmp/application.yaml --upsert` or die $!;
print `argocd app sync -l application=badhouseplants -l branch=$git_branch` or die $!; print `argocd app sync -l application=badhouseplants -l branch=$git_branch` or die $!;
print `argocd app wait -l application=badhouseplants -l branch=$git_branch` or die $!; print `argocd app wait -l application=badhouseplants -l branch=$git_branch` or die $!;
} }