0
votes

I'm trying to deploy an artifact from VSTS to an Azure App Service, using Deploy an Azure Web App step template in Octopus Deploy. 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 folder. However, when I use the Octopus deploy, It copies 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 Files step or changing the PackageLocation in the VSTS build is not really an option.

Any help/suggestion is really appreciated.

Thank you.

2

2 Answers

2
votes

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.

1
votes

There isn’t such setting to do it.

You can publish the web app with File System mode , then package the files through Package Application task.