You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Loop to wait until SERVER_CLUSTER_ROLE is removed from the Argo CD server Deployment
15
+
for i in {1..30}; do
16
+
if oc get deployment openshift-gitops-argocd-server -n openshift-gitops -o jsonpath='{.spec.template.spec.containers[0].env}' | grep -q 'SERVER_CLUSTER_ROLE=custom-argocd-role'; then
17
+
echo "Waiting for SERVER_CLUSTER_ROLE to be removed..."
18
+
sleep 5
19
+
else
20
+
echo "SERVER_CLUSTER_ROLE has been removed."
21
+
break
22
+
fi
23
+
done
24
+
# If after the loop the variable is still set, fail the step
25
+
if oc get deployment openshift-gitops-argocd-server -n openshift-gitops -o jsonpath='{.spec.template.spec.containers[0].env}' | grep -q 'SERVER_CLUSTER_ROLE=custom-argocd-role'; then
26
+
echo "ERROR: SERVER_CLUSTER_ROLE was not removed after waiting."
0 commit comments