How to deploy Azure functions NOT using Visual Studio

Andrew HB 321 Reputation points
2021-08-19T15:24:39.593+00:00

I have three function app projects that I normally deploy to 2 different Azure subscriptions running the live deployments. We aren't using any form of CI and our other build and deployment processes are handled via windows batch files.

So my question is how do I publish the Function Apps from a command prompt, ideally a windows command prompt so that I can create a similar batch file that will build and publish the function app to the relevant environment based upon an input parameter?

The documentation I have found seems very vague and as most Microsoft documentation makes massive assumptions leaving gaping holes in how to proceed.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,568 questions
0 comments No comments
{count} votes

3 additional answers

Sort by: Most helpful
  1. Andrew HB 321 Reputation points
    2021-08-24T08:48:46.063+00:00

    thank you @Anthony Chu - MSFT I have been diverted off this task temporarily hence radio silence, my apologies!

    Just before I started looking at something else, I downloaded the Azure CLI package and installed it however I haven't as yet attempted to use it. How can I use the func azure commands is this via Powershell or can I use a normal console window?


  2. Andrew HB 321 Reputation points
    2021-08-25T07:24:51.39+00:00

    Thank you @Anthony Chu - MSFT that was too simple in the end!!!

    For anybody reading this, the main points are: -

    1. Download Azure CLI and install to desktop.
    2. Once installed you can simply call the "func azure functionapp publish" command from with a Windows batch file.
    3. You need to change directory into the project folder of your function app.
    4. Authentication can be handled within the batch file or if you are already logged into Azure via the portal or whatever you will simply have access by default.
    0 comments No comments

  3. Andrew HB 321 Reputation points
    2021-08-25T07:33:51.94+00:00

    @Anthony Chu - MSFT is there a way to suppress the output I have read --output none but this has no effect if used like: -

    func azure functionapp publish xyz-app --output none

    0 comments No comments