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
Copy file name to clipboardExpand all lines: articles/app-service/deploy-azure-pipelines.md
-46Lines changed: 0 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -290,51 +290,6 @@ If you want to deploy to multiple web apps, add stages to your release pipeline.
290
290
291
291
---
292
292
293
-
## Example: Make variable substitutions
294
-
295
-
For most language stacks, [app settings](./configure-common.md?toc=%2fazure%2fapp-service%2fcontainers%2ftoc.json#configure-app-settings) and [connection strings](./configure-common.md?toc=%2fazure%2fapp-service%2fcontainers%2ftoc.json#configure-connection-strings) can be set as environment variables at runtime.
296
-
297
-
But there are other reasons you would want to make variable substitutions to your *Web.config*. In this example, your Web.config file contains a connection string named `connectionString`. You can change its value before deploying to each web app. You can do this either by applying a Web.config transformation or by substituting variables in your Web.config file.
298
-
299
-
# [YAML](#tab/yaml/)
300
-
301
-
The following snippet shows an example of variable substitution by using the Azure App Service Deploy (`AzureRmWebAppDeployment`) task:
302
-
303
-
```yaml
304
-
jobs:
305
-
- job: test
306
-
variables:
307
-
connectionString: <test-stage connection string>
308
-
steps:
309
-
- task: AzureRmWebAppDeployment@4
310
-
inputs:
311
-
azureSubscription: '<Test stage Azure service connection>'
312
-
WebAppName: '<name of test stage web app>'
313
-
enableXmlVariableSubstitution: true
314
-
315
-
- job: prod
316
-
dependsOn: test
317
-
variables:
318
-
connectionString: <prod-stage connection string>
319
-
steps:
320
-
- task: AzureRmWebAppDeployment@4
321
-
inputs:
322
-
azureSubscription: '<Prod stage Azure service connection>'
323
-
WebAppName: '<name of prod stage web app>'
324
-
enableXmlVariableSubstitution: true
325
-
```
326
-
327
-
# [Classic](#tab/classic/)
328
-
329
-
To change `connectionString` by using variable substitution:
330
-
331
-
1. Create a release pipeline with two stages.
332
-
1. Link the artifact of the release to the build that produces the web package.
333
-
1. Define `connectionString` as a variable in each of the stages. Set the appropriate value.
334
-
1. Select the **XML variable substitution** option under **File Transforms and Variable Substitution Options** for the **Azure App Service Deploy** task.
335
-
336
-
---
337
-
338
293
## Example: Deploy conditionally
339
294
340
295
# [YAML](#tab/yaml/)
@@ -428,7 +383,6 @@ The Azure Web App task (`AzureWebApp`) is the simplest way to deploy to an Azure
428
383
429
384
The [Azure App Service Deploy task (`AzureRmWebAppDeployment`)](/azure/devops/pipelines/tasks/deploy/azure-rm-web-app-deployment) can handle more custom scenarios, such as:
430
385
431
-
- [Modify configuration settings](#example-make-variable-substitutions) inside web packages and XML parameters files.
432
386
- [Deploy with Web Deploy](#example-deploy-using-web-deploy), if you're used to the IIS deployment process.
433
387
- [Deploy to virtual applications](#example-deploy-to-a-virtual-application).
434
388
- Deploy to other app types, like Container apps, Function apps, WebJobs, or API and Mobile apps.
0 commit comments