From 85904a6c9c860d3184cac2477b1371b55d071cf3 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 2 Feb 2022 13:54:17 +0100 Subject: [PATCH 1/2] Updated Workflows --- .../dataManagementZoneDeployment.yml | 9 ++++-- .../dataManagementZoneDeployment.yml | 29 +++++++++---------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.ado/workflows/dataManagementZoneDeployment.yml b/.ado/workflows/dataManagementZoneDeployment.yml index b64d91d4..1750474f 100644 --- a/.ado/workflows/dataManagementZoneDeployment.yml +++ b/.ado/workflows/dataManagementZoneDeployment.yml @@ -57,9 +57,10 @@ stages: subscriptionId: ${{ variables.AZURE_SUBSCRIPTION_ID }} location: ${{ variables.AZURE_LOCATION }} templateLocation: "Linked artifact" - csmFile: "$(System.DefaultWorkingDirectory)/infra/main.json" + csmFile: "$(System.DefaultWorkingDirectory)/infra/main.bicep" csmParametersFile: "$(System.DefaultWorkingDirectory)/infra/params.dev.json" deploymentMode: "Validation" + deploymentName: "DataManagementZone-$(Build.SourceVersion)" # Deploy Data Management Zone - what-if - task: AzureCLI@2 @@ -79,7 +80,8 @@ stages: --location ${{ variables.AZURE_LOCATION }} ` --subscription ${{ variables.AZURE_SUBSCRIPTION_ID }} ` --exclude-change-types Ignore NoChange Unsupported ` - --template-file "$(System.DefaultWorkingDirectory)/infra/main.json" ` + --name "DataManagementZone-$(Build.SourceVersion)" ` + --template-file "$(System.DefaultWorkingDirectory)/infra/main.bicep" ` --parameters "$(System.DefaultWorkingDirectory)/infra/params.dev.json" ` --result-format "FullResourcePayloads" @@ -123,6 +125,7 @@ stages: subscriptionId: ${{ variables.AZURE_SUBSCRIPTION_ID }} location: ${{ variables.AZURE_LOCATION }} templateLocation: "Linked artifact" - csmFile: "$(System.DefaultWorkingDirectory)/infra/main.json" + csmFile: "$(System.DefaultWorkingDirectory)/infra/main.bicep" csmParametersFile: "$(System.DefaultWorkingDirectory)/infra/params.dev.json" deploymentMode: "Incremental" + deploymentName: "DataManagementZone-$(Build.SourceVersion)" diff --git a/.github/workflows/dataManagementZoneDeployment.yml b/.github/workflows/dataManagementZoneDeployment.yml index c6281596..dc22884c 100644 --- a/.github/workflows/dataManagementZoneDeployment.yml +++ b/.github/workflows/dataManagementZoneDeployment.yml @@ -46,28 +46,26 @@ jobs: scope: subscription subscriptionId: ${{ env.AZURE_SUBSCRIPTION_ID }} region: ${{ env.AZURE_LOCATION }} - template: ${{ github.workspace }}/infra/main.json + template: ${{ github.workspace }}/infra/main.bicep parameters: ${{ github.workspace }}/infra/params.dev.json deploymentMode: Validate + deploymentName: "DataManagementZone-${{ github.sha }}" failOnStdErr: false # Deploy Data Management Zone - what-if - name: Deploy Data Management Zone - what-if id: data_management_zone_whatif - uses: azure/CLI@v1 + uses: azure/arm-deploy@v1 with: - azcliversion: "agentazcliversion" - inlineScript: | - az account set \ - --subscription ${{ env.AZURE_SUBSCRIPTION_ID }} - - az deployment sub what-if \ - --location ${{ env.AZURE_LOCATION }} \ - --subscription ${{ env.AZURE_SUBSCRIPTION_ID }} \ - --exclude-change-types Ignore NoChange Unsupported \ - --template-file "${GITHUB_WORKSPACE}/infra/main.json" \ - --parameters "${GITHUB_WORKSPACE}/infra/params.dev.json" \ - --result-format "FullResourcePayloads" + scope: subscription + subscriptionId: ${{ env.AZURE_SUBSCRIPTION_ID }} + region: ${{ env.AZURE_LOCATION }} + template: ${{ github.workspace }}/infra/main.bicep + parameters: ${{ github.workspace }}/infra/params.dev.json administratorPassword="${{ steps.generate_password_001.outputs.password }}" + deploymentMode: Incremental + deploymentName: "DataManagementZone-${{ github.sha }}" + failOnStdErr: false + additionalArguments: "--what-if --what-if-exclude-change-types Ignore NoChange Unsupported --what-if-result-format FullResourcePayloads" # Log out from Azure - name: Log out from Azure @@ -107,9 +105,10 @@ jobs: scope: subscription subscriptionId: ${{ env.AZURE_SUBSCRIPTION_ID }} region: ${{ env.AZURE_LOCATION }} - template: ${{ github.workspace }}/infra/main.json + template: ${{ github.workspace }}/infra/main.bicep parameters: ${{ github.workspace }}/infra/params.dev.json deploymentMode: Incremental + deploymentName: "DataManagementZone-${{ github.sha }}" failOnStdErr: false # Log out from Azure From b018794f30584d7dbe489588a9eff8d8aa885b97 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 2 Feb 2022 14:25:01 +0100 Subject: [PATCH 2/2] removed parameter ref --- .github/workflows/dataManagementZoneDeployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dataManagementZoneDeployment.yml b/.github/workflows/dataManagementZoneDeployment.yml index dc22884c..585d7f16 100644 --- a/.github/workflows/dataManagementZoneDeployment.yml +++ b/.github/workflows/dataManagementZoneDeployment.yml @@ -61,7 +61,7 @@ jobs: subscriptionId: ${{ env.AZURE_SUBSCRIPTION_ID }} region: ${{ env.AZURE_LOCATION }} template: ${{ github.workspace }}/infra/main.bicep - parameters: ${{ github.workspace }}/infra/params.dev.json administratorPassword="${{ steps.generate_password_001.outputs.password }}" + parameters: ${{ github.workspace }}/infra/params.dev.json deploymentMode: Incremental deploymentName: "DataManagementZone-${{ github.sha }}" failOnStdErr: false