You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -51,7 +51,6 @@ Choose your task version at the top of the article. YAML pipelines aren't availa
51
51
52
52
## Build your app
53
53
54
-
# [YAML](#tab/yaml)
55
54
56
55
1. Sign in to your Azure DevOps organization and navigate to your project.
57
56
1. In your project, navigate to the **Pipelines** page. Then choose the action to create a new pipeline.
@@ -61,29 +60,11 @@ Choose your task version at the top of the article. YAML pipelines aren't availa
61
60
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.
62
61
1. A new run is started. Wait for the run to finish.
63
62
64
-
# [Classic](#tab/classic)
65
-
66
-
To get started:
67
-
68
-
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.
69
-
70
-
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.
71
-
72
-

73
-
74
-
After you configure the source of your code, search for Azure Functions build templates. Select the template that matches your app language.
75
-
76
-

77
-
78
-
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.
79
-
80
-

81
-
82
-
---
83
63
84
64
### Example YAML build pipelines
85
65
86
66
The following language-specific pipelines can be used for building apps.
67
+
87
68
# [C\#](#tab/csharp)
88
69
89
70
You can use the following sample to create a YAML file to build a .NET app.
@@ -201,8 +182,6 @@ steps:
201
182
202
183
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.
203
184
204
-
# [YAML](#tab/yaml)
205
-
206
185
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`.
207
186
208
187
```yaml
@@ -231,20 +210,12 @@ variables:
231
210
232
211
The snippet assumes that the build steps in your YAML file produce the zip archive in the `$(System.ArtifactsDirectory)` folder on your agent.
233
212
234
-
# [Classic](#tab/classic)
235
-
236
-
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.
237
-
238
-

239
-
240
-
---
241
213
242
214
## Deploy a container
243
215
244
216
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).
245
217
### Deploy with the Azure Function App for Container task
246
218
247
-
# [YAML](#tab/yaml/)
248
219
249
220
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).
250
221
@@ -274,18 +245,9 @@ variables:
274
245
275
246
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.
276
247
277
-
# [Classic](#tab/classic/)
278
-
279
-
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.
280
-
281
248
282
-
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.
283
-
284
-
---
285
249
## Deploy to a slot
286
250
287
-
# [YAML](#tab/yaml)
288
-
289
251
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.
290
252
291
253
The following YAML snippet shows how to deploy to a staging slot, and then swap to a production slot:
@@ -309,13 +271,6 @@ The following YAML snippet shows how to deploy to a staging slot, and then swap
309
271
SourceSlot: staging
310
272
SwapWithProduction: true
311
273
```
312
-
# [Classic](#tab/classic)
313
-
314
-
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.
315
-
316
-
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.
317
-
318
-
---
319
274
320
275
## Create a pipeline with Azure CLI
321
276
@@ -344,7 +299,6 @@ To create a build pipeline in Azure, use the `az functionapp devops-pipeline cre
344
299
345
300
## Build your app
346
301
347
-
# [YAML](#tab/yaml)
348
302
349
303
1. Sign in to your Azure DevOps organization and navigate to your project.
350
304
1. In your project, navigate to the **Pipelines** page. Then choose the action to create a new pipeline.
@@ -354,25 +308,6 @@ To create a build pipeline in Azure, use the `az functionapp devops-pipeline cre
354
308
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.
355
309
1. A new run is started. Wait for the run to finish.
356
310
357
-
# [Classic](#tab/classic)
358
-
359
-
To get started:
360
-
361
-
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.
362
-
363
-
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.
364
-
365
-

366
-
367
-
After you configure the source of your code, search for Azure Functions build templates. Select the template that matches your app language.
368
-
369
-

370
-
371
-
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.
372
-
373
-

374
-
375
-
---
376
311
377
312
### Example YAML build pipelines
378
313
@@ -493,9 +428,7 @@ steps:
493
428
494
429
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.
495
430
496
-
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.
497
-
498
-
# [YAML](#tab/yaml)
431
+
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.
499
432
500
433
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`.
501
434
@@ -526,22 +459,12 @@ variables:
526
459
527
460
The snippet assumes that the build steps in your YAML file produce the zip archive in the `$(System.ArtifactsDirectory)` folder on your agent.
528
461
529
-
# [Classic](#tab/classic)
530
-
531
-
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.
532
-
533
-

534
-
535
-
---
536
-
537
462
## Deploy a container
538
463
539
464
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) .
540
465
541
466
### Deploy with the Azure Function App for Container task
542
467
543
-
# [YAML](#tab/yaml/)
544
-
545
468
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).
546
469
547
470
To deploy, add the following snippet at the end of your YAML file:
@@ -570,18 +493,8 @@ variables:
570
493
571
494
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.
572
495
573
-
# [Classic](#tab/classic/)
574
-
575
-
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.
576
-
577
-
578
-
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.
579
-
580
-
---
581
496
## Deploy to a slot
582
497
583
-
# [YAML](#tab/yaml)
584
-
585
498
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.
586
499
587
500
The following YAML snippet shows how to deploy to a staging slot, and then swap to a production slot:
@@ -606,13 +519,6 @@ The following YAML snippet shows how to deploy to a staging slot, and then swap
606
519
SourceSlot: staging
607
520
SwapWithProduction: true
608
521
```
609
-
# [Classic](#tab/classic)
610
-
611
-
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.
612
-
613
-
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.
0 commit comments