From 9211013369fe7136bd80b65405ad87f49f6525c8 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 2 Feb 2022 13:49:12 +0100 Subject: [PATCH] Updated Workflows --- .ado/workflows/dataLandingZoneDeployment.yml | 9 ++++-- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .../workflows/dataLandingZoneDeployment.yml | 31 +++++++++---------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.ado/workflows/dataLandingZoneDeployment.yml b/.ado/workflows/dataLandingZoneDeployment.yml index a006fd1..28cd407 100644 --- a/.ado/workflows/dataLandingZoneDeployment.yml +++ b/.ado/workflows/dataLandingZoneDeployment.yml @@ -71,9 +71,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: "DataLandingZone-$(Build.SourceVersion)" overrideParameters: > -administratorPassword "$(password)" @@ -95,7 +96,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 "DataLandingZone-$(Build.SourceVersion)" ` + --template-file "$(System.DefaultWorkingDirectory)/infra/main.bicep" ` --parameters "$(System.DefaultWorkingDirectory)/infra/params.dev.json" administratorPassword="$(password)" ` --result-format "FullResourcePayloads" @@ -153,10 +155,11 @@ 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" deploymentOutputs: 'dataLandingZoneDetails01' deploymentMode: "Incremental" + deploymentName: "DataLandingZone-$(Build.SourceVersion)" overrideParameters: > -administratorPassword "$(password)" diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 28b9223..252b203 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -7,7 +7,7 @@ ## PR Checklist * [ ] Closes Issue #xxx -* [ ] Code of Conduct signed. If not, go to [Code of Conduct](https://github.com/Azure/data-management-zone/blob/main/CODE_OF_CONDUCT.md). +* [ ] Code of Conduct signed. If not, go to [Code of Conduct](https://github.com/Azure/data-landing-zone/blob/main/CODE_OF_CONDUCT.md). ## Validation Steps Performed diff --git a/.github/workflows/dataLandingZoneDeployment.yml b/.github/workflows/dataLandingZoneDeployment.yml index fdf1054..a1d62ee 100644 --- a/.github/workflows/dataLandingZoneDeployment.yml +++ b/.github/workflows/dataLandingZoneDeployment.yml @@ -36,7 +36,7 @@ jobs: uses: azure/login@v1 with: creds: ${{ secrets.AZURE_CREDENTIALS }} - + # Generate Password - name: Generate Password id: generate_password_001 @@ -52,28 +52,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 administratorPassword="${{ steps.generate_password_001.outputs.password }}" deploymentMode: Validate + deploymentName: "DataLandingZone-${{ github.sha }}" failOnStdErr: false # Deploy Data Landing Zone - what-if - name: Deploy Data Landing Zone - what-if id: data_landing_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" administratorPassword="${{ steps.generate_password_001.outputs.password }}" \ - --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: "DataLandingZone-${{ 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 @@ -120,9 +118,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 administratorPassword="${{ steps.generate_password_001.outputs.password }}" deploymentMode: Incremental + deploymentName: "DataLandingZone-${{ github.sha }}" failOnStdErr: false # Restart MySql Server 001