0
votes

In VSTS, I've set up continuous integration. One of my first steps is to use the Azure Resource Group task to deploy my ARM template to the server.

Within my ARM template, I'm provisioning a resource that has a custom name generated using the uniqueString function. In a later step, I'm using an Azure App Service Deploy task to push my code to the App Service Web App.

The problem is that since my provisioned App Service name is generated at the time of deployment, my App Service Deploy task has no idea what it is.

I assume the best way to solve this is to set a build variable equal to the App Service name when it's generated within the ARM template. But I can't find any references on how to do so. Any ideas?

1

1 Answers

1
votes

It doesn't look like the functionality to copy ARM template outputs into Build variables exists out-of-the-box at the moment. However, Kees Schollaart has written a handy little extension that's available in the Visual Studio Marketplace called ARM Outputs. Click here for details.

Installing this is easy. Just do the following:

  1. In your build definition, click "Add Task"
  2. Under the header of "Add Tasks", there's a hyperlink of "Don't see what you need? Check out our Marketplace." Click it!
  3. Search for "ARM Outputs". Then follow the prompts to add it to your environment.

Once added, you can add it like any other task. Note: you'll need to exit the build definition and come back for the app to pick up the new extension and include it in your list of available tasks to add.