0
votes

I have a release template in vsts that I use in DEV environment to deploy to a single web app using an arm template for Azure.

There are two tasks in the release:

  • Azure Resource Group Deployment: deploys the arm template to Azure to create Azure resources.
  • Azure App Service Deploy: Deploys code to those resources.

For UAT environment, we've amended the arm template so that it uses copy and copyIndex in the document to create multiple webapps in different locations in Azure.

I would like to use the same task Azure App Service Deploy to deploy to the array of webapps. However, I can only see one property for the task called: App Service name which will only accept a value. What happens if I want to deploy to an array of web apps? Is there another task I can use?

1
Add multiple App Service Deploy tasks with different parameters? Otherwise you probably need a script that uses something like Zip Push Deploy.juunas
Thanks for the comment juunas. The issue is that the ARM deployment step is outputting an array of webapps at runtime. therefore I can't hardcode (at least I'd like not to). Ideally I'd want to pass the array to something that could then deployossentoo
Ahh, right. Then you do need some kind of script. Or at least the App Service Deploy task cannot do this.juunas
I was hoping that was not the case. Anyway, therefore it must mean more powershell.ossentoo

1 Answers

1
votes

There isn’t the built-in task that can deploy multiple apps to Azure app services directly, you can deploy them through PowerShell directly (Using Azure PowerShell task)

You also can build a custom build/release task through VSTS extension to meet your requirement. Add a build or release task

There is the source code of Azure App Service Deploy task that you can refer to: AzureRmWebAppDeployment