Skip to content

Commit d56ec92

Browse files
Merge pull request #271132 from juliakm/users/jukullam/pipelines-functions-apr3
Removing Classic option from Azure Pipelines Functions article
2 parents 4f0d1de + b4a97ed commit d56ec92

File tree

1 file changed

+3
-97
lines changed

1 file changed

+3
-97
lines changed

articles/azure-functions/functions-how-to-azure-devops.md

Lines changed: 3 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Continuously update function app code using Azure Pipelines
33
description: Learn how to set up an Azure DevOps pipeline that targets Azure Functions.
44
author: juliakm
55
ms.topic: conceptual
6-
ms.date: 03/23/2024
6+
ms.date: 04/03/2024
77
ms.author: jukullam
88
ms.custom: devx-track-csharp, devx-track-azurecli, devops-pipelines-deploy
99
ms.devlang: azurecli
@@ -53,7 +53,6 @@ Choose your task version at the top of the article. YAML pipelines aren't availa
5353

5454
## Build your app
5555

56-
# [YAML](#tab/yaml)
5756

5857
1. Sign in to your Azure DevOps organization and navigate to your project.
5958
1. In your project, navigate to the **Pipelines** page. Then select **New pipeline**.
@@ -65,29 +64,11 @@ Choose your task version at the top of the article. YAML pipelines aren't availa
6564
1. Select **Save and run**, then select **Commit directly to the main branch**, and then choose **Save and run** again.
6665
1. A new run is started. Wait for the run to finish.
6766

68-
# [Classic](#tab/classic)
69-
70-
To get started:
71-
72-
How you build your app in Azure Pipelines depends on your app's programming language. Each language has specific build steps that create a deployment artifact. A deployment artifact is used to update your function app in Azure.
73-
74-
To use built-in build templates, when you create a new build pipeline, select **Use the classic editor** to create a pipeline by using designer templates.
75-
76-
![Screenshot of the Azure Pipelines classic editor.](media/functions-how-to-azure-devops/classic-editor.png)
77-
78-
After you configure the source of your code, search for Azure Functions build templates. Select the template that matches your app language.
79-
80-
![Screenshot of Azure Functions build template.](media/functions-how-to-azure-devops/build-templates.png)
81-
82-
In some cases, build artifacts have a specific folder structure. You might need to select the **Prepend root folder name to archive paths** check box.
83-
84-
![Screenshot of option to prepend the root folder name.](media/functions-how-to-azure-devops/prepend-root-folder.png)
85-
86-
---
8767

8868
### Example YAML build pipelines
8969

9070
The following language-specific pipelines can be used for building apps.
71+
9172
# [C\#](#tab/csharp)
9273

9374
You can use the following sample to create a YAML file to build a .NET app.
@@ -207,8 +188,6 @@ steps:
207188
208189
You'll deploy with the [Azure Function App Deploy](/azure/devops/pipelines/tasks/deploy/azure-function-app) task. This task requires an [Azure service connection](/azure/devops/pipelines/library/service-endpoints) as an input. An Azure service connection stores the credentials to connect from Azure Pipelines to Azure.
209190
210-
# [YAML](#tab/yaml)
211-
212191
To deploy to Azure Functions, add the following snippet at the end of your `azure-pipelines.yml` file. The default `appType` is Windows. You can specify Linux by setting the `appType` to `functionAppLinux`.
213192

