Octopus v4.1.5 deployment to Ature Web App deployment slot

Hi all, this is my first question in this forum so please excuse my noobness.
At my work, I’m stuck to use (old but still excellent) self-hosted Octopus deploy version 4.1.5.
For our new project, the decision is made to run it in Azure (.Net Core Web APIs) and I was able to set it all up and I’m deploying successfully for the past few months. But now I would like to take advantage of Azure deployment Slots to use the benefits like pre-warming the apps and then switch Staging with the Production slot. In Azure I’ve created the Staging slot which as consequence just appends the ‘-Staging’ to the end of the name:
Back in the Octopus the step Azure part of the process looks like this:

I tried simply renaming the web app by appending the ‘-Staging’ for the variable:

But deploy failed with:

Now, what I think is the cause is that in Azure, the name of the app resource differs from the name of the slot in that slot name is lowercase wheres the app name contain capital letters. For example, if the App name is ‘azure-MyApp’ the slot name is ‘azure-myapp’, but clearly this can’t be the reason?
I believe octopus can’t target the slot on this way and something else must be done in order to deploy to specific slot. I know this is the obsolete Octopus version but if someone can help by providing the steps necessary to deploy to Azure slots it would be great.
Thank you in advance!

Hey Cagalj,

No worries at all!

A few items to point out, that should help you.

  1. Ensure you are using Service Accounts, not management certificates. If you use management certs you are going to have a bad time (Microsoft is depreciating them).

  2. Believe it or not, but the CLI we use to interact with Azure requires [AppName] ([SlotName]) as the format. I agree it is odd. See this screenshot:

  3. Here is the in action:

I hope that helps!

P.S. I tested this on an instance running Octopus 4.1.5 :slight_smile:

Best regards,

1 Like

Hi Bob,
thank you very much for your help. Appending the “(Staging)” to the end of the app name (instead of “-Staging”) did the trick.
I’ll try this in extend on Monday for all of our apps!

Thank you

Happy to help! Have a great week!