I' using a ci/cd environment on circleci that runs on ubuntu.
I'm trying to send a folder (eventually delete old files) to a FTP address.
I've tried ftp and lftp but I think they use prompt to connect to the FTP.
I would like to avoid bash scripts as it complicated to access cicleci environment variables from there (I guess).
so do you know any command line that would look a bit like this
upload-to-ftp $COMPLETE_URL_WITH_USER_AND_PASSWORD -i $FOLDER_PATH -o $REMOTE_FOLDER_PATH
but if I decide to use bash script I would like to be able to enter input in and non exited program for the moment here is my bash script and ci pipeline
- run:
name: Deploy on FTP
command: |
chmod 755 ./.circleci/deploy-to-ftp.sh
./.circleci/deploy-to-ftp.sh "$FTP_HOST"
bash:
ftp_host=${FTP_HOST}
lftp
echo $FTP_HOST
echo $(mirror -R /www/ /dist/my-app/browser/)
exit 1