"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

Hi @mark.reeder

I was able to update my scripts so they are working with Deploy an Azure App Service step. This requires adding a lot of code (8 lines in my case) to every script, but it works.

What is the plan for this? Is this as intended or is this going to be fixed in the future versions?

And now I’ve got another problem with Deploy an Azure App Service step when deploying to app service slot. Should I create new topic for this or I can provide more details here?

Hi @Oleg.Deribas,

My apologies. I didn’t see this reply. I’ll pass along your feedback to engineering and see if this was a specific design decision or why this may be the case.

As for your other issue, I would either create a new topic or send an email to support@octopus.com if you are getting an error message or feel there’s a bug so that it can be routed correctly if needed.

Thanks,
Mark

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.