diff --git a/hack/preview.sh b/hack/preview.sh index 6d89d950b..e51729ece 100755 --- a/hack/preview.sh +++ b/hack/preview.sh @@ -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