Deploy Azure Function

Hi
I am trying to deploy the same Azure function to two environments. The deploy to the first environment works fine, but for the second one I get the error “Could not find file ‘D:\home\site\wwwroot\bin’.”

  • I use the step: Deploy an Azure Web App (Web Deploy)
  • Both environments are on Azure cloud. I tried to make them identical but I may have missed something since Azure functions can not be cloned.
  • I use the same Octopus project and process for both environments.

Any ideas?
:slight_smile:
/Cecilia

Good morning Cecilia,

Thanks for reaching out and I am sorry you are having issues with one of your Octopus deployments.

Other than checking the obvious of firewall configurations, folder permissions and any potential anti-virus installs that may be blocking access to that folder nothing obvious jumps out here.

Are you able to send us a raw task log of the failed task so we can have a closer look at what is going on?

You can upload them to our secure site.

If you are able to check the configurations mentioned above and get back to me with the failed task log we can go from there.

If you have any other questions or issues please don’t hesitate to ask.

Kind Regards,

Clare Martin

Hi Clare
I have uploaded the log.
To my knowledge Azure functions do not have any firewall, folders or anti-virus that I can access?
:slight_smile:
/Cecilia

This error seems to occur when the Azure app variable WEBSITE_RUN_FROM_PACKAGE is set to 1 :thinking:

I tried again with the box “Enable AppOffline” checked and now I get the error:
Could not find file ‘D:\home\site\wwwroot\App_Offline.htm’.
I have uploaded the new raw log.

It looks to me as if Octopus Web Deploy does not support Zip Deploy with Run-From-Package. Is there another way to Zip Deploy an Azure Function from Octopus?
(Microsoft recommend Zip Deploy with Run-From-Package for Azure Functions:
Develop Azure Functions using Visual Studio | Microsoft Docs )

Cecilia,

Sorry it has taken a while to reply, we were discussing this ticket in one of our meetings as the logs you sent over suggests Octopus cannot create the file D:\home\site\wwwroot\ - it can’t find it because it can’t create it.

As for your last post, we do have a new step called Deploy an Azure App Service which may be a better way of deploying your app into Azure.

Are you able to re-create your package with the 'Deploy an Azure App Service step and see if that fixes your issue?

If you have any more questions please don’t hesitate to reach out.

Kind Regards,

Clare Martin

Thank you. It seems to be working now. I’ll try to do the full deploy (including production) on Thursday.
:slight_smile:
/Cecilia

1 Like

Cecilia,

Fantastic news! Glad it’s now working for you.

Anything else you need please drop us a message!

Kind Regards,

Clare Martin

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