Skip to content

Commit

Permalink
Preview mode: trigger refresh of argocd applications (#410)
Browse files Browse the repository at this point in the history
Force refresh of argoCD applications after changes are pushed.
  • Loading branch information
Michkov authored Jun 1, 2022
1 parent 98f9e66 commit dcc6ee8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hack/preview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ git checkout $MY_GIT_BRANCH
#set the local cluster to point to the current git repo and branch and update the path to development
$ROOT/hack/util-update-app-of-apps.sh $MY_GIT_REPO_URL development $PREVIEW_BRANCH

# trigger refresh of apps
for APP in $(kubectl get apps -n openshift-gitops -o name); do
kubectl patch $APP -n openshift-gitops --type merge -p='{"metadata": {"annotations":{"argocd.argoproj.io/refresh": "hard"}}}'
done

# Make sure we have a tekton-chains namespace
echo "Checking to see if tekton-chains namespace exists"
while ! kubectl get namespace tekton-chains &> /dev/null; do
Expand Down

0 comments on commit dcc6ee8

Please sign in to comment.