Skip to content

Commit

Permalink
Added What-If Controlled Rollout (#93)
Browse files Browse the repository at this point in the history
* Added What-If Controlled Rollout

* excluded change type

* updated ADO workflow location
  • Loading branch information
marvinbuss authored Oct 6, 2021
1 parent 28732a0 commit 2c83af5
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
30 changes: 29 additions & 1 deletion .ado/workflows/dataProductDeployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ variables:
AZURE_RESOURCE_MANAGER_CONNECTION_NAME: "integration-product-service-connection" # Update to '{resourceManagerConnectionName}'
AZURE_SUBSCRIPTION_ID: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}'
AZURE_RESOURCE_GROUP_NAME: "dlz01-dev-di001" # Update to '{dataLandingZoneName}-rg'
AZURE_LOCATION: "North Europe" # Update to '{regionName}'
AZURE_LOCATION: "northeurope" # Update to '{regionName}'

stages:
- stage: Validation
Expand Down Expand Up @@ -80,6 +80,34 @@ stages:
overrideParameters: >
-administratorPassword "$(password)"
# Deploy Data Product - what-if
- task: AzureCLI@2
name: data_product_whatif
displayName: Deploy Data Product - what-if
enabled: true
continueOnError: false
inputs:
azureSubscription: ${{ variables.AZURE_RESOURCE_MANAGER_CONNECTION_NAME }}
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
az account set `
--subscription ${{ variables.AZURE_SUBSCRIPTION_ID }}
az deployment group what-if `
--resource-group ${{ variables.AZURE_RESOURCE_GROUP_NAME }} `
--exclude-change-types Ignore NoChange Unsupported `
--mode "Incremental" `
--template-file "$(System.DefaultWorkingDirectory)/infra/main.json" `
--parameters "$(System.DefaultWorkingDirectory)/infra/params.dev.json" administratorPassword="$(password)" `
--result-format "FullResourcePayloads"
powerShellErrorActionPreference: "stop"
addSpnToEnvironment: false
useGlobalConfig: false
failOnStandardError: false
powerShellIgnoreLASTEXITCODE: false

- stage: Deployment
displayName: "Deployment of ARM templates"
dependsOn: Validation
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/dataProductDeployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
id: generate_password_001
run: |
echo "Generating Password"
pwsh $GITHUB_WORKSPACE/code/GeneratePassword.ps1 -GitHub
pwsh "${GITHUB_WORKSPACE}/code/GeneratePassword.ps1" -GitHub
# Deploy Data Product - validation
- name: Deploy Data Product - validation
Expand All @@ -59,6 +59,24 @@ jobs:
deploymentMode: Validate
failOnStdErr: false

# Deploy Data Product - what-if
- name: Deploy Data Product - what-if
id: data_product_whatif
uses: azure/CLI@v1
with:
azcliversion: "latest"
inlineScript: |
az account set \
--subscription ${{ env.AZURE_SUBSCRIPTION_ID }}
az deployment group what-if \
--resource-group ${{ env.AZURE_RESOURCE_GROUP_NAME }} \
--exclude-change-types Ignore NoChange Unsupported \
--mode "Incremental" \
--template-file "${GITHUB_WORKSPACE}/infra/main.json" \
--parameters "${GITHUB_WORKSPACE}/infra/params.dev.json" administratorPassword="${{ steps.generate_password_001.outputs.password }}" \
--result-format "FullResourcePayloads"
# Log out from Azure
- name: Log out from Azure
id: azure_logout
Expand Down Expand Up @@ -93,7 +111,7 @@ jobs:
id: generate_password_001
run: |
echo "Generating Password"
pwsh $GITHUB_WORKSPACE/code/GeneratePassword.ps1 -GitHub
pwsh "${GITHUB_WORKSPACE}/code/GeneratePassword.ps1" -GitHub
# Deploy Data Product
- name: Deploy Data Product
Expand Down

0 comments on commit 2c83af5

Please sign in to comment.