214193
```yaml
@@ -237,20 +216,12 @@ variables:
237216

238217
The snippet assumes that the build steps in your YAML file produce the zip archive in the `$(System.ArtifactsDirectory)` folder on your agent.
239218

240-
# [Classic](#tab/classic)
241-
242-
You'll need to create a separate release pipeline to deploy to Azure Functions. When you create a new release pipeline, search for the Azure Functions release template.
243-
244-
![Screenshot of search for the Azure Functions release template.](media/functions-how-to-azure-devops/release-template.png)
245-
246-
---
247219

248220
## Deploy a container
249221

250222
You can automatically deploy your code to Azure Functions as a custom container after every successful build. To learn more about containers, see [Create a function on Linux using a custom container](functions-create-function-linux-custom-image.md).
251223
### Deploy with the Azure Function App for Container task
252224

253-
# [YAML](#tab/yaml/)
254225

255226
The simplest way to deploy to a container is to use the [Azure Function App on Container Deploy task](/azure/devops/pipelines/tasks/deploy/azure-rm-functionapp-containers).
256227

@@ -280,18 +251,9 @@ variables:
280251

281252
The snippet pushes the Docker image to your Azure Container Registry. The **Azure Function App on Container Deploy** task pulls the appropriate Docker image corresponding to the `BuildId` from the repository specified, and then deploys the image.
282253

283-
# [Classic](#tab/classic/)
284-
285-
The best way to deploy your function app as a container is to use the [Azure Function App on Container Deploy task](/azure/devops/pipelines/tasks/deploy/azure-rm-functionapp-containers) in your release pipeline.
286-
287254

288-
How you deploy your app depends on your app's programming language. Each language has a template with specific deploy steps. If you can't find a template for your language, select the generic **Azure App Service Deployment** template.
289-
290-
---
291255
## Deploy to a slot
292256

293-
# [YAML](#tab/yaml)
294-
295257
You can configure your function app to have multiple slots. Slots allow you to safely deploy your app and test it before making it available to your customers.
296258

297259
The following YAML snippet shows how to deploy to a staging slot, and then swap to a production slot:
@@ -315,13 +277,6 @@ The following YAML snippet shows how to deploy to a staging slot, and then swap
315277
SourceSlot: staging
316278
SwapWithProduction: true
317279
```
318-
# [Classic](#tab/classic)
319-
320-
You can configure your function app to have multiple slots. Slots allow you to safely deploy your app and test it before making it available to your customers.
321-
322-
Use the option **Deploy to Slot** in the **Azure Function App Deploy** task to specify the slot to deploy to. You can swap the slots by using the **Azure App Service Manage** task.
323-
324-
---
325280

326281
## Create a pipeline with Azure CLI
327282

@@ -350,7 +305,6 @@ To create a build pipeline in Azure, use the `az functionapp devops-pipeline cre
350305

351306
## Build your app
352307

353-
# [YAML](#tab/yaml)
354308

355309
1. Sign in to your Azure DevOps organization and navigate to your project.
356310
1. In your project, navigate to the **Pipelines** page. Then choose the action to create a new pipeline.
@@ -360,25 +314,6 @@ To create a build pipeline in Azure, use the `az functionapp devops-pipeline cre
360314
1. Azure Pipelines will analyze your repository and recommend a template. Select **Save and run**, then select **Commit directly to the main branch**, and then choose **Save and run** again.
361315
1. A new run is started. Wait for the run to finish.
362316

363-
# [Classic](#tab/classic)
364-
365-
To get started:
366-
367-
How you build your app in Azure Pipelines depends on your app's programming language. Each language has specific build steps that create a deployment artifact. A deployment artifact is used to update your function app in Azure.
368-
369-
To use built-in build templates, when you create a new build pipeline, select **Use the classic editor** to create a pipeline by using designer templates.
370-
371-
![Screenshot of select the Azure Pipelines classic editor.](media/functions-how-to-azure-devops/classic-editor.png)
372-
373-
After you configure the source of your code, search for Azure Functions build templates. Select the template that matches your app language.
374-
375-
![Screenshot of select an Azure Functions build template.](media/functions-how-to-azure-devops/build-templates.png)
376-
377-
In some cases, build artifacts have a specific folder structure. You might need to select the **Prepend root folder name to archive paths** check box.
378-
379-
![Screenshot of the option to prepend the root folder name.](media/functions-how-to-azure-devops/prepend-root-folder.png)
380-
381-
---
382317

383318
### Example YAML build pipelines
384319

@@ -502,9 +437,7 @@ steps:
502437

503438
You'll deploy with the [Azure Function App Deploy v2](/azure/devops/pipelines/tasks/reference/azure-function-app-v2) task. This task requires an [Azure service connection](/azure/devops/pipelines/library/service-endpoints) as an input. An Azure service connection stores the credentials to connect from Azure Pipelines to Azure.
504439

505-
The v2 version of the task includes support for newer applications stacks for .NET, Python, and Node. The task includes networking predeployment checks and deployment won't proceed when there are issues.
506-
507-
# [YAML](#tab/yaml)
440+
The v2 version of the task includes support for newer applications stacks for .NET, Python, and Node. The task includes networking predeployment checks. When there are predeployment issues, deployment stops.
508441

509442
To deploy to Azure Functions, add the following snippet at the end of your `azure-pipelines.yml` file. The default `appType` is Windows. You can specify Linux by setting the `appType` to `functionAppLinux`.
510443

@@ -535,22 +468,12 @@ variables:
535468

536469
The snippet assumes that the build steps in your YAML file produce the zip archive in the `$(System.ArtifactsDirectory)` folder on your agent.
537470

538-
# [Classic](#tab/classic)
539-
540-
You'll need to create a separate release pipeline to deploy to Azure Functions. When you create a new release pipeline, search for the Azure Functions release template.
541-
542-
![Screenshot of search for the Azure Functions release template.](media/functions-how-to-azure-devops/release-template.png)
543-
544-
---
545-
546471
## Deploy a container
547472

548473
You can automatically deploy your code to Azure Functions as a custom container after every successful build. To learn more about containers, see [Working with containers and Azure Functions](./functions-how-to-custom-container.md) .
549474

550475
### Deploy with the Azure Function App for Container task
551476

552-
# [YAML](#tab/yaml/)
553-
554477
The simplest way to deploy to a container is to use the [Azure Function App on Container Deploy task](/azure/devops/pipelines/tasks/deploy/azure-rm-functionapp-containers).
555478

556479
To deploy, add the following snippet at the end of your YAML file:
@@ -579,18 +502,8 @@ variables:
579502

580503
The snippet pushes the Docker image to your Azure Container Registry. The **Azure Function App on Container Deploy** task pulls the appropriate Docker image corresponding to the `BuildId` from the repository specified, and then deploys the image.
581504

582-
# [Classic](#tab/classic/)
583-
584-
The best way to deploy your function app as a container is to use the [Azure Function App on Container Deploy task](/azure/devops/pipelines/tasks/deploy/azure-rm-functionapp-containers) in your release pipeline.
585-
586-
587-
How you deploy your app depends on your app's programming language. Each language has a template with specific deploy steps. If you can't find a template for your language, select the generic **Azure App Service Deployment** template.
588-
589-
---
590505
## Deploy to a slot
591506

592-
# [YAML](#tab/yaml)
593-
594507
You can configure your function app to have multiple slots. Slots allow you to safely deploy your app and test it before making it available to your customers.
595508

596509
The following YAML snippet shows how to deploy to a staging slot, and then swap to a production slot:
@@ -615,13 +528,6 @@ The following YAML snippet shows how to deploy to a staging slot, and then swap
615528
SourceSlot: staging
616529
SwapWithProduction: true
617530
```
618-
# [Classic](#tab/classic)
619-
620-
You can configure your function app to have multiple slots. Slots allow you to safely deploy your app and test it before making it available to your customers.
621-
622-
Use the option **Deploy to Slot** in the **Azure Function App Deploy** task to specify the slot to deploy to. You can swap the slots by using the **Azure App Service Manage** task.
623-
624-
---
625531

626532
## Create a pipeline with Azure CLI
627533

0 commit comments

Comments
 (0)