Added What-If Controlled Rollout (#92)
* Added What-If Controlled Rollout * updated pwsh execution * excluded change type * updated ado workflow location * updated domain to product - linting * updated service connection name
This commit is contained in:
Родитель
fb9830eaf0
Коммит
8b011cebe2
|
@ -20,10 +20,10 @@ pr:
|
||||||
- .ado/workflows/dataProductDeployment.yml
|
- .ado/workflows/dataProductDeployment.yml
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
AZURE_RESOURCE_MANAGER_CONNECTION_NAME: "domain-product-service-connection" # Update to '{resourceManagerConnectionName}'
|
AZURE_RESOURCE_MANAGER_CONNECTION_NAME: "integration-product-service-connection" # Update to '{resourceManagerConnectionName}'
|
||||||
AZURE_SUBSCRIPTION_ID: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}'
|
AZURE_SUBSCRIPTION_ID: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}'
|
||||||
AZURE_RESOURCE_GROUP_NAME: "dlz01-dev-dp001" # Update to '{dataLandingZoneName}-rg'
|
AZURE_RESOURCE_GROUP_NAME: "dlz01-dev-dp001" # Update to '{dataLandingZoneName}-rg'
|
||||||
AZURE_LOCATION: "North Europe" # Update to '{regionName}'
|
AZURE_LOCATION: "northeurope" # Update to '{regionName}'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- stage: Validation
|
- stage: Validation
|
||||||
|
@ -80,6 +80,34 @@ stages:
|
||||||
overrideParameters: >
|
overrideParameters: >
|
||||||
-administratorPassword "$(password)"
|
-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
|
- stage: Deployment
|
||||||
displayName: "Deployment of IaC templates"
|
displayName: "Deployment of IaC templates"
|
||||||
dependsOn: Validation
|
dependsOn: Validation
|
||||||
|
|
|
@ -43,7 +43,7 @@ jobs:
|
||||||
id: generate_password_001
|
id: generate_password_001
|
||||||
run: |
|
run: |
|
||||||
echo "Generating Password"
|
echo "Generating Password"
|
||||||
pwsh $GITHUB_WORKSPACE/code/GeneratePassword.ps1 -GitHub
|
pwsh "${GITHUB_WORKSPACE}/code/GeneratePassword.ps1" -GitHub
|
||||||
|
|
||||||
# Deploy Data Product - validation
|
# Deploy Data Product - validation
|
||||||
- name: Deploy Data Product - validation
|
- name: Deploy Data Product - validation
|
||||||
|
@ -59,6 +59,24 @@ jobs:
|
||||||
deploymentMode: Validate
|
deploymentMode: Validate
|
||||||
failOnStdErr: false
|
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
|
# Log out from Azure
|
||||||
- name: Log out from Azure
|
- name: Log out from Azure
|
||||||
id: azure_logout
|
id: azure_logout
|
||||||
|
@ -93,11 +111,11 @@ jobs:
|
||||||
id: generate_password_001
|
id: generate_password_001
|
||||||
run: |
|
run: |
|
||||||
echo "Generating Password"
|
echo "Generating Password"
|
||||||
pwsh $GITHUB_WORKSPACE/code/GeneratePassword.ps1 -GitHub
|
pwsh "${GITHUB_WORKSPACE}/code/GeneratePassword.ps1" -GitHub
|
||||||
|
|
||||||
# Deploy Data Domain
|
# Deploy Data Product
|
||||||
- name: Deploy Data Domain
|
- name: Deploy Data Product
|
||||||
id: data_domain_deployment
|
id: data_product_deployment
|
||||||
uses: azure/arm-deploy@v1
|
uses: azure/arm-deploy@v1
|
||||||
with:
|
with:
|
||||||
scope: resourcegroup
|
scope: resourcegroup
|
||||||
|
|
Загрузка…
Ссылка в новой задаче