FTP upload takes 20 minutes and does not complete?

dylan's Avatar

dylan

12 Apr, 2017 12:27 AM

Hi guys,

I'm trying to do an initial configuration of appveyor to see if it's a good fit and it's been great to use so far, with one showstopper.

We have a website that is built by grunt, with all the files copied into a subfolder. none of these files are in the csproj so a web deploy is difficult but it's very easy to simply create a zip as an artefact and use the "application ftp upload" feature.

However, this takes exactly 20 minutes and not all the files upload - I suspect this is a timeout although no error is recorded.

Why is it so slow and is there any way to get this to complete?

  1. Support Staff 1 Posted by Ilya Finkelshte... on 12 Apr, 2017 01:26 AM

    Ilya Finkelshteyn's Avatar

    Hi Dylan,

    You can still try using WebDeploy according to this article.

    You you need to stay with FTP, please share how your deployment configuration loom like and where does your FTP server located.

    Ilya.

  2. 2 Posted by dylan on 13 Apr, 2017 12:25 AM

    dylan's Avatar

    I'm not sure why but my reply didn't seem to appear - the webdeploy method you linked is far easier than the "adding files to webdeploy" I'd been looking at and worked well.

    Thank you for this!

  3. 3 Posted by dylan on 18 Apr, 2017 05:40 AM

    dylan's Avatar

    Can this build be parameterized with a parameters.xml? I'm trying to do this but it doesn't seem to work. Does it have to be a csproj-created web deploy for the parameters.xml to be respected?

    It has the parameters.xml file in the root of the zip file but no parameters are changed.

    Thank you for any help!

  4. Support Staff 4 Posted by Ilya Finkelshte... on 18 Apr, 2017 06:06 AM

    Ilya Finkelshteyn's Avatar

    Yes, please check this part of documentation and this SO discussion.

  5. 5 Posted by dylan on 09 May, 2017 04:24 AM

    dylan's Avatar

    Apologies for opening an old job but I've returned to this and cannot get it to work. I've used the working Xml parameters from another project so I'm confident the syntax is correct.

    The only difference is that one is an automatically generated webdeploy project and the other is the contents of a generated folder zipped and deployed using web deploy as your instructions.

    Are you sure the parameters.xml is processed if there isn't a csproj file and it's a zipped output? Is there something I could be missing?

  6. Support Staff 6 Posted by Ilya Finkelshte... on 10 May, 2017 01:00 AM

    Ilya Finkelshteyn's Avatar

    Hi Dylan,

    My bad I did answer about parameters.xml without double-checking thread history. Right it should be 'real' web deploy package for parameters.xml to work.

    I found this article, which maybe better solution. Please check very last example which contains -setParam switch. You maybe able to use this as a deployment script, without even zipping folder and using AppVeyor's built-in deployment.

    Another (theoretically) possible option is try to mimic web deploy package structure.

    Ilya.

  7. 7 Posted by dylan on 15 May, 2017 05:58 AM

    dylan's Avatar

    I need to do this for a number of different environments - this is being set up to deploy branch testing in separate environments dynamically.

    I believe this means I can't use the standard deployment because I couldn't use different environment (api uri) settings? I don't think I can access the built folder in a script if it's an environment, only an artifact by name.

    If there was an option to run a powershell script with access to the environment variables as part of the environment deployment I could probably simply do a manual creation of the config file and add it to the zip file before deployment, but I don't think this is possible.

    I can see the pre and post deploy commands, but I think that relates to this: https://www.appveyor.com/docs/deployment/agent/#running-powershell-scripts-on-target-server-during-deployment - can you confirm this is the it and let me know if there's more relevant documentation? is there any way to attach a script to the start of an environment deploy with access to the environment variables?

    I'm not sure how setparams could help in this instance - the environment has access to the zipped artifact and I don't think I can run a custom msdeploy command? The only other option I can think of is to create a different project for each branch with the deployment scripts and variables attached to that. I can definitely see how that would work but I was originally hoping to simply maintain a list of environments for different branches and only have one project.

  8. 8 Posted by dylan on 15 May, 2017 11:36 AM

    dylan's Avatar

    I think I might create something to automate the creation of a custom yml file for each branch, this seems like it might work better, and I could use the script at the end of the deployment to modify the artifact. If you have any suggestions they'd be welcome but otherwise I'm hoping this approach will work.

  9. Support Staff 9 Posted by Ilya Finkelshte... on 18 May, 2017 02:09 PM

    Ilya Finkelshteyn's Avatar

    Sorry for late reply. Let me please try to clarify this a little bit.

    • before and after deployment scripts are being executed on build worker machine, while Environment deployment is being executed on central servers (where we do not allow custom scripts).
    • before and after deployment scripts usually make more sense for inline deployment, than for Environment one. Difference between those kind of deployments is here.
    • scripts you mentioned are for agent deployment, which happens in context of agent installed on remote machine. You actually might try this if you are OK to install AppVeyor deployment agent on your server: https://www.appveyor.com/docs/deployment/agent/.
    • I believe that you have a reason to use Environment deployment, instead of inline deployment. but still need to run custom script on the same machine which is dong a deployment. usually reason is to run deployment several times using the same bits but against different environments. You may try deployment project. This is more customize'able way of doing Environment-style deployment.

    Ilya.

  10. dylan closed this discussion on 25 Jul, 2017 01:18 AM.

Comments are currently closed for this discussion. You can start a new one.

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