Vowneee
Vowneee

Reputation: 1469

How to deploy Build Artifact separately to AzureWebapp root directory using AzureDevops

We were trying to publish the Allure report generated as part of our AzureDevops build pipeline and it seems Azuredevops has some limitations to publish the report and get a tab to analyze as part of the build output. So as per the Allure Extensions document site saying, we tried alternate option to publish the report to Azure webapp and seems its working fine. We cant try the "FTP Upload" task to upload the artifact to the webapp as its restricted in our environment, so tried with direct "webap deployment" task. Below are the tasks which we tried as part o the pipeline.

We need to publish the report for each pipeline build and by doing the above "AzureRmWebAppDeployment" task, this will replace the previous report artifact and will deploy new one. So we are not getting report for each build.

We dont have FTP connectivity enabled to publish the artifacts to the Appservices and its restricted as per the policy.

So looking for a way to achieve the below items

Upvotes: 0

Views: 512

Answers (2)

Vowneee
Vowneee

Reputation: 1469

We found solution for our requirement by using az web app cli command

az webapp deploy --resource-group 'rg' --name 'apss' --src-path '$(System.DefaultWorkingDirectory)/$(Build.BuildId)/$(Build.BuildId).zip' --type zip --clean false --target-path '$(Build.BuildId)

Here the parameter "--clean false" will keep the existing folders there.

Upvotes: 1

Bowman Zhu
Bowman Zhu

Reputation: 7146

Without using "FTP Upload" task, can we achieve this?

If you want Incremental deployment and you don't want FTP. Then the answer is NO.

Here are all of the deploy method in official document:

Deployment method of App Service

enter image description here

Only FTP deploy can achieve incremental deployment. Even task AzureRmWebAppDeployment@4 in pipeline also use the tech in them.

On the premise that FTP cannot be used, a feasible solution is to generate the report first, and then package it with the entire app, then deploy to app service.

Upvotes: 0

Related Questions