File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ error() { echo "ERROR: $*" ; false ; }
2121
2222trap ' echo "errexit on line $LINENO, $0" >&2' ERR
2323
24+ MAX_BUILD_ATTEMPTS=2
25+
2426
2527# "best-effort" cleanup of image
2628function clean_image {
@@ -151,7 +153,7 @@ function docker_build_with_version {
151153 fi
152154 i=1
153155 build_failed=1
154- while [ $i -le 2 ]; do
156+ while [ $i -le $MAX_BUILD_ATTEMPTS ]; do
155157 command=" docker build ${BUILD_OPTIONS} -f $dockerfile ${DOCKER_BUILD_CONTEXT} "
156158 echo " -> building using $command "
157159 set +x -o pipefail
@@ -174,7 +176,7 @@ function docker_build_with_version {
174176 fi
175177 (( i++ ))
176178 sleep 5
177- echo " Retrying to build image for version $dir , attempt $i of 2 ."
179+ echo " Retrying to build image for version $dir , attempt $i of $MAX_BUILD_ATTEMPTS ."
178180 else
179181 # Structure of log build is as follows:
180182 # COMMIT
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ copy_md_files:
151151remove_md_files :
152152 @for version in $(VERSIONS ) ; do \
153153 if ls $$ version/* .md 1> /dev/null 2>&1 ; then \
154- rm -v $$ version/root/* .md ; \
154+ rm -fv $$ version/root/* .md ; \
155155 fi ; \
156156 done
157157
You can’t perform that action at this time.
0 commit comments