Skip to content

Commit f82ec68

Browse files
authored
Merge pull request #92275 from ColbyTresness/master
Changes for remote build by default
2 parents 80a4f32 + f935d22 commit f82ec68

File tree

3 files changed

+14
-29
lines changed

3 files changed

+14
-29
lines changed

articles/azure-functions/functions-deployment-technologies.md

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,26 @@ When you change any of your triggers, the Functions infrastructure must be aware
6060
Azure Functions can automatically perform builds on the code it receives after zip deployments. These builds behave slightly differently depending on whether your app is running on Windows or Linux. Remote builds are not performed when an app has previously been set to run in [Run From Package](run-functions-from-deployment-package.md) mode. To learn how to use remote build, navigate to [zip deploy](#zip-deploy).
6161

6262
> [!NOTE]
63-
> If you're having issues with remote build, it might be because your app was created before the feature was made available (August 1, 2019). Try creating a new function app.
63+
> If you're having issues with remote build, it might be because your app was created before the feature was made available (August 1, 2019). Try creating a new function app, or running `az functionapp update -g <RESOURCE_GROUP_NAME> -n <APP_NAME>` to update your function app. This command might take two tries to succeed.
6464
6565
#### Remote build on Windows
6666

6767
All function apps running on Windows have a small management app, the SCM (or [Kudu](https://github.com/projectkudu/kudu)) site. This site handles much of the deployment and build logic for Azure Functions.
6868

6969
When an app is deployed to Windows, language-specific commands, like `dotnet restore` (C#) or `npm install` (JavaScript) are run.
7070

71-
#### Remote build on Linux (preview)
71+
#### Remote build on Linux
7272

73-
To enable remote build on Linux, you must set the following [application settings](functions-how-to-use-azure-function-app-settings.md#settings):
73+
To enable remote build on Linux, the following [application settings](functions-how-to-use-azure-function-app-settings.md#settings) must be set:
7474

7575
* `ENABLE_ORYX_BUILD=true`
7676
* `SCM_DO_BUILD_DURING_DEPLOYMENT=true`
7777

78-
When apps are built remotely on Linux, they [run from the deployment package](run-functions-from-deployment-package.md).
78+
By default, both [Azure Functions Core Tools](functions-run-local.md) and the [Azure Functions Extension for Visual Studio Code](functions-create-first-function-vs-code.md#publish-the-project-to-azure) perform remote builds when deploying to Linux. Because of this, both tools automatically create these settings for you in Azure.
7979

80-
> [!NOTE]
81-
> Remote build on the Linux Dedicated (App Service) plan is currently only supported for Node.js and Python.
80+
When apps are built remotely on Linux, they [run from the deployment package](run-functions-from-deployment-package.md).
8281

83-
##### Consumption (preview) plan
82+
##### Consumption plan
8483

8584
Linux function apps running in the Consumption plan don't have an SCM/Kudu site, which limits the deployment options. However, function apps on Linux running in the Consumption plan do support remote builds.
8685

@@ -100,21 +99,13 @@ You can use an external package URL to reference a remote package (.zip) file th
10099
>
101100
>If you use Azure Blob storage, use a private container with a [shared access signature (SAS)](../vs-azure-tools-storage-manage-with-storage-explorer.md#generate-a-sas-in-storage-explorer) to give Functions access to the package. Any time the application restarts, it fetches a copy of the content. Your reference must be valid for the lifetime of the application.
102101
103-
>__When to use it:__ External package URL is the only supported deployment method for Azure Functions running on Linux in the Consumption plan, if the user specifically doesn't want a remote build to occur. When you update the package file that a function app references, you must [manually sync triggers](#trigger-syncing) to tell Azure that your application has changed.
102+
>__When to use it:__ External package URL is the only supported deployment method for Azure Functions running on Linux in the Consumption plan, if the user doesn't want a [remote build](#remote-build) to occur. When you update the package file that a function app references, you must [manually sync triggers](#trigger-syncing) to tell Azure that your application has changed.
104103
105104
### Zip deploy
106105

107106
Use zip deploy to push a .zip file that contains your function app to Azure. Optionally, you can set your app to start [running from package](run-functions-from-deployment-package.md), or specify that a [remote build](#remote-build) occurs.
108107

109-
>__How to use it:__ Deploy by using your favorite client tool: [VS Code](functions-create-first-function-vs-code.md#publish-the-project-to-azure), [Visual Studio](functions-develop-vs.md#publish-to-azure), or the [Azure CLI](functions-create-first-azure-function-azure-cli.md#deploy-the-function-app-project-to-azure). To manually deploy a .zip file to your function app, follow the instructions in [Deploy from a .zip file or URL](https://github.com/projectkudu/kudu/wiki/Deploying-from-a-zip-file-or-url).
110-
111-
To perform a zip deploy with a [remote build](#remote-build), use the following [Core Tools](functions-run-local.md) command:
112-
113-
```bash
114-
func azure functionapp publish <app name> --build remote
115-
```
116-
117-
Alternatively, you can instruct VS Code to perform a remote build when deploying by adding the ``azureFunctions.scmDoBuildDuringDeployment" flag. To learn how to add a flag to VS Code, read the instructions in the [Azure Functions Extension Wiki](https://github.com/microsoft/vscode-azurefunctions/wiki).
108+
>__How to use it:__ Deploy by using your favorite client tool: [Visual Studio Code](functions-create-first-function-vs-code.md#publish-the-project-to-azure), [Visual Studio](functions-develop-vs.md#publish-to-azure), the [Azure Functions Core Tools](functions-run-local.md), or the [Azure CLI](functions-create-first-azure-function-azure-cli.md#deploy-the-function-app-project-to-azure). By default, these tools use zip deployment and [run from package](run-functions-from-deployment-package.md). Core Tools and the Visual Studio Code extension both enable [remote build](#remote-build) when deploying to Linux. To manually deploy a .zip file to your function app, follow the instructions in [Deploy from a .zip file or URL](https://github.com/projectkudu/kudu/wiki/Deploying-from-a-zip-file-or-url).
118109
119110
>When you deploy by using zip deploy, you can set your app to [run from package](run-functions-from-deployment-package.md). To run from package, set the `WEBSITE_RUN_FROM_PACKAGE` application setting value to `1`. We recommend zip deployment. It yields faster loading times for your applications, and it's the default for VS Code, Visual Studio, and the Azure CLI.
120111

articles/azure-functions/functions-reference-python.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -394,22 +394,15 @@ pip install -r requirements.txt
394394

395395
When you're ready to publish, make sure that all your dependencies are listed in the *requirements.txt* file, which is located at the root of your project directory. Azure Functions can [remotely build](functions-deployment-technologies.md#remote-build) these dependencies.
396396

397-
Project files and folders that are excluded from publishing, including the virtual environment folder, are listed in the .funcignore file.
397+
Project files and folders that are excluded from publishing, including the virtual environment folder, are listed in the .funcignore file.
398398

399-
To deploy to Azure and perform a remote build, use the following command:
399+
Both the [Azure Functions Core Tools](functions-run-local.md#v2) and the [Azure Functions Extension for VS Code](functions-create-first-function-vs-code.md#publish-the-project-to-azure) will perform a remote build by default. For example, use the following command:
400400

401401
```bash
402-
func azure functionapp publish <app name> --build remote
402+
func azure functionapp publish <app name>
403403
```
404404

405-
If you're not using remote build, and using a package that requires a compiler and does not support the installation of many Linux-compatible wheels from PyPI, publishing to Azure without building locally will fail with the following error:
406-
407-
```
408-
There was an error restoring dependencies.ERROR: cannot install <package name - version> dependency: binary dependencies without wheels are not supported.
409-
The terminal process terminated with exit code: 1
410-
```
411-
412-
To build locally and configure the required binaries, [install Docker](https://docs.docker.com/install/) on your local machine and run the following command to publish using the [Azure Functions Core Tools](functions-run-local.md#v2) (func). Remember to replace `<app name>` with the name of your function app in Azure.
405+
If you wish to build your app locally instead of in Azure, [install Docker](https://docs.docker.com/install/) on your local machine and run the following command to publish using the [Azure Functions Core Tools](functions-run-local.md#v2) (func). Remember to replace `<app name>` with the name of your function app in Azure.
413406

414407
```bash
415408
func azure functionapp publish <app name> --build-native-deps

articles/azure-functions/functions-run-local.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ To publish your local code to a function app in Azure, use the `publish` command
436436
func azure functionapp publish <FunctionAppName>
437437
```
438438

439-
This command publishes to an existing function app in Azure. You'll get an error if you try to publish to a `<FunctionAppName>` that doesn't exist in your subscription. To learn how to create a function app from the command prompt or terminal window using the Azure CLI, see [Create a Function App for serverless execution](./scripts/functions-cli-create-serverless.md). By default, this command deploys your app to [run from the deployment package](run-functions-from-deployment-package.md). To disable this recommended deployment mode, use the `--nozip` option.
439+
This command publishes to an existing function app in Azure. You'll get an error if you try to publish to a `<FunctionAppName>` that doesn't exist in your subscription. To learn how to create a function app from the command prompt or terminal window using the Azure CLI, see [Create a Function App for serverless execution](./scripts/functions-cli-create-serverless.md). By default, this command uses [remote build](functions-deployment-technologies.md#remote-build) and deploys your app to [run from the deployment package](run-functions-from-deployment-package.md). To disable this recommended deployment mode, use the `--nozip` option.
440440

441441
>[!IMPORTANT]
442442
> When you create a function app in the Azure portal, it uses version 2.x of the Function runtime by default. To make the function app use version 1.x of the runtime, follow the instructions in [Run on version 1.x](functions-versions.md#creating-1x-apps).
@@ -458,6 +458,7 @@ The following publish options are only supported in version 2.x:
458458
| **`--list-included-files`** | Displays a list of files that are published, which is based on the .funcignore file. |
459459
| **`--nozip`** | Turns the default `Run-From-Package` mode off. |
460460
| **`--build-native-deps`** | Skips generating .wheels folder when publishing python function apps. |
461+
| **`--build [-b]`** | Performs build action when deploying to a Linux function app. (accepts: remote, local) |
461462
| **`--additional-packages`** | List of packages to install when building native dependencies. For example: `python3-dev libevent-dev`. |
462463
| **`--force`** | Ignore pre-publishing verification in certain scenarios. |
463464
| **`--csx`** | Publish a C# script (.csx) project. |

0 commit comments

Comments
 (0)