"Deploy an Azure App Service" step documentation

Today I found this blog post which describes new Deploy an Azure App Service step which is apparently available in Octopus since last year. But when I’m looking into documentation there’s no mention of this task and everything is about old Deploy an Azure Web App step. Am I looking in the wrong place in the documentation or why is the Deploy an Azure App Service step still not documented after 1 year?

Hi @Oleg.Deribas,

Thanks for your post and for bringing this to our attention. We don’t necessarily have every built-in step documented, but I can see how it would be beneficial in this case. I’ll raise it with the respective team to get addressed.

I’m not sure if you saw it, but there was also this blog post about that new step as well that might help answer some questions. Were there any other questions, in particular, I could help answer?

Thanks,
Mark

Hi @mark.reeder ,

Is this shipped undocumented on purpose? This is really not what I would expect. I see this as a very important step in a right direction. Finally it is possible to deploy Azure Function Apps to Linux consumption plan (2 years after it become available in Azure) and it goes undocumented.

Anyway, I tried to switch one of my deployments from Deploy an Azure Web App to Deploy an Azure App Service and I’ve got the following error in my PreDeploy.ps1 PowerShell script:

CloseError: No subscription found in the context.  Please ensure that the credentials you provided are authorized to access an Azure subscription, then run Connect-AzAccount to login. 

This is different from Deploy an Azure Web App where scripts did not require this. What credentials should I pass to Connect-AzAccount here?

Hi @Oleg.Deribas,

Just to verify, is your Azure App Service step targeting an Azure Web App target with an Azure account and Azure Web App specified with correct credentials? Can you explain what your PreDeploy script is doing? Is it calling az cli commands?

Thanks,
Mark

Hi @mark.reeder

Correct, my Azure App Service step is targeting an Azure Web App target with an Azure account and Azure Web App specified with correct credentials. It works when there’s no [Pre/Post]Deploy.ps1 scripts in the package.

My PreDeploy script is using commands from Az PowerShell module. I do a lot of things from these scripts, for example starting/stopping/swapping deployment slots.

Hi @Oleg.Deribas,

You are correct in that these two step-templates do appear to differ in how they function with respect to authenticating the Azure account. I’m digging more into that.

You can authenticate with that Azure Powershell module using Connect-AzAccount, as noted in that error, at the beginning of your script. Octopus will make variables available to your script, and you can access them there. You can see one example of this here and also Azure account variables are documented here.

I hope this helps!

Thanks,
Mark