Skip to content

Commit 2c83af5

Browse files
authored
Added What-If Controlled Rollout (#93)
* Added What-If Controlled Rollout * excluded change type * updated ADO workflow location
1 parent 28732a0 commit 2c83af5

File tree

2 files changed

+49
-3
lines changed

2 files changed

+49
-3
lines changed

.ado/workflows/dataProductDeployment.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ variables:
2323
AZURE_RESOURCE_MANAGER_CONNECTION_NAME: "integration-product-service-connection" # Update to '{resourceManagerConnectionName}'
2424
AZURE_SUBSCRIPTION_ID: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}'
2525
AZURE_RESOURCE_GROUP_NAME: "dlz01-dev-di001" # Update to '{dataLandingZoneName}-rg'
26-
AZURE_LOCATION: "North Europe" # Update to '{regionName}'
26+
AZURE_LOCATION: "northeurope" # Update to '{regionName}'
2727

2828
stages:
2929
- stage: Validation
@@ -80,6 +80,34 @@ stages:
8080
overrideParameters: >
8181
-administratorPassword "$(password)"
8282
83+
# Deploy Data Product - what-if
84+
- task: AzureCLI@2
85+
name: data_product_whatif
86+
displayName: Deploy Data Product - what-if
87+
enabled: true
88+
continueOnError: false
89+
inputs:
90+
azureSubscription: ${{ variables.AZURE_RESOURCE_MANAGER_CONNECTION_NAME }}
91+
scriptType: pscore
92+
scriptLocation: inlineScript
93+
inlineScript: |
94+
az account set `
95+
--subscription ${{ variables.AZURE_SUBSCRIPTION_ID }}
96+
97+
az deployment group what-if `
98+
--resource-group ${{ variables.AZURE_RESOURCE_GROUP_NAME }} `
99+
--exclude-change-types Ignore NoChange Unsupported `
100+
--mode "Incremental" `
101+
--template-file "$(System.DefaultWorkingDirectory)/infra/main.json" `
102+
--parameters "$(System.DefaultWorkingDirectory)/infra/params.dev.json" administratorPassword="$(password)" `
103+
--result-format "FullResourcePayloads"
104+
105+
powerShellErrorActionPreference: "stop"
106+
addSpnToEnvironment: false
107+
useGlobalConfig: false
108+
failOnStandardError: false
109+
powerShellIgnoreLASTEXITCODE: false
110+
83111
- stage: Deployment
84112
displayName: "Deployment of ARM templates"
85113
dependsOn: Validation

.github/workflows/dataProductDeployment.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
id: generate_password_001
4444
run: |
4545
echo "Generating Password"
46-
pwsh $GITHUB_WORKSPACE/code/GeneratePassword.ps1 -GitHub
46+
pwsh "${GITHUB_WORKSPACE}/code/GeneratePassword.ps1" -GitHub
4747
4848
# Deploy Data Product - validation
4949
- name: Deploy Data Product - validation
@@ -59,6 +59,24 @@ jobs:
5959
deploymentMode: Validate
6060
failOnStdErr: false
6161

62+
# Deploy Data Product - what-if
63+
- name: Deploy Data Product - what-if
64+
id: data_product_whatif
65+
uses: azure/CLI@v1
66+
with:
67+
azcliversion: "latest"
68+
inlineScript: |
69+
az account set \
70+
--subscription ${{ env.AZURE_SUBSCRIPTION_ID }}
71+
72+
az deployment group what-if \
73+
--resource-group ${{ env.AZURE_RESOURCE_GROUP_NAME }} \
74+
--exclude-change-types Ignore NoChange Unsupported \
75+
--mode "Incremental" \
76+
--template-file "${GITHUB_WORKSPACE}/infra/main.json" \
77+
--parameters "${GITHUB_WORKSPACE}/infra/params.dev.json" administratorPassword="${{ steps.generate_password_001.outputs.password }}" \
78+
--result-format "FullResourcePayloads"
79+
6280
# Log out from Azure
6381
- name: Log out from Azure
6482
id: azure_logout
@@ -93,7 +111,7 @@ jobs:
93111
id: generate_password_001
94112
run: |
95113
echo "Generating Password"
96-
pwsh $GITHUB_WORKSPACE/code/GeneratePassword.ps1 -GitHub
114+
pwsh "${GITHUB_WORKSPACE}/code/GeneratePassword.ps1" -GitHub
97115
98116
# Deploy Data Product
99117
- name: Deploy Data Product

0 commit comments

Comments
 (0)