Promoting between Azure Subscriptions

We have a site that we deploy to an Azure webapp. As part of the lifecycle the site is promoted through different subscriptions:

  • Developer Subscription
  • Test Subscription
  • Production Subscription

With a web app selected at each level.

Looking at your documentation it looks like for a while you had a different methodology where you considered web app’s targets, they could then be treated like servers and given scopes for the lifecycle. I have played around with specifying variables for the Azure subscription selection and web app selection, but how do I:

  • Specify that the variables are scoped against the lifecycle stages?
  • Make the azure web app deploy steps relevant to a lifecycle? they don’t appear to even trigger if you scope the step against an environment in the lifecycle that has no target (because it’s a web app).

Hi Richard,

Thank you for reaching out! It looks like you’re close, but instead of scoping to the lifecycle, you’d want to scope to the environment. To do this:

  1. Set up 3 variables each for your subscription and for your web app
  2. Scope the 3 to match your environments

It would look something like this:

Variable: Subscription - Value: XYZ - scope: Developer environment
Variable: Subscription - Value: XYZ - scope: Test environment
Variable: Subscription - Value: XYZ - scope: Production environment
Variable: Webapp - Value: XYZ - scope: Developer environment
Variable: Webapp - Value: XYZ - scope: Test environment
Variable: Webapp - Value: XYZ - scope: Production environment

Then when you promote through your environments, it will use the other variable scoped to that new environment with the different value.

There is also some good documentation about variable scoping available!

I hope this helps!

Kenny

All worked out great, thanks Kenny!

Hi Richard,

I’m glad to hear that! Please let us know if you have any other questions at all!

Kind regards,

Kenny