Reputation: 1304
I have a release in VSTS to deploy my webapp to the azure app service. For this I use a Azure App Service deploy step. After the normal deploy of the webapp I want to add an additional zip artifact from another build result. I want to copy only those file to a specific path of the web application on azure. How can I do that?
Upvotes: 3
Views: 2219
Reputation: 2403
If using Azure DevOps for your CI then an alternative solution is to zip your file(s) including directory structure from the web root and add them into DevOps as a 'secure file' (find this under library/secure files once you've configured an Azure KeyVault).
Then add a pipeline task to download the secure file (use "Download secure file" task) to your build server. Make sure you add a "Reference name" to this task so you can reference the downloaded file path in a later step.
Then add a stand-alone "Azure App Service Deploy" step to deploy just this zip file. Select deployment method of "Zip deploy" and reference your downloaded secure file in the "Package or folder" section, like $(secureFileReferenceName.secureFilePath)
.
This effectively downloads the zip file from secure storage to the build agent and unzips it to wwwroot in the App Service.
Upvotes: 0
Reputation: 33698
If the zip file is the web deploy package, you can refer to Joy’s answer. (Need to check Application option)
Otherwise, the simple way is using Kudu REST API (remain folder structure), steps:
D:/1/a/mylib
)Upvotes: 3
Reputation: 42043
You could use Virtual applications and directories to do it.You could check my steps.
/YourApplication
to site\YourApplication
orsite\wwwroot\YourApplication
Deploy Azure App Service
task/myApplication
Hope it can help you.
Upvotes: 1