File tree Expand file tree Collapse file tree 2 files changed +27
-5
lines changed Expand file tree Collapse file tree 2 files changed +27
-5
lines changed Original file line number Diff line number Diff line change @@ -68,11 +68,7 @@ preview-%:
6868
6969.PHONY : operator-deploy
7070operator-deploy operator-upgrade : validate-prereq validate-origin validate-cluster # # runs helm install
71- @set -e -o pipefail
72- # Retry five times because the CRD might not be fully installed yet
73- for i in {1..5}; do \
74- helm template --include-crds --name-template $(NAME ) $(PATTERN_INSTALL_CHART ) $(HELM_OPTS ) | oc apply -f- && break || sleep 10; \
75- done
71+ @common/scripts/deploy-pattern.sh $(NAME ) $(PATTERN_INSTALL_CHART ) $(HELM_OPTS )
7672
7773.PHONY : uninstall
7874uninstall : # # runs helm uninstall
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -o pipefail
3+
4+ RUNS=5
5+ # Retry five times because the CRD might not be fully installed yet
6+ echo -n " Installing pattern: "
7+ for i in $( seq 1 ${RUNS} ) ; do \
8+ exec 3>&1 4>&2
9+ OUT=$( { helm template --include-crds --name-template $* 2>&4 | oc apply -f- 2>&4 1>&3 ; } 4>&1 3>&1 )
10+ exec 3>& - 4>& -
11+ ret=$?
12+ if [ ${ret} -eq 0 ]; then
13+ break ;
14+ else
15+ echo -n " ."
16+ sleep 10
17+ fi
18+ done
19+
20+ # All the runs failed
21+ if [ ${i} -eq ${RUNS} ]; then
22+ echo " Installation failed [${i} /${RUNS} ]. Error:"
23+ echo " ${OUT} "
24+ exit 1
25+ fi
26+ echo " Done"
You can’t perform that action at this time.
0 commit comments