Deploy in ftps mode

o.murciano's Avatar

o.murciano

13 Jul, 2020 09:52 AM

Hi,

I deploy my application on my Azure server using the FTPS deployment mode.
However, I realize that during the deployment, my old files are still in the destination directory.
My question is, how can I proceed so that before launching my deployment, my destination folder on my server be deleted?

Thanks

  1. Support Staff 1 Posted by Feodor Fitsner on 13 Jul, 2020 06:35 PM

    Feodor Fitsner's Avatar

    Hello,

    Current FTPS implementation in AppVeyor doesn't support old files removal.

    You can use AppVeyor Deployment Agent which supports full sync.

    If FTPS is the only option to deploy to that server then you can use WinSCP which can do full "sync" of local/remote folders and much more.

    The general algorithm for using WinSCP in a build script:

    deploy_script:
    - cmd: |
        choco install -y winscp
        echo open ftpes://%FTP_USER%:%FTP_PSW%@<your-ftp-server>/ > ftp.txt
        echo put <somefile> / >> ftp.txt
        echo exit >> ftp.txt
        "C:\Program Files (x86)\WinSCP\winscp.com" /script=ftp.txt
    

    where FTP_USER and FTP_PSW are secure environment variables defined on either project settings UI or in appveyor.yml.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac