From e4defbfc43124b4c90057caada94bb3c390ea10c Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 2 Feb 2022 12:10:14 +0100 Subject: [PATCH 1/6] Updated Workflows --- .ado/workflows/dataProductDeployment.yml | 8 ++-- .github/workflows/dataProductDeployment.yml | 44 ++++++++++----------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/.ado/workflows/dataProductDeployment.yml b/.ado/workflows/dataProductDeployment.yml index 187d489..415c73a 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)" @@ -98,7 +99,7 @@ stages: --resource-group ${{ variables.AZURE_RESOURCE_GROUP_NAME }} ` --exclude-change-types Ignore NoChange Unsupported ` --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" @@ -159,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/workflows/dataProductDeployment.yml b/.github/workflows/dataProductDeployment.yml index bc94710..1a7566d 100644 --- a/.github/workflows/dataProductDeployment.yml +++ b/.github/workflows/dataProductDeployment.yml @@ -2,13 +2,13 @@ name: Data Product Deployment on: push: - branches: [ main ] + branches: [main] paths: - "code/**" - "infra/**" - ".github/workflows/dataProductDeployment.yml" pull_request: - branches: [ main ] + branches: [main] paths: - "code/**" - "infra/**" @@ -16,8 +16,8 @@ on: env: AZURE_SUBSCRIPTION_ID: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}' - AZURE_RESOURCE_GROUP_NAME: "dlz01-dev-di002" # Update to '{dataLandingZoneName}-rg' - AZURE_LOCATION: "northeurope" # Update to '{regionName}' + AZURE_RESOURCE_GROUP_NAME: "dlz01-dev-di002" # Update to '{dataLandingZoneName}-rg' + AZURE_LOCATION: "northeurope" # Update to '{regionName}' jobs: validation: @@ -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 + # Deploy Data Product - validation + - name: Deploy Data Product - validation + id: data_product_validation + 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 From c8c63d75749af6ad57b8c4dc4e60dd05704d42cb Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 2 Feb 2022 12:20:00 +0100 Subject: [PATCH 2/6] updated comments --- .github/workflows/dataProductDeployment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dataProductDeployment.yml b/.github/workflows/dataProductDeployment.yml index 1a7566d..e70aced 100644 --- a/.github/workflows/dataProductDeployment.yml +++ b/.github/workflows/dataProductDeployment.yml @@ -16,8 +16,8 @@ on: env: AZURE_SUBSCRIPTION_ID: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}' - AZURE_RESOURCE_GROUP_NAME: "dlz01-dev-di002" # Update to '{dataLandingZoneName}-rg' - AZURE_LOCATION: "northeurope" # Update to '{regionName}' + AZURE_RESOURCE_GROUP_NAME: "dlz01-dev-di002" # Update to '{dataLandingZoneName}-rg' + AZURE_LOCATION: "northeurope" # Update to '{regionName}' jobs: validation: From 40f33e9e0d1b80dcb2ce93b8ec7ac1048db2ab1a Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 2 Feb 2022 12:45:08 +0100 Subject: [PATCH 3/6] updated id --- .github/workflows/dataProductDeployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dataProductDeployment.yml b/.github/workflows/dataProductDeployment.yml index e70aced..810144b 100644 --- a/.github/workflows/dataProductDeployment.yml +++ b/.github/workflows/dataProductDeployment.yml @@ -62,7 +62,7 @@ jobs: # Deploy Data Product - validation - name: Deploy Data Product - validation - id: data_product_validation + id: data_product_whatif uses: azure/arm-deploy@v1 with: scope: resourcegroup From 2460ac7c6c80e18a91406405f401824167cc30e3 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 2 Feb 2022 12:45:24 +0100 Subject: [PATCH 4/6] updated issue and PR templates --- .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 2 +- .github/ISSUE_TEMPLATE/DOCUMENTATION_ISSUE.yml | 2 +- .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index 4f16ed4..65774cd 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -58,7 +58,7 @@ body: label: Code of Conduct description: The Code of Conduct helps create a safe space for everyone. We require that everyone must abide by it. options: - - label: I agree to follow this project's [Code of Conduct](/CODE_OF_CONDUCT.md) + - label: I agree to follow this project's [Code of Conduct](https://github.com/Azure/data-product-streaming/blob/main/CODE_OF_CONDUCT.md) required: true - type: markdown diff --git a/.github/ISSUE_TEMPLATE/DOCUMENTATION_ISSUE.yml b/.github/ISSUE_TEMPLATE/DOCUMENTATION_ISSUE.yml index 7727d6d..e43d166 100644 --- a/.github/ISSUE_TEMPLATE/DOCUMENTATION_ISSUE.yml +++ b/.github/ISSUE_TEMPLATE/DOCUMENTATION_ISSUE.yml @@ -25,7 +25,7 @@ body: label: Code of Conduct description: The Code of Conduct helps create a safe space for everyone. We require that everyone must abide by it. options: - - label: I agree to follow this project's [Code of Conduct](/CODE_OF_CONDUCT.md) + - label: I agree to follow this project's [Code of Conduct](https://github.com/Azure/data-product-streaming/blob/main/CODE_OF_CONDUCT.md) required: true - type: markdown diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml index 38ea507..b0b2ef8 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml @@ -34,7 +34,7 @@ body: label: Code of Conduct description: The Code of Conduct helps create a safe space for everyone. We require that everyone must abide by it. options: - - label: I agree to follow this project's [Code of Conduct](/CODE_OF_CONDUCT.md) + - label: I agree to follow this project's [Code of Conduct](https://github.com/Azure/data-product-streaming/blob/main/CODE_OF_CONDUCT.md) required: true - type: markdown diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 28fbb9e..322f940 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -7,7 +7,7 @@ ## PR Checklist * [ ] Closes Issue #xxx -* [ ] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA +* [ ] CLA signed. If not, go over [here](https://github.com/Azure/data-product-streaming/blob/main/CODE_OF_CONDUCT.md) and sign the CLA ## Validation Steps Performed From 3ad3ca82da0bd687c89e81928a66d7bcf3de4801 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 2 Feb 2022 13:03:40 +0100 Subject: [PATCH 5/6] added name for what if --- .ado/workflows/dataProductDeployment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.ado/workflows/dataProductDeployment.yml b/.ado/workflows/dataProductDeployment.yml index 415c73a..01c55cc 100644 --- a/.ado/workflows/dataProductDeployment.yml +++ b/.ado/workflows/dataProductDeployment.yml @@ -98,6 +98,7 @@ 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.bicep" ` --parameters "$(System.DefaultWorkingDirectory)/infra/params.dev.json" administratorPassword="$(password)" ` From 6d0d23c9588320033dcfe66eec407f56880f6724 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 2 Feb 2022 13:05:08 +0100 Subject: [PATCH 6/6] updated name --- .github/workflows/dataProductDeployment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dataProductDeployment.yml b/.github/workflows/dataProductDeployment.yml index 810144b..fb6b163 100644 --- a/.github/workflows/dataProductDeployment.yml +++ b/.github/workflows/dataProductDeployment.yml @@ -60,8 +60,8 @@ jobs: deploymentName: "DataProduct-${{ github.sha }}" failOnStdErr: false - # Deploy Data Product - validation - - name: Deploy Data Product - validation + # Deploy Data Product - what-if + - name: Deploy Data Product - what-if id: data_product_whatif uses: azure/arm-deploy@v1 with: