From 471a2ef9157e3a4595f142027cfcf1f44b7a166d Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 18 Oct 2021 21:06:25 -0400 Subject: [PATCH] GHA reliability: retry FTP upload #3011 trying SFTP --- java_console/upload_file.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/java_console/upload_file.sh b/java_console/upload_file.sh index e8db7cd793..7caa28293d 100755 --- a/java_console/upload_file.sh +++ b/java_console/upload_file.sh @@ -6,6 +6,12 @@ # todo: rename this script since it's a universal one? # +# user=$1 +# pass=$2 +# host=$3 +# destination_folder=$4 +# file_to_upload=$5 + if [ ! "$1" ] || [ ! "$2" ] || [ ! "$3" ]; then echo "No Secrets" exit 0 @@ -13,4 +19,7 @@ fi echo -e "\nUploading file: $5" -ncftpput -r 999 -m -R -v -u "$1" -p "$2" "$3" $4 $5 +# ncftpput -r 999 -m -R -v -u "$1" -p "$2" "$3" $4 $5 + +echo put $5 $4 > cmd +sshpass -p $2 sftp -o StrictHostKeyChecking=no $1@$3 <<< `cat cmd` \ No newline at end of file