Skip to content

Commit

Permalink
Retry version creation failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
ladar committed Nov 3, 2023
1 parent 2f817ee commit ee7745a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions res/scripts/direct.sh
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ function upload_box() {

if [ "$(${CURL} -so /dev/null --write-out "%{onerror}" https://lavabit.com 2>&1)" ] || \
[ "$(${CURL} -so /dev/null --write-out "%{errormsg}" https://lavabit.com 2>&1)" ]; then
UPLOAD_FILE_WRITEOUT="\nFILE: $FILENAME\nREPO: $ORG/$BOX\nCODE: %{http_code}\nIP: %{remote_ip}\nBYTES: %{size_upload}\nRATE: %{speed_upload}\nTOTAL TIME: %{time_total}\n"
UPLOAD_FILE_WRITEOUT="\nFILE: $FILENAME\nREPO: $ORG/$BOX\nCODE: %{http_code}\nIP: %{remote_ip}\nBYTES: %{size_upload}\nRATE: %{speed_upload}\nTOTAL TIME: %{time_total}\n"w
UPLOAD_CALLBACK_WRITEOUT=""
fi

Expand All @@ -361,7 +361,7 @@ function upload_box() {
--header "Authorization: Bearer $VAGRANT_CLOUD_TOKEN" \
"https://app.vagrantup.com/api/v2/box/$ORG/$BOX/version/$VERSION/provider/$PROVIDER/$ARCH" | \
jq -e -r ' (.name)? // (.success)? '`" != "false" ] && \
{ ${CURL} --tlsv1.2 --silent --retry 4 --retry-delay 2 --max-time 180 --request DELETE --fail \
{ retry ${CURL} --tlsv1.2 --silent --retry 4 --retry-delay 2 --max-time 180 --request DELETE --fail \
--output /dev/null --header "Authorization: Bearer $VAGRANT_CLOUD_TOKEN" \
"https://app.vagrantup.com/api/v2/box/$ORG/$BOX/version/$VERSION/provider/${PROVIDER}/${ARCH}" && sleep 4 || \
{ printf "${T_BYEL} Provider delete failed. [ $ORG $BOX $PROVIDER $ARCH $VERSION ]${T_RESET}\n" >&2 ; exit 1 ; } ; }
Expand Down

0 comments on commit ee7745a

Please sign in to comment.