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
@@ -53,7 +53,6 @@ Choose your task version at the top of the article. YAML pipelines aren't availa
53
53
54
54
## Build your app
55
55
56
-
# [YAML](#tab/yaml)
57
56
58
57
1. Sign in to your Azure DevOps organization and navigate to your project.
59
58
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
65
64
1. Select **Save and run**, then select **Commit directly to the main branch**, and then choose **Save and run** again.
66
65
1. A new run is started. Wait for the run to finish.
67
66
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
-

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
-

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
-

85
-
86
-
---
87
67
88
68
### Example YAML build pipelines
89
69
90
70
The following language-specific pipelines can be used for building apps.
71
+
91
72
# [C\#](#tab/csharp)
92
73
93
74
You can use the following sample to create a YAML file to build a .NET app.
@@ -207,8 +188,6 @@ steps:
207
188
208
189
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.
209
190
210
-
# [YAML](#tab/yaml)
211
-
212
191
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`.
213
192
214
193
```yaml
@@ -237,20 +216,12 @@ variables:
237
216
238
217
The snippet assumes that the build steps in your YAML file produce the zip archive in the `$(System.ArtifactsDirectory)` folder on your agent.
239
218
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
-

245
-
246
-
---
247
219
248
220
## Deploy a container
249
221
250
222
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).
251
223
### Deploy with the Azure Function App for Container task
252
224
253
-
# [YAML](#tab/yaml/)
254
225
255
226
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).
256
227
@@ -280,18 +251,9 @@ variables:
280
251
281
252
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.
282
253
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
-
287
254
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
-
---
291
255
## Deploy to a slot
292
256
293
-
# [YAML](#tab/yaml)
294
-
295
257
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.
296
258
297
259
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
315
277
SourceSlot: staging
316
278
SwapWithProduction: true
317
279
```
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
-
---
325
280
326
281
## Create a pipeline with Azure CLI
327
282
@@ -350,7 +305,6 @@ To create a build pipeline in Azure, use the `az functionapp devops-pipeline cre
350
305
351
306
## Build your app
352
307
353
-
# [YAML](#tab/yaml)
354
308
355
309
1. Sign in to your Azure DevOps organization and navigate to your project.
356
310
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
360
314
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.
361
315
1. A new run is started. Wait for the run to finish.
362
316
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
-

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
-

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
-

380
-
381
-
---
382
317
383
318
### Example YAML build pipelines
384
319
@@ -502,9 +437,7 @@ steps:
502
437
503
438
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.
504
439
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.
508
441
509
442
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`.
510
443
@@ -535,22 +468,12 @@ variables:
535
468
536
469
The snippet assumes that the build steps in your YAML file produce the zip archive in the `$(System.ArtifactsDirectory)` folder on your agent.
537
470
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
-

543
-
544
-
---
545
-
546
471
## Deploy a container
547
472
548
473
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) .
549
474
550
475
### Deploy with the Azure Function App for Container task
551
476
552
-
# [YAML](#tab/yaml/)
553
-
554
477
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).
555
478
556
479
To deploy, add the following snippet at the end of your YAML file:
@@ -579,18 +502,8 @@ variables:
579
502
580
503
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.
581
504
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
-
---
590
505
## Deploy to a slot
591
506
592
-
# [YAML](#tab/yaml)
593
-
594
507
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.
595
508
596
509
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
615
528
SourceSlot: staging
616
529
SwapWithProduction: true
617
530
```
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.
0 commit comments