Best way to package node_modules and push to azure

Ben Cooper's Avatar

Ben Cooper

01 Apr, 2016 08:53 PM

I am building a node app and want to push to azure via FTP, but everytime I try to package the artifact and push via FTP it takes between 20/40 minutes, and viewing the build on the interface crashes my browser which I presume is a performance issue on the appveyor app.

Is their anyway to get this build time down?

  1. Support Staff 1 Posted by Feodor Fitsner on 01 Apr, 2016 08:59 PM

    Feodor Fitsner's Avatar

    I would use Web Deploy instead of FTP. It's much faster and efficient.

  2. 2 Posted by Ben Cooper on 01 Apr, 2016 09:08 PM

    Ben Cooper's Avatar

    Hey Feodor,

    Awesome service bro by the way, 6 minutes later :)

    I was told by a colleague that web deploy was only for VS projects, is that incorrect?

    B

  3. Support Staff 3 Posted by Feodor Fitsner on 01 Apr, 2016 09:11 PM

    Feodor Fitsner's Avatar

    Not necessary. You are probably already producing zip artifact at the moment so it's good to go for Web Deploy provider: http://www.appveyor.com/docs/deployment/web-deploy#azure-web-sites

  4. 4 Posted by Ben Cooper on 01 Apr, 2016 09:20 PM

    Ben Cooper's Avatar

    I will give it a try, thanks Feodor :)

    B

  5. 5 Posted by Ben Cooper on 01 Apr, 2016 09:26 PM

    Ben Cooper's Avatar

    Quick one, a lot of the time up to 20 minutes is spent creating the artifact, even though I just want to send the full repo to azure. Any recommendations on how to quicken this process up? It's not a large project, but it seems packaging the node_modules takes a hefty chunk of time.

    B

  6. Support Staff 6 Posted by Feodor Fitsner on 01 Apr, 2016 11:17 PM

    Feodor Fitsner's Avatar

    I think you can use msdeploy.exe command line to sync folder to Azure website. To sync entire build folder to website add this to your appveyor.yml:

    environment:
      website_name: <your-azure-website>
      website_password: <your-azure-website-password>
      
    deploy_script:
    - '"C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:contentPath=''%appveyor_build_folder%'' -dest:contentPath=''%website_name%'',ComputerName=''https://%website_name%.scm.azurewebsites.net/msdeploy.axd?site=%website_name%'',UserName=''$%website_name%'',Password=''%website_password%'',IncludeAcls=''False'',AuthType=''Basic'' -verb:sync -retryAttempts:2'
    
  7. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:05 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