GHA reliability: retry FTP upload #3011

not ignoring upload issues
This commit is contained in:
rusefillc 2021-10-18 20:44:28 -04:00
parent 428e367af5
commit 7673059574
2 changed files with 13 additions and 0 deletions

View File

@ -1,5 +1,8 @@
#!/bin/bash
# user=$1
# pass=$2
# host=$3
if [ ! "$1" ] || [ ! "$2" ] || [ ! "$3" ]; then
echo "No Secrets"

View File

@ -105,6 +105,11 @@ ls -l $FULL_BUNDLE_FILE
if [ -n "$RUSEFI_FTP_SERVER" ]; then
echo "$SCRIPT_NAME: Uploading full bundle"
ncftpput -u $RUSEFI_BUILD_FTP_USER -p $RUSEFI_BUILD_FTP_PASS $RUSEFI_FTP_SERVER . $FULL_BUNDLE_FILE
retVal=$?
if [ $retVal -ne 0 ]; then
echo "full bundle upload failed"
exit 1
fi
fi
cd ..
@ -125,6 +130,11 @@ cd ..
ls -l $UPDATE_BUNDLE_FILE
if [ -n "$RUSEFI_FTP_SERVER" ]; then
ncftpput -u "$RUSEFI_BUILD_FTP_USER" -p "$RUSEFI_BUILD_FTP_PASS" "$RUSEFI_FTP_SERVER" autoupdate "$UPDATE_BUNDLE_FILE"
retVal=$?
if [ $retVal -ne 0 ]; then
echo "autoupdate upload failed"
exit 1
fi
fi
cd ..
mv temp/$UPDATE_BUNDLE_FILE artifacts