File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -224,7 +224,17 @@ stages:
224224
225225# scan ARM template using TTK
226226
227- # What-IF: https://4bes.nl/2021/03/06/test-arm-templates-with-what-if/
227+ # What-IF:
228+
229+ - task : AzureCLI@2
230+ displayName : Preview Template Changes
231+ inputs :
232+ workingDirectory : $(System.DefaultWorkingDirectory)/arm/
233+ azureSubscription : ' WebAppWithDatabaseDemo_spn'
234+ scriptType : ' bash'
235+ scriptLocation : ' inlineScript'
236+ inlineScript : ' az deployment group what-if --resource-group $(ResourceGroupName) --name rollout01 --template-file WebSiteSQLDatabase.json --parameters WebSiteSQLDatabase.parameters.json'
237+ arguments : ' -hostingPlanName $(hostingPlanName) -skuName "F1" -skuCapacity 1 -administratorLogin $(Database.Admin) -administratorLoginPassword $(Database.Password) -databaseName $(Database.Name) -collation "SQL_Latin1_General_CP1_CI_AS" -edition "Basic" -maxSizeBytes "1073741824" -requestedServiceObjectiveName "Basic" -webSiteName $(WebAppName) -sqlserverName $(SqlServerName)'
228238
229239# replace AzureResourceGroupDeployment@2 with AzureResourceManagerTemplateDeploymentV3
230240# https://github.com/microsoft/azure-pipelines-tasks/tree/master/Tasks/AzureResourceManagerTemplateDeploymentV3
@@ -236,8 +246,8 @@ stages:
236246 resourceGroupName : ' $(ResourceGroupName)'
237247 location : ' West Europe'
238248 templateLocation : ' Linked artifact'
239- csmFile : ' $(System.DefaultWorkingDirectory)/**/ arm/WebSiteSQLDatabase.json'
240- csmParametersFile : ' $(System.DefaultWorkingDirectory)/**/ arm/WebSiteSQLDatabase.parameters.json'
249+ csmFile : ' $(System.DefaultWorkingDirectory)/arm/WebSiteSQLDatabase.json'
250+ csmParametersFile : ' $(System.DefaultWorkingDirectory)/arm/WebSiteSQLDatabase.parameters.json'
241251 overrideParameters : ' -hostingPlanName $(hostingPlanName) -skuName "F1" -skuCapacity 1 -administratorLogin $(Database.Admin) -administratorLoginPassword $(Database.Password) -databaseName $(Database.Name) -collation "SQL_Latin1_General_CP1_CI_AS" -edition "Basic" -maxSizeBytes "1073741824" -requestedServiceObjectiveName "Basic" -webSiteName $(WebAppName) -sqlserverName $(SqlServerName)'
242252 deploymentMode : Complete
243253
You can’t perform that action at this time.
0 commit comments