Skip to content

Commit

Permalink
[MDS-5064] Added arguments to argocd commands
Browse files Browse the repository at this point in the history
  • Loading branch information
sjudzentis committed Jul 31, 2023
1 parent 0cd3ad2 commit fafe2ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/core-api.build.deploy.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ jobs:
version: v2.7.9 # optional
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: argocd login
run: argocd login ${{ secrets.ARGOCD_SERVER }} --auth-token ${{ secrets.ARGO_CD_CLI_JWT }} --grpc-web --insecure
- 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.ARGO_CD_CLI_JWT }}

run-if-failed:
runs-on: ubuntu-20.04
Expand Down
6 changes: 4 additions & 2 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!"}
ARGOCD_SERVER=${5?"Enter ARGOCD_SERVER!"}
ARGOCD_AUTH_TOKEN=${6?"Enter ARGOCD_AUTH_TOKEN!"}

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

Expand All @@ -24,8 +26,8 @@ echo -e "\n"
echo "Watching for new revision of $TARGET_APP to be rolled out"
echo "Waiting for $TARGET_APP to sync and be in healthy state"

argocd app sync $TARGET_APP
argocd app wait $TARGET_APP
argocd app sync $TARGET_APP --server $ARGOCD_SERVER --auth-token $ARGOCD_AUTH_TOKEN
argocd app wait $TARGET_APP --server $ARGOCD_SERVER --auth-token $ARGOCD_AUTH_TOKEN

echo "Target Revision is achieved $CURRENT_REVISION"

Expand Down

0 comments on commit fafe2ac

Please sign in to comment.