From 16e4a91ebfd0aff8c44d6e2d01e936acb1bdbd69 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 2 Feb 2022 13:08:11 +0100 Subject: [PATCH] Updated Workflows --- .ado/workflows/dataProductDeployment.yml | 9 ++++--- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/dataProductDeployment.yml | 30 ++++++++++----------- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/.ado/workflows/dataProductDeployment.yml b/.ado/workflows/dataProductDeployment.yml index e9e5dcc..952fd92 100644 --- a/.ado/workflows/dataProductDeployment.yml +++ b/.ado/workflows/dataProductDeployment.yml @@ -74,9 +74,10 @@ stages: resourceGroupName: ${{ variables.AZURE_RESOURCE_GROUP_NAME }} 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: "DataProduct-$(Build.SourceVersion)" overrideParameters: > -administratorPassword "$(password)" @@ -97,8 +98,9 @@ stages: az deployment group what-if ` --resource-group ${{ variables.AZURE_RESOURCE_GROUP_NAME }} ` --exclude-change-types Ignore NoChange Unsupported ` + --name "DataProduct-$(Build.SourceVersion)" ` --mode "Incremental" ` - --template-file "$(System.DefaultWorkingDirectory)/infra/main.json" ` + --template-file "$(System.DefaultWorkingDirectory)/infra/main.bicep" ` --parameters "$(System.DefaultWorkingDirectory)/infra/params.dev.json" administratorPassword="$(password)" ` --result-format "FullResourcePayloads" @@ -158,8 +160,9 @@ stages: resourceGroupName: ${{ variables.AZURE_RESOURCE_GROUP_NAME }} 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: "DataProduct-$(Build.SourceVersion)" overrideParameters: > -administratorPassword "$(password)" diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 28b9223..69f59a8 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-product-batch/blob/main/CODE_OF_CONDUCT.md). ## Validation Steps Performed diff --git a/.github/workflows/dataProductDeployment.yml b/.github/workflows/dataProductDeployment.yml index 3b8dc74..1d7c7c8 100644 --- a/.github/workflows/dataProductDeployment.yml +++ b/.github/workflows/dataProductDeployment.yml @@ -54,28 +54,27 @@ jobs: subscriptionId: ${{ env.AZURE_SUBSCRIPTION_ID }} resourceGroupName: ${{ env.AZURE_RESOURCE_GROUP_NAME }} 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: "DataProduct-${{ github.sha }}" failOnStdErr: false # Deploy Data Product - what-if - name: Deploy Data Product - what-if id: data_product_whatif - uses: azure/cli@v1 + uses: azure/arm-deploy@v1 with: - azcliversion: "agentazcliversion" - 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" + scope: resourcegroup + subscriptionId: ${{ env.AZURE_SUBSCRIPTION_ID }} + resourceGroupName: ${{ env.AZURE_RESOURCE_GROUP_NAME }} + 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: "DataProduct-${{ 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 @@ -122,9 +121,10 @@ jobs: subscriptionId: ${{ env.AZURE_SUBSCRIPTION_ID }} resourceGroupName: ${{ env.AZURE_RESOURCE_GROUP_NAME }} 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: "DataProduct-${{ github.sha }}" failOnStdErr: false # Log out from Azure