GHA reliability: retry FTP upload #3011

trying SFTP
This commit is contained in:
rusefillc 2021-10-19 11:57:05 -04:00
parent e68568b766
commit 88900936f2
1 changed files with 6 additions and 2 deletions

View File

@ -102,14 +102,18 @@ ls -l $FULL_BUNDLE_FILE
[ -e $FULL_BUNDLE_FILE ] || { echo "$SCRIPT_NAME: ERROR not found $FULL_BUNDLE_FILE"; exit 1; }
if [ -n "$RUSEFI_FTP_SERVER" ]; then
if [ -n "$RUSEFI_BUILD_FTP_USER" ]; then
echo "$SCRIPT_NAME: Uploading full bundle"
ncftpput -u $RUSEFI_BUILD_FTP_USER -p $RUSEFI_BUILD_FTP_PASS $RUSEFI_FTP_SERVER . $FULL_BUNDLE_FILE
echo put $FULL_BUNDLE_FILE . > cmd
cat cmd
sshpass -p $RUSEFI_BUILD_FTP_PASS sftp -o StrictHostKeyChecking=no $RUSEFI_BUILD_FTP_USER@$RUSEFI_FTP_SERVER <<< `cat cmd`
retVal=$?
if [ $retVal -ne 0 ]; then
echo "full bundle upload failed"
exit 1
fi
else
echo "Upload not configured"
fi
cd ..