FTP Deploy - How to remove path element from artifact

jay.rosenthal's Avatar

jay.rosenthal

26 Apr, 2018 07:28 PM

Hi All,
This feels like a pretty simple thing but after hours of trying and googling, I have to ask an expert.

I have an artifact defined like:

artifacts: 
  - path: Release\en-us\MyInstaller.msi 
     name: POSHInstaller 

my deploy for FTP like this:

deploy:   
   - provider: FTP 
     protocol: ftp 
     host: ftp.myco.com 
     username:  user
     password:  pw
     artifact: POSHInstaller 
     folder: PowerShell

The artifact get copied to my FTP server at PowerShell\Release\en-us\MyInstaller.msi
I really want it at PowerShell\MyInstaller.msi

How (or can) I more explicitly define the target folder ? Or at least get the results I want ?

Thanks

  1. Support Staff 1 Posted by Ilya Finkelshte... on 26 Apr, 2018 09:01 PM

    Ilya Finkelshteyn's Avatar

    Right, this can be confusing. You can do one if the following:

    • Run copy Release\en-us\MyInstaller.msi as say after_build script and then set - path: MyInstaller.msi under artifacts. Assuming you do not have already some another MyInstaller.msi in the root of your repo clone.

    or

    • Set - path: Release\en-us under artifacts. Then add application: POSHInstaller to FTP deployment setting. In this case AppVeyor will zip Release\en-us folder when creating an artifact and unzip it when deploying to FTP. Assuming Release\en-us does not have other files, which should not be deployed.

    Let us know if this helps. If both options are not good for you we can go for more creative solutions using 7z and pushing artifacts from scripts.

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