Skip to content

Commit

Permalink
[MDS-5064] Bug Fix - Gitops deploys and updates deployment revision n…
Browse files Browse the repository at this point in the history
…umber before polling can happen
  • Loading branch information
sjudzentis committed Jul 24, 2023
1 parent 23a3c39 commit 41bff9a
Show file tree
Hide file tree
Showing 22 changed files with 131 additions and 27 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/core-api.build.deploy.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh core-api dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh core-api dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/core-api.deploy.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh core-api prod ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh core-api prod ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/core-api.deploy.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,17 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
if: ${{ env.NEEDS_ROLLOUT=='true' }}
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
if: ${{ env.NEEDS_ROLLOUT=='true' }}
run: ./gitops/watch-deployment.sh core-api test ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh core-api test ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/core-web.build.deploy.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh core-web dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh core-web dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/core-web.deploy.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh core-web prod ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh core-web prod ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/core-web.deploy.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,17 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
if: ${{ env.NEEDS_ROLLOUT=='true' }}
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
if: ${{ env.NEEDS_ROLLOUT=='true' }}
run: ./gitops/watch-deployment.sh core-web test ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh core-web test ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/docman.build.deploy.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh docman dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh docman dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/docman.deploy.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh docman prod ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh docman prod ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/docman.deploy.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh docman test ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh docman test ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/filesystem-provider.build.deploy.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh filesystem-provider dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh filesystem-provider dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/filesystem-provider.deploy.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh filesystem-provider prod ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh filesystem-provider prod ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/filesystem-provider.deploy.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh filesystem-provider test ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh filesystem-provider test ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/minespace.build.deploy.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh minespace dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh minespace dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/minespace.deploy.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh minespace prod ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh minespace prod ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/minespace.deploy.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,17 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
if: ${{ env.NEEDS_ROLLOUT=='true' }}
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
if: ${{ env.NEEDS_ROLLOUT=='true' }}
run: ./gitops/watch-deployment.sh minespace test ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh minespace test ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/nris.build.deploy.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh nris dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh nris dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/nris.deploy.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh nris prod ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh nris prod ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/nris.deploy.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh nris test ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh nris test ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/tusd.build.deploy.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh tusd dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh tusd dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/tusd.deploy.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh tusd prod ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh tusd prod ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/tusd.deploy.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,15 @@ jobs:
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
if: ${{ env.NEEDS_ROLLOUT=='true' }}
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.8
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh tusd test ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }}
run: ./gitops/watch-deployment.sh tusd test ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGOCD_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
11 changes: 5 additions & 6 deletions gitops/watch-deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ TARGET_APP=${1?"Enter App Name !"}
ENV=${2?"Enter ENV Name !"}
GIT_SHA=${3?"Enter GIT SHA of commit!"}
DISCORD_DEPLOYMENT_WEBHOOK=${4?"Enter DISCORD_DEPLOYMENT_WEBHOOK!"}
export ARGOCD_SERVER=${5?"Enter ARGOCD_SERVER!"}
export ARGOCD_AUTH_TOKEN=${6?"Enter ARGOCD_AUTH_TOKEN!"}

REPO_LOCATION=$(git rev-parse --show-toplevel)

Expand All @@ -22,13 +24,10 @@ echo "Current Revision of $TARGET_APP is $CURRENT_REVISION"

echo -e "\n"
echo "Watching for new revision of $TARGET_APP to be rolled out"
echo "Polling to watch rollout to achieve the target revision of $TARGET_REVISION"
echo "Waiting for $TARGET_APP to sync and be in healthy state"

until [ $CURRENT_REVISION == $TARGET_REVISION ]; do
sleep 2
CURRENT_REVISION=$(get_revision)
echo "Refreshing the revision of $TARGET_APP, currently $CURRENT_REVISION, waiting for $TARGET_REVISION"
done
argocd app sync $TARGET_APP
argocd app wait $TARGET_APP

echo "Target Revision is achieved $CURRENT_REVISION"

Expand Down

0 comments on commit 41bff9a

Please sign in to comment.