Publish Zip Package from VSTS

brain.konasara's Avatar

brain.konasara

25 Jan, 2018 01:46 AM

Hi,

I'm trying to deploy an artifact from VSTS to an Azure App Service, using Deploy an Azure Web App step template. The vsts zip package will have a structure like the following:

\Content\C_C\a\1\s\Api{ProjectName\obj\Release\Package\PackageTmp

When I publish the zip file using MsDeploy.exe. It automatically only copy the folders & files inside the PackageTmp folder into the wwwroot. However, when I use the Octopus deploy, It copy all of the folder from Content\. Is there any way to make the Octopus deploy work like using MsDeploy.exe? I'd like to use the zip as is, so adding a Copy File step in the vsts build is not really an option.

Any help/suggestion is really appreciated.

Thank you.

  1. Support Staff 1 Posted by Ben Pearce on 29 Jan, 2018 11:09 AM

    Ben Pearce's Avatar

    Hi Brain,

    Thanks for getting in contact.

    Packaging of ASP.NET applications can be tricky.
    To achieve the layout of the files as you describe, you will have to modify your build step. In the MSBuild arguments section on the build step, ensure you have the following parameters defined:
    /p:WebPublishMethod=FileSystem /p:PackageLocation="$(build.artifactstagingdirectory)\\"

    These two parameters will create the package in the directory specified by the PackageLocation parameter, and it should be in the format you expect.
    In the step where you push the package to Octopus specify this directory as the Package Source.

    If this has not solved your problem, can you please send back some additional details on your build process, such as screenshots and build logs.

    Regards
    Ben

  2. 2 Posted by brain.konasara on 30 Jan, 2018 03:21 PM

    brain.konasara's Avatar

    Thanks Ben,

    Yes it seems I'll have to do that if I want to upload the package into the Azure App Service.

    Regards,
    Brain

  3. brain.konasara closed this discussion on 30 Jan, 2018 03:22 PM.

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