File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,9 +123,33 @@ log_phase "etcd available after $WAIT_TIME seconds"
123123
124124log_phase " Publishing release from source tree"
125125
126- # TODO: detect where IMAGE_PREFIX=deis/ and DEV_REGISTRY=registry.hub.docker.com
127- # and disallow it so we can't pollute the production account.
128- make dev-release
126+ set +e
127+ trap - ERR
128+
129+ RETRY_COUNT=1
130+
131+ while [ $RETRY_COUNT -le 3 ]; do
132+ # TODO: detect where IMAGE_PREFIX=deis/ and DEV_REGISTRY=registry.hub.docker.com
133+ # and disallow it so we can't pollute the production account.
134+ make dev-release
135+ RESULT=$?
136+
137+ if [ $RESULT -ne 0 ]; then
138+ echo " Docker Hub push failed. Attempt $RETRY_COUNT of 3."
139+ else
140+ break
141+ fi
142+
143+ (( RETRY_COUNT += 1 ))
144+ done
145+
146+ set -e
147+ trap dump_logs ERR
148+
149+ if [ $RETRY_COUNT -gt 3 ]; then
150+ echo " Docker Hub push failed the maximum number of times, aborting."
151+ false
152+ fi
129153
130154log_phase " Provisioning Deis"
131155
You can’t perform that action at this time.
0 commit comments