Skip to content

Commit 783322d

Browse files
Merge pull request #292788 from juliakm/users/jukullam/remove-connection-string-val
[SFI-ROPC] Remove connection string example
2 parents 8ef9a11 + 04faef3 commit 783322d

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

articles/app-service/deploy-azure-pipelines.md

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -290,51 +290,6 @@ If you want to deploy to multiple web apps, add stages to your release pipeline.
290290

291291
---
292292

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-
338293
## Example: Deploy conditionally
339294

340295
# [YAML](#tab/yaml/)
@@ -428,7 +383,6 @@ The Azure Web App task (`AzureWebApp`) is the simplest way to deploy to an Azure
428383

429384
The [Azure App Service Deploy task (`AzureRmWebAppDeployment`)](/azure/devops/pipelines/tasks/deploy/azure-rm-web-app-deployment) can handle more custom scenarios, such as:
430385

431-
- [Modify configuration settings](#example-make-variable-substitutions) inside web packages and XML parameters files.
432386
- [Deploy with Web Deploy](#example-deploy-using-web-deploy), if you're used to the IIS deployment process.
433387
- [Deploy to virtual applications](#example-deploy-to-a-virtual-application).
434388
- Deploy to other app types, like Container apps, Function apps, WebJobs, or API and Mobile apps.

0 commit comments

Comments
 (0)