Duplicate Steps for each env when deploying to Azure Web Apps?

Am i correct that if i have 3 environments on Azure for my websites.

I need to create the exact same step 3 times, but once for each Environment?

Hi Mark,

Thanks for getting in touch. You shouldn’t need to duplicate anything, no. Environments are a really good way to model “Release Promotion” where you promote the same Release (content + binaries) from Development to Test and then Production. You can also use Environments to model things like geographic regions in Azure, like Production-AU, Production-EU, Production-US.

And then you should generally write your steps once, and use Variables scoped to your Environments to handle the differences between Environments. You can scope Steps so they only run in certain Environments, but this is typically so you can deal with major differences between environments. For example, you might use Azure Traffic Manager in your Production Environments, but don’t want to use it in your Development Environment, so you create a Step that only runs in Production to configure the Azure Traffic Manager.

A really good example of this is in our walkthrough of the new Octopus 3.2 Channels features. (You might not benefit from Channels, but there’s a good example of good old Release Promotion).

Hope this helps!
Mike

@Mike,

But when I create a process step to Deploy an Azure Website, I have to specify the actual azure site in the step, rather than referrering to a “role” / target.

I don’t see how i can use the process step for an azure web site.

Hi Mark,

I see what you’re getting at. We let you choose a specific Azure Web Site as a convenience, but you can also use a Variable Expression since we just need the Name of the Web Site to deploy to it.

Take a look at the sample deployment step from the walkthrough I mentioned: https://demo.octopusdeploy.com/app#/projects/channels-sample/process/step/37ccb7fe-5cda-4ea6-9967-379cadb1b58a

You’ll notice there are very few places where you cannot use Variable Expressions to make Octopus bend to your will.

Hope that helps!
Mike