From 01b8b3c72e2d3d2fb8c3d1402ecf035f518f9062 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 24 Nov 2021 09:10:59 +0100 Subject: [PATCH 01/30] Updated What-If Step --- .ado/workflows/dataProductDeployment.yml | 6 ++--- .github/workflows/dataProductDeployment.yml | 27 +++++++++------------ 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/.ado/workflows/dataProductDeployment.yml b/.ado/workflows/dataProductDeployment.yml index 187d489..786f2bf 100644 --- a/.ado/workflows/dataProductDeployment.yml +++ b/.ado/workflows/dataProductDeployment.yml @@ -74,7 +74,7 @@ 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" overrideParameters: > @@ -98,7 +98,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,7 +159,7 @@ 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" overrideParameters: > diff --git a/.github/workflows/dataProductDeployment.yml b/.github/workflows/dataProductDeployment.yml index bc94710..88b8d29 100644 --- a/.github/workflows/dataProductDeployment.yml +++ b/.github/workflows/dataProductDeployment.yml @@ -54,7 +54,7 @@ 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 failOnStdErr: false @@ -62,20 +62,17 @@ jobs: # 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: Validate + failOnStdErr: false + additionalArguments: "--what-if --what-if-exclude-change-types Ignore NoChange Unsupported" # Log out from Azure - name: Log out from Azure @@ -122,7 +119,7 @@ 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 failOnStdErr: false From b10ff6bd2ab9112f7605305a54b52917dec058d8 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 24 Nov 2021 09:44:59 +0100 Subject: [PATCH 02/30] updated what if stage --- .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 88b8d29..a10754c 100644 --- a/.github/workflows/dataProductDeployment.yml +++ b/.github/workflows/dataProductDeployment.yml @@ -70,9 +70,9 @@ jobs: 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: Validate + deploymentMode: Incremental failOnStdErr: false - additionalArguments: "--what-if --what-if-exclude-change-types Ignore NoChange Unsupported" + 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 From 44ba66d907196f1ebe43c4d1a9d456024b015cea Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 24 Nov 2021 10:02:52 +0100 Subject: [PATCH 03/30] added deployment name --- .ado/workflows/dataProductDeployment.yml | 6 +++--- .github/workflows/dataProductDeployment.yml | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.ado/workflows/dataProductDeployment.yml b/.ado/workflows/dataProductDeployment.yml index 786f2bf..187d489 100644 --- a/.ado/workflows/dataProductDeployment.yml +++ b/.ado/workflows/dataProductDeployment.yml @@ -74,7 +74,7 @@ stages: resourceGroupName: ${{ variables.AZURE_RESOURCE_GROUP_NAME }} location: ${{ variables.AZURE_LOCATION }} templateLocation: "Linked artifact" - csmFile: "$(System.DefaultWorkingDirectory)/infra/main.bicep" + csmFile: "$(System.DefaultWorkingDirectory)/infra/main.json" csmParametersFile: "$(System.DefaultWorkingDirectory)/infra/params.dev.json" deploymentMode: "Validation" overrideParameters: > @@ -98,7 +98,7 @@ stages: --resource-group ${{ variables.AZURE_RESOURCE_GROUP_NAME }} ` --exclude-change-types Ignore NoChange Unsupported ` --mode "Incremental" ` - --template-file "$(System.DefaultWorkingDirectory)/infra/main.bicep" ` + --template-file "$(System.DefaultWorkingDirectory)/infra/main.json" ` --parameters "$(System.DefaultWorkingDirectory)/infra/params.dev.json" administratorPassword="$(password)" ` --result-format "FullResourcePayloads" @@ -159,7 +159,7 @@ stages: resourceGroupName: ${{ variables.AZURE_RESOURCE_GROUP_NAME }} location: ${{ variables.AZURE_LOCATION }} templateLocation: "Linked artifact" - csmFile: "$(System.DefaultWorkingDirectory)/infra/main.bicep" + csmFile: "$(System.DefaultWorkingDirectory)/infra/main.json" csmParametersFile: "$(System.DefaultWorkingDirectory)/infra/params.dev.json" deploymentMode: "Incremental" overrideParameters: > diff --git a/.github/workflows/dataProductDeployment.yml b/.github/workflows/dataProductDeployment.yml index a10754c..598c4db 100644 --- a/.github/workflows/dataProductDeployment.yml +++ b/.github/workflows/dataProductDeployment.yml @@ -54,9 +54,10 @@ jobs: subscriptionId: ${{ env.AZURE_SUBSCRIPTION_ID }} resourceGroupName: ${{ env.AZURE_RESOURCE_GROUP_NAME }} region: ${{ env.AZURE_LOCATION }} - template: ${{ github.workspace }}/infra/main.bicep + template: ${{ github.workspace }}/infra/main.json 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 @@ -68,9 +69,10 @@ jobs: subscriptionId: ${{ env.AZURE_SUBSCRIPTION_ID }} resourceGroupName: ${{ env.AZURE_RESOURCE_GROUP_NAME }} region: ${{ env.AZURE_LOCATION }} - template: ${{ github.workspace }}/infra/main.bicep + template: ${{ github.workspace }}/infra/main.json 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" @@ -119,9 +121,10 @@ jobs: subscriptionId: ${{ env.AZURE_SUBSCRIPTION_ID }} resourceGroupName: ${{ env.AZURE_RESOURCE_GROUP_NAME }} region: ${{ env.AZURE_LOCATION }} - template: ${{ github.workspace }}/infra/main.bicep + template: ${{ github.workspace }}/infra/main.json 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 300cb18fa1cada663a4dcb74fa07ee40b7edeb2a Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Tue, 7 Dec 2021 16:20:09 +0100 Subject: [PATCH 04/30] added dev and prod deployment workflows for gh --- .github/workflows/dataProductDeployment.yml | 137 ------------------ .../workflows/dataProductDeploymentDev.yml | 45 ++++++ .../dataProductDeploymentTestProd.yml | 62 ++++++++ .github/workflows/deploymentTemplate.yml | 75 ++++++++++ .github/workflows/validationTemplate.yml | 90 ++++++++++++ 5 files changed, 272 insertions(+), 137 deletions(-) delete mode 100644 .github/workflows/dataProductDeployment.yml create mode 100644 .github/workflows/dataProductDeploymentDev.yml create mode 100644 .github/workflows/dataProductDeploymentTestProd.yml create mode 100644 .github/workflows/deploymentTemplate.yml create mode 100644 .github/workflows/validationTemplate.yml diff --git a/.github/workflows/dataProductDeployment.yml b/.github/workflows/dataProductDeployment.yml deleted file mode 100644 index 598c4db..0000000 --- a/.github/workflows/dataProductDeployment.yml +++ /dev/null @@ -1,137 +0,0 @@ -name: Data Product Deployment - -on: - push: - branches: [ main ] - paths: - - "code/**" - - "infra/**" - - ".github/workflows/dataProductDeployment.yml" - pull_request: - branches: [ main ] - paths: - - "code/**" - - "infra/**" - - ".github/workflows/dataProductDeployment.yml" - -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}' - -jobs: - validation: - name: "Validation of IaC templates" - runs-on: ubuntu-latest - continue-on-error: false - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Check Out Repository - id: checkout_repository - uses: actions/checkout@v2 - - # Login to Azure - - name: Azure Login - id: azure_login - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - # Generate Password 001 - - name: Generate Password 001 - id: generate_password_001 - run: | - echo "Generating Password" - pwsh "${GITHUB_WORKSPACE}/code/GeneratePassword.ps1" -GitHub - - # Deploy Data Product - validation - - name: Deploy Data Product - validation - id: data_product_validation - uses: azure/arm-deploy@v1 - with: - scope: resourcegroup - subscriptionId: ${{ env.AZURE_SUBSCRIPTION_ID }} - resourceGroupName: ${{ env.AZURE_RESOURCE_GROUP_NAME }} - region: ${{ env.AZURE_LOCATION }} - template: ${{ github.workspace }}/infra/main.json - 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/arm-deploy@v1 - with: - scope: resourcegroup - subscriptionId: ${{ env.AZURE_SUBSCRIPTION_ID }} - resourceGroupName: ${{ env.AZURE_RESOURCE_GROUP_NAME }} - region: ${{ env.AZURE_LOCATION }} - template: ${{ github.workspace }}/infra/main.json - 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 - id: azure_logout - uses: azure/cli@v1 - with: - azcliversion: "agentazcliversion" - inlineScript: | - az logout - - deployment: - name: "Deployment of IaC templates" - needs: [validation] - runs-on: ubuntu-latest - if: github.event_name == 'push' - continue-on-error: false - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Check Out Repository - id: checkout_repository - uses: actions/checkout@v2 - - # Login to Azure - - name: Azure Login - id: azure_login - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - # Generate Password 001 - - name: Generate Password 001 - id: generate_password_001 - run: | - echo "Generating Password" - pwsh "${GITHUB_WORKSPACE}/code/GeneratePassword.ps1" -GitHub - - # Deploy Data Product - - name: Deploy Data Product - id: data_product_deployment - uses: azure/arm-deploy@v1 - with: - scope: resourcegroup - subscriptionId: ${{ env.AZURE_SUBSCRIPTION_ID }} - resourceGroupName: ${{ env.AZURE_RESOURCE_GROUP_NAME }} - region: ${{ env.AZURE_LOCATION }} - template: ${{ github.workspace }}/infra/main.json - 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 - - name: Log out from Azure - id: azure_logout - uses: azure/cli@v1 - with: - azcliversion: "agentazcliversion" - inlineScript: | - az logout diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml new file mode 100644 index 0000000..96de4e8 --- /dev/null +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -0,0 +1,45 @@ +name: Data Product Deployment - Dev + +on: + push: + branches: [ main ] + paths: + - "code/**" + - "infra/**" + - ".github/workflows/dataProductDeployment.yml" + - ".github/workflows/validationTemplate.yml" + - ".github/workflows/deploymentTemplate.yml" + pull_request: + branches: [ main ] + paths: + - "code/**" + - "infra/**" + - ".github/workflows/dataProductDeployment.yml" + - ".github/workflows/validationTemplate.yml" + - ".github/workflows/deploymentTemplate.yml" + +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}' + +jobs: + validation_dev: + uses: "${{ github.repository }}/.github/workflows/validationTemplate.yml@${{ github.ref_name }}" + name: "Validation of IaC templates - Dev" + with: + environment: "dev" + azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID }} + azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME }} + azure_location_name: ${{ env.AZURE_LOCATION }} + + deployment_dev: + uses: "${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{ github.ref_name }}" + name: "Deployment of IaC templates - Dev" + needs: [ validation ] + if: github.event_name == 'push' + with: + environment: "dev" + azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID }} + azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME }} + azure_location_name: ${{ env.AZURE_LOCATION }} diff --git a/.github/workflows/dataProductDeploymentTestProd.yml b/.github/workflows/dataProductDeploymentTestProd.yml new file mode 100644 index 0000000..1a3b0ea --- /dev/null +++ b/.github/workflows/dataProductDeploymentTestProd.yml @@ -0,0 +1,62 @@ +name: Data Product Deployment - Test/Prod + +on: + release: + types: [ published ] + push: + branches: [ main ] + paths: + - "code/**" + - "infra/**" + - ".github/workflows/dataProductDeployment.yml" + - ".github/workflows/validationTemplate.yml" + - ".github/workflows/deploymentTemplate.yml" + +env: + AZURE_SUBSCRIPTION_ID_TEST: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}' + AZURE_RESOURCE_GROUP_NAME_TEST: "dlz01-dev-di002" # Update to '{dataLandingZoneName}-rg' + AZURE_SUBSCRIPTION_ID_PROD: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}' + AZURE_RESOURCE_GROUP_NAME_PROD: "dlz01-dev-di002" # Update to '{dataLandingZoneName}-rg' + AZURE_LOCATION: "northeurope" # Update to '{regionName}' + +jobs: + validation_test: + uses: "${{ github.repository }}/.github/workflows/validationTemplate.yml@${{ github.ref_name }}" + name: "Validation of IaC templates - Test" + with: + environment: "test" + azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_TEST }} + azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_TEST }} + azure_location_name: ${{ env.AZURE_LOCATION }} + + validation_prod: + uses: "${{ github.repository }}/.github/workflows/validationTemplate.yml@${{ github.ref_name }}" + name: "Validation of IaC templates - Prod" + needs: [ validation_test ] + with: + environment: "prod" + azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_PROD }} + azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_PROD }} + azure_location_name: ${{ env.AZURE_LOCATION }} + + deployment_test: + uses: "${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{ github.ref_name }}" + name: "Deployment of IaC templates - Test" + needs: [ validation_prod ] + if: github.event_name == 'release' + with: + environment: "test" + azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_TEST }} + azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_TEST }} + azure_location_name: ${{ env.AZURE_LOCATION }} + + deployment_prod: + uses: "${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{ github.ref_name }}" + name: "Deployment of IaC templates - Prod" + needs: [ deployment_test ] + if: github.event_name == 'release' + with: + environment: "prod" + azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_PROD }} + azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_PROD }} + azure_location_name: ${{ env.AZURE_LOCATION }} diff --git a/.github/workflows/deploymentTemplate.yml b/.github/workflows/deploymentTemplate.yml new file mode 100644 index 0000000..76322a4 --- /dev/null +++ b/.github/workflows/deploymentTemplate.yml @@ -0,0 +1,75 @@ +name: Deployment Template + +on: + workflow_call: + inputs: + environment: + required: true + type: string + default: "dev" + description: "Specifies the environment of the deployment." + azure_subscription_id: + required: true + type: string + description: "Specifies the subscription id of the deployment." + azure_resource_group_name: + required: true + type: string + description: "Specifies the resource group name of the deployment." + azure_location_name: + required: true + type: string + default: "northeurope" + description: "Specifies the location name of the deployment." + +jobs: + deployment: + name: Deployment to ${{ inputs.environment }} + runs-on: ubuntu-latest + continue-on-error: false + if: github.event_name == 'push' || github.event_name == 'release' + environment: ${{ inputs.environment }} + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Check Out Repository + id: checkout_repository + uses: actions/checkout@v2 + + # Login to Azure + - name: Azure Login + id: azure_login + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + # Generate Password 001 + - name: Generate Password 001 + id: generate_password_001 + run: | + echo "Generating Password" + pwsh "${GITHUB_WORKSPACE}/code/GeneratePassword.ps1" -GitHub + + # Deploy Data Product + - name: Deploy Data Product + id: data_product_deployment + uses: azure/arm-deploy@v1 + with: + scope: resourcegroup + subscriptionId: ${{ inputs.azure_subscription_id }} + resourceGroupName: ${{ inputs.azure_resource_group_name }} + region: ${{ inputs.azure_location_name }} + template: ${{ github.workspace }}/infra/main.json + parameters: ${{ github.workspace }}/infra/params.${{ inputs.environment }}.json administratorPassword="${{ steps.generate_password_001.outputs.password }}" + deploymentMode: Incremental + deploymentName: "DataProduct-${{ github.sha }}" + failOnStdErr: false + + # Log out from Azure + - name: Log out from Azure + id: azure_logout + uses: azure/cli@v1 + with: + azcliversion: "agentazcliversion" + inlineScript: | + az logout diff --git a/.github/workflows/validationTemplate.yml b/.github/workflows/validationTemplate.yml new file mode 100644 index 0000000..cebac5b --- /dev/null +++ b/.github/workflows/validationTemplate.yml @@ -0,0 +1,90 @@ +name: Deployment Template + +on: + workflow_call: + inputs: + environment: + required: true + type: string + default: "dev" + description: "Specifies the environment of the deployment." + azure_subscription_id: + required: true + type: string + description: "Specifies the subscription id of the deployment." + azure_resource_group_name: + required: true + type: string + description: "Specifies the resource group name of the deployment." + azure_location_name: + required: true + type: string + default: "northeurope" + description: "Specifies the location name of the deployment." + +jobs: + validation: + name: Validation in ${{ inputs.environment }} + runs-on: ubuntu-latest + continue-on-error: false + environment: ${{ inputs.environment }} + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Check Out Repository + id: checkout_repository + uses: actions/checkout@v2 + + # Login to Azure + - name: Azure Login + id: azure_login + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + # Generate Password 001 + - name: Generate Password 001 + id: generate_password_001 + run: | + echo "Generating Password" + pwsh "${GITHUB_WORKSPACE}/code/GeneratePassword.ps1" -GitHub + + # Deploy Data Product - validation + - name: Deploy Data Product - validation + id: data_product_validation + uses: azure/arm-deploy@v1 + with: + scope: resourcegroup + subscriptionId: ${{ inputs.azure_subscription_id }} + resourceGroupName: ${{ inputs.azure_resource_group_name }} + region: ${{ inputs.azure_location_name }} + template: ${{ github.workspace }}/infra/main.json + parameters: ${{ github.workspace }}/infra/params.${{ inputs.environment }}.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/arm-deploy@v1 + with: + scope: resourcegroup + subscriptionId: ${{ inputs.azure_subscription_id }} + resourceGroupName: ${{ inputs.azure_resource_group_name }} + region: ${{ inputs.azure_location_name }} + template: ${{ github.workspace }}/infra/main.json + parameters: ${{ github.workspace }}/infra/params.${{ inputs.environment }}.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 + id: azure_logout + uses: azure/cli@v1 + with: + azcliversion: "agentazcliversion" + inlineScript: | + az logout From 504bb5d341068c34a278130058b67880a73d87e2 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Tue, 7 Dec 2021 16:22:14 +0100 Subject: [PATCH 05/30] updated triggers --- .github/workflows/dataProductDeploymentDev.yml | 4 ++-- .github/workflows/dataProductDeploymentTestProd.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index 96de4e8..49356c8 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -6,7 +6,7 @@ on: paths: - "code/**" - "infra/**" - - ".github/workflows/dataProductDeployment.yml" + - ".github/workflows/dataProductDeploymentDev.yml" - ".github/workflows/validationTemplate.yml" - ".github/workflows/deploymentTemplate.yml" pull_request: @@ -14,7 +14,7 @@ on: paths: - "code/**" - "infra/**" - - ".github/workflows/dataProductDeployment.yml" + - ".github/workflows/dataProductDeploymentDev.yml" - ".github/workflows/validationTemplate.yml" - ".github/workflows/deploymentTemplate.yml" diff --git a/.github/workflows/dataProductDeploymentTestProd.yml b/.github/workflows/dataProductDeploymentTestProd.yml index 1a3b0ea..79e7b80 100644 --- a/.github/workflows/dataProductDeploymentTestProd.yml +++ b/.github/workflows/dataProductDeploymentTestProd.yml @@ -8,7 +8,7 @@ on: paths: - "code/**" - "infra/**" - - ".github/workflows/dataProductDeployment.yml" + - ".github/workflows/dataProductDeploymentTestProd.yml" - ".github/workflows/validationTemplate.yml" - ".github/workflows/deploymentTemplate.yml" From 5d416e5bc15b9c370fa6b1dd939c1bc8934c0b48 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Tue, 7 Dec 2021 16:25:25 +0100 Subject: [PATCH 06/30] updated dependency --- .github/workflows/dataProductDeploymentDev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index 49356c8..a7dee32 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -36,7 +36,7 @@ jobs: deployment_dev: uses: "${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{ github.ref_name }}" name: "Deployment of IaC templates - Dev" - needs: [ validation ] + needs: [ validation_dev ] if: github.event_name == 'push' with: environment: "dev" From 4814e5fc0d5df93553c54ac7cb080ca195d11471 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Tue, 7 Dec 2021 16:40:06 +0100 Subject: [PATCH 07/30] updated environments --- .github/workflows/dataProductDeploymentDev.yml | 18 ++++++++++++------ .github/workflows/deploymentTemplate.yml | 6 +++++- .github/workflows/validationTemplate.yml | 7 +++++-- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index a7dee32..72823be 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -19,27 +19,33 @@ on: - ".github/workflows/deploymentTemplate.yml" env: - AZURE_SUBSCRIPTION_ID: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}' - AZURE_RESOURCE_GROUP_NAME: "dlz01-dev-di002" # Update to '{dataLandingZoneName}-rg' + AZURE_SUBSCRIPTION_ID_DEV: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}' + AZURE_RESOURCE_GROUP_NAME_DEV: "dlz01-dev-di002" # Update to '{dataLandingZoneName}-rg' AZURE_LOCATION: "northeurope" # Update to '{regionName}' jobs: validation_dev: uses: "${{ github.repository }}/.github/workflows/validationTemplate.yml@${{ github.ref_name }}" name: "Validation of IaC templates - Dev" + environment: "dev" with: environment: "dev" - azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID }} - azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME }} + azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_DEV }} + azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_DEV }} azure_location_name: ${{ env.AZURE_LOCATION }} + secrets: + azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_dev: uses: "${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{ github.ref_name }}" name: "Deployment of IaC templates - Dev" + environment: "dev" needs: [ validation_dev ] if: github.event_name == 'push' with: environment: "dev" - azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID }} - azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME }} + azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_DEV }} + azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_DEV }} azure_location_name: ${{ env.AZURE_LOCATION }} + secrets: + azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} diff --git a/.github/workflows/deploymentTemplate.yml b/.github/workflows/deploymentTemplate.yml index 76322a4..cd4bb4d 100644 --- a/.github/workflows/deploymentTemplate.yml +++ b/.github/workflows/deploymentTemplate.yml @@ -21,6 +21,10 @@ on: type: string default: "northeurope" description: "Specifies the location name of the deployment." + secrets: + azure_credentials: + required: true + description: "Specifies the azure credentials used for authentication." jobs: deployment: @@ -41,7 +45,7 @@ jobs: id: azure_login uses: azure/login@v1 with: - creds: ${{ secrets.AZURE_CREDENTIALS }} + creds: ${{ secrets.azure_credentials }} # Generate Password 001 - name: Generate Password 001 diff --git a/.github/workflows/validationTemplate.yml b/.github/workflows/validationTemplate.yml index cebac5b..e074999 100644 --- a/.github/workflows/validationTemplate.yml +++ b/.github/workflows/validationTemplate.yml @@ -21,13 +21,16 @@ on: type: string default: "northeurope" description: "Specifies the location name of the deployment." + secrets: + azure_credentials: + required: true + description: "Specifies the azure credentials used for authentication." jobs: validation: name: Validation in ${{ inputs.environment }} runs-on: ubuntu-latest continue-on-error: false - environment: ${{ inputs.environment }} steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -40,7 +43,7 @@ jobs: id: azure_login uses: azure/login@v1 with: - creds: ${{ secrets.AZURE_CREDENTIALS }} + creds: ${{ secrets.azure_credentials }} # Generate Password 001 - name: Generate Password 001 From 1538749456f5f202fc90a7f96407c1b2dc000195 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 8 Dec 2021 09:21:20 +0100 Subject: [PATCH 08/30] updated workflows again --- .github/workflows/dataProductDeploymentDev.yml | 6 ------ .github/workflows/deploymentTemplate.yml | 6 +----- .github/workflows/validationTemplate.yml | 7 ++----- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index 72823be..4ba54f8 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -27,19 +27,15 @@ jobs: validation_dev: uses: "${{ github.repository }}/.github/workflows/validationTemplate.yml@${{ github.ref_name }}" name: "Validation of IaC templates - Dev" - environment: "dev" with: environment: "dev" azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_DEV }} azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_DEV }} azure_location_name: ${{ env.AZURE_LOCATION }} - secrets: - azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_dev: uses: "${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{ github.ref_name }}" name: "Deployment of IaC templates - Dev" - environment: "dev" needs: [ validation_dev ] if: github.event_name == 'push' with: @@ -47,5 +43,3 @@ jobs: azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_DEV }} azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_DEV }} azure_location_name: ${{ env.AZURE_LOCATION }} - secrets: - azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} diff --git a/.github/workflows/deploymentTemplate.yml b/.github/workflows/deploymentTemplate.yml index cd4bb4d..76322a4 100644 --- a/.github/workflows/deploymentTemplate.yml +++ b/.github/workflows/deploymentTemplate.yml @@ -21,10 +21,6 @@ on: type: string default: "northeurope" description: "Specifies the location name of the deployment." - secrets: - azure_credentials: - required: true - description: "Specifies the azure credentials used for authentication." jobs: deployment: @@ -45,7 +41,7 @@ jobs: id: azure_login uses: azure/login@v1 with: - creds: ${{ secrets.azure_credentials }} + creds: ${{ secrets.AZURE_CREDENTIALS }} # Generate Password 001 - name: Generate Password 001 diff --git a/.github/workflows/validationTemplate.yml b/.github/workflows/validationTemplate.yml index e074999..cebac5b 100644 --- a/.github/workflows/validationTemplate.yml +++ b/.github/workflows/validationTemplate.yml @@ -21,16 +21,13 @@ on: type: string default: "northeurope" description: "Specifies the location name of the deployment." - secrets: - azure_credentials: - required: true - description: "Specifies the azure credentials used for authentication." jobs: validation: name: Validation in ${{ inputs.environment }} runs-on: ubuntu-latest continue-on-error: false + environment: ${{ inputs.environment }} steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -43,7 +40,7 @@ jobs: id: azure_login uses: azure/login@v1 with: - creds: ${{ secrets.azure_credentials }} + creds: ${{ secrets.AZURE_CREDENTIALS }} # Generate Password 001 - name: Generate Password 001 From d475947e191b40afed2e316a754ab61274701965 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Thu, 9 Dec 2021 16:40:46 +0100 Subject: [PATCH 09/30] updated workflows based on guidance --- .github/workflows/dataProductDeploymentDev.yml | 4 ++++ .github/workflows/dataProductDeploymentTestProd.yml | 8 ++++++++ .github/workflows/deploymentTemplate.yml | 6 +++++- .github/workflows/validationTemplate.yml | 6 +++++- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index 4ba54f8..883e9cc 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -32,6 +32,8 @@ jobs: azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_DEV }} azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_DEV }} azure_location_name: ${{ env.AZURE_LOCATION }} + secrets: + azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_dev: uses: "${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{ github.ref_name }}" @@ -43,3 +45,5 @@ jobs: azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_DEV }} azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_DEV }} azure_location_name: ${{ env.AZURE_LOCATION }} + secrets: + azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} diff --git a/.github/workflows/dataProductDeploymentTestProd.yml b/.github/workflows/dataProductDeploymentTestProd.yml index 79e7b80..8f550b6 100644 --- a/.github/workflows/dataProductDeploymentTestProd.yml +++ b/.github/workflows/dataProductDeploymentTestProd.yml @@ -28,6 +28,8 @@ jobs: azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_TEST }} azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_TEST }} azure_location_name: ${{ env.AZURE_LOCATION }} + secrets: + azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} validation_prod: uses: "${{ github.repository }}/.github/workflows/validationTemplate.yml@${{ github.ref_name }}" @@ -38,6 +40,8 @@ jobs: azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_PROD }} azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_PROD }} azure_location_name: ${{ env.AZURE_LOCATION }} + secrets: + azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_test: uses: "${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{ github.ref_name }}" @@ -49,6 +53,8 @@ jobs: azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_TEST }} azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_TEST }} azure_location_name: ${{ env.AZURE_LOCATION }} + secrets: + azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_prod: uses: "${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{ github.ref_name }}" @@ -60,3 +66,5 @@ jobs: azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_PROD }} azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_PROD }} azure_location_name: ${{ env.AZURE_LOCATION }} + secrets: + azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} diff --git a/.github/workflows/deploymentTemplate.yml b/.github/workflows/deploymentTemplate.yml index 76322a4..0e1d0c7 100644 --- a/.github/workflows/deploymentTemplate.yml +++ b/.github/workflows/deploymentTemplate.yml @@ -21,6 +21,10 @@ on: type: string default: "northeurope" description: "Specifies the location name of the deployment." + secrets: + azure_credentials: + required: true + description: "Specifies the azure credentials used for authentication." jobs: deployment: @@ -41,7 +45,7 @@ jobs: id: azure_login uses: azure/login@v1 with: - creds: ${{ secrets.AZURE_CREDENTIALS }} + creds: ${{ inputs.azure_credentials }} # Generate Password 001 - name: Generate Password 001 diff --git a/.github/workflows/validationTemplate.yml b/.github/workflows/validationTemplate.yml index cebac5b..dc8ac8f 100644 --- a/.github/workflows/validationTemplate.yml +++ b/.github/workflows/validationTemplate.yml @@ -21,6 +21,10 @@ on: type: string default: "northeurope" description: "Specifies the location name of the deployment." + secrets: + azure_credentials: + required: true + description: "Specifies the azure credentials used for authentication." jobs: validation: @@ -40,7 +44,7 @@ jobs: id: azure_login uses: azure/login@v1 with: - creds: ${{ secrets.AZURE_CREDENTIALS }} + creds: ${{ inputs.azure_credentials }} # Generate Password 001 - name: Generate Password 001 From 6f0d2e0424b7b7f8bdbbd31324942d2f7630e6da Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Thu, 9 Dec 2021 16:44:29 +0100 Subject: [PATCH 10/30] updated ref --- .github/workflows/deploymentTemplate.yml | 2 +- .github/workflows/validationTemplate.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploymentTemplate.yml b/.github/workflows/deploymentTemplate.yml index 0e1d0c7..cd4bb4d 100644 --- a/.github/workflows/deploymentTemplate.yml +++ b/.github/workflows/deploymentTemplate.yml @@ -45,7 +45,7 @@ jobs: id: azure_login uses: azure/login@v1 with: - creds: ${{ inputs.azure_credentials }} + creds: ${{ secrets.azure_credentials }} # Generate Password 001 - name: Generate Password 001 diff --git a/.github/workflows/validationTemplate.yml b/.github/workflows/validationTemplate.yml index dc8ac8f..3849b0f 100644 --- a/.github/workflows/validationTemplate.yml +++ b/.github/workflows/validationTemplate.yml @@ -44,7 +44,7 @@ jobs: id: azure_login uses: azure/login@v1 with: - creds: ${{ inputs.azure_credentials }} + creds: ${{ secrets.azure_credentials }} # Generate Password 001 - name: Generate Password 001 From 93a6397ed2eec85e4c6b4d49524cc2c663f1b395 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Thu, 9 Dec 2021 16:53:33 +0100 Subject: [PATCH 11/30] test --- .github/workflows/dataProductDeploymentDev.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index 883e9cc..dac8659 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -21,11 +21,11 @@ on: env: AZURE_SUBSCRIPTION_ID_DEV: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}' AZURE_RESOURCE_GROUP_NAME_DEV: "dlz01-dev-di002" # Update to '{dataLandingZoneName}-rg' - AZURE_LOCATION: "northeurope" # Update to '{regionName}' + AZURE_LOCATION: "northeurope" # Update to '{regionName}' jobs: validation_dev: - uses: "${{ github.repository }}/.github/workflows/validationTemplate.yml@${{ github.ref_name }}" + uses: "${{ github.repository }}/.github/workflows/validationTemplate.yml@marvinbuss/what_if" name: "Validation of IaC templates - Dev" with: environment: "dev" @@ -36,7 +36,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_dev: - uses: "${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{ github.ref_name }}" + uses: "${{ github.repository }}/.github/workflows/deploymentTemplate.yml@marvinbuss/what_if" name: "Deployment of IaC templates - Dev" needs: [ validation_dev ] if: github.event_name == 'push' From 30ae3654bff39ce20bbf0d2d6a8aba55894fe818 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Thu, 9 Dec 2021 16:54:31 +0100 Subject: [PATCH 12/30] test --- .github/workflows/dataProductDeploymentDev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index dac8659..1065323 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -25,7 +25,7 @@ env: jobs: validation_dev: - uses: "${{ github.repository }}/.github/workflows/validationTemplate.yml@marvinbuss/what_if" + uses: "Azure/data-product-streaming/.github/workflows/validationTemplate.yml@marvinbuss/what_if" name: "Validation of IaC templates - Dev" with: environment: "dev" @@ -36,7 +36,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_dev: - uses: "${{ github.repository }}/.github/workflows/deploymentTemplate.yml@marvinbuss/what_if" + uses: "Azure/data-product-streaming/.github/workflows/deploymentTemplate.yml@marvinbuss/what_if" name: "Deployment of IaC templates - Dev" needs: [ validation_dev ] if: github.event_name == 'push' From af239a1d3037e7f0d63a2ed1d9c0f2aa4f44e0a8 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Thu, 9 Dec 2021 16:55:37 +0100 Subject: [PATCH 13/30] test --- .github/workflows/dataProductDeploymentDev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index 1065323..c14f0c9 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -25,7 +25,7 @@ env: jobs: validation_dev: - uses: "Azure/data-product-streaming/.github/workflows/validationTemplate.yml@marvinbuss/what_if" + uses: Azure/data-product-streaming/.github/workflows/validationTemplate.yml@marvinbuss/what_if name: "Validation of IaC templates - Dev" with: environment: "dev" @@ -36,7 +36,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_dev: - uses: "Azure/data-product-streaming/.github/workflows/deploymentTemplate.yml@marvinbuss/what_if" + uses: Azure/data-product-streaming/.github/workflows/deploymentTemplate.yml@marvinbuss/what_if name: "Deployment of IaC templates - Dev" needs: [ validation_dev ] if: github.event_name == 'push' From f7ffd9edf1b77dab16bb617cc6ea73df66f5cb64 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Thu, 9 Dec 2021 16:57:25 +0100 Subject: [PATCH 14/30] updated trigger --- .github/workflows/dataProductDeploymentDev.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index c14f0c9..43cc5e4 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -6,17 +6,13 @@ on: paths: - "code/**" - "infra/**" - - ".github/workflows/dataProductDeploymentDev.yml" - - ".github/workflows/validationTemplate.yml" - - ".github/workflows/deploymentTemplate.yml" + - ".github/workflows/**" pull_request: branches: [ main ] paths: - "code/**" - "infra/**" - - ".github/workflows/dataProductDeploymentDev.yml" - - ".github/workflows/validationTemplate.yml" - - ".github/workflows/deploymentTemplate.yml" + - ".github/workflows/**" env: AZURE_SUBSCRIPTION_ID_DEV: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}' From 0d120328e0a3a406d4feeee39e928272d0d20aa5 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Thu, 9 Dec 2021 16:58:43 +0100 Subject: [PATCH 15/30] test --- .github/workflows/dataProductDeploymentDev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index 43cc5e4..5cd910f 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -21,7 +21,7 @@ env: jobs: validation_dev: - uses: Azure/data-product-streaming/.github/workflows/validationTemplate.yml@marvinbuss/what_if + uses: Azure/data-product-streaming/.github/workflows/validationTemplate.yml@marvinbuss\/what_if name: "Validation of IaC templates - Dev" with: environment: "dev" @@ -32,7 +32,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_dev: - uses: Azure/data-product-streaming/.github/workflows/deploymentTemplate.yml@marvinbuss/what_if + uses: Azure/data-product-streaming/.github/workflows/deploymentTemplate.yml@marvinbuss\/what_if name: "Deployment of IaC templates - Dev" needs: [ validation_dev ] if: github.event_name == 'push' From 0c9b692c37aab3c6aa4ae85ddfae87ba970d3b82 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Thu, 9 Dec 2021 17:13:57 +0100 Subject: [PATCH 16/30] updated workflows --- .github/workflows/dataProductDeploymentDev.yml | 4 ++-- .github/workflows/lint.yml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index 5cd910f..43cc5e4 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -21,7 +21,7 @@ env: jobs: validation_dev: - uses: Azure/data-product-streaming/.github/workflows/validationTemplate.yml@marvinbuss\/what_if + uses: Azure/data-product-streaming/.github/workflows/validationTemplate.yml@marvinbuss/what_if name: "Validation of IaC templates - Dev" with: environment: "dev" @@ -32,7 +32,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_dev: - uses: Azure/data-product-streaming/.github/workflows/deploymentTemplate.yml@marvinbuss\/what_if + uses: Azure/data-product-streaming/.github/workflows/deploymentTemplate.yml@marvinbuss/what_if name: "Deployment of IaC templates - Dev" needs: [ validation_dev ] if: github.event_name == 'push' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9678e53..c7ee6fd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,6 +12,10 @@ jobs: runs-on: ubuntu-latest steps: + - run: | + echo ${{ github.ref_name }} + echo ${{ github.repository }} + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Check Out Repository id: checkout_repository From 5d8fc61068ad75347ec1e8322af84d87c1ca426f Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Thu, 9 Dec 2021 17:21:11 +0100 Subject: [PATCH 17/30] test --- .github/workflows/dataProductDeploymentDev.yml | 4 ++-- .github/workflows/lint.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index 43cc5e4..5e6cd7f 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -21,7 +21,7 @@ env: jobs: validation_dev: - uses: Azure/data-product-streaming/.github/workflows/validationTemplate.yml@marvinbuss/what_if + uses: ${{ github.repository }}/.github/workflows/validationTemplate.yml@${{ github.sha }} name: "Validation of IaC templates - Dev" with: environment: "dev" @@ -32,7 +32,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_dev: - uses: Azure/data-product-streaming/.github/workflows/deploymentTemplate.yml@marvinbuss/what_if + uses: ${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{ github.sha }} name: "Deployment of IaC templates - Dev" needs: [ validation_dev ] if: github.event_name == 'push' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c7ee6fd..8013b0c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,7 @@ jobs: steps: - run: | - echo ${{ github.ref_name }} + echo ${{ github.sha }} echo ${{ github.repository }} # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it From 08955242aa85f61d45b3365eeb3c2e4325186e3f Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Thu, 9 Dec 2021 17:30:54 +0100 Subject: [PATCH 18/30] test --- .github/workflows/dataProductDeploymentDev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index 5e6cd7f..8620f1b 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -21,7 +21,7 @@ env: jobs: validation_dev: - uses: ${{ github.repository }}/.github/workflows/validationTemplate.yml@${{ github.sha }} + uses: ${{ github.repository }}/.github/workflows/validationTemplate.yml@${{github.sha}} name: "Validation of IaC templates - Dev" with: environment: "dev" @@ -32,7 +32,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_dev: - uses: ${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{ github.sha }} + uses: ${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{github.sha}} name: "Deployment of IaC templates - Dev" needs: [ validation_dev ] if: github.event_name == 'push' From 66fd3fade9eb7d76f4adaf69634599411b52c75d Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Thu, 9 Dec 2021 17:43:53 +0100 Subject: [PATCH 19/30] update reference --- .github/workflows/dataProductDeploymentDev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index 8620f1b..4c0dae4 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -21,7 +21,7 @@ env: jobs: validation_dev: - uses: ${{ github.repository }}/.github/workflows/validationTemplate.yml@${{github.sha}} + uses: $GITHUB_REPOSITORY/.github/workflows/validationTemplate.yml@$GITHUB_SHA name: "Validation of IaC templates - Dev" with: environment: "dev" @@ -32,7 +32,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_dev: - uses: ${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{github.sha}} + uses: $GITHUB_REPOSITORY/.github/workflows/deploymentTemplate.yml@$GITHUB_SHA name: "Deployment of IaC templates - Dev" needs: [ validation_dev ] if: github.event_name == 'push' From 777fc5770e8117d60540c61f8518b8e098699f84 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Thu, 9 Dec 2021 17:49:10 +0100 Subject: [PATCH 20/30] updated reference back --- .github/workflows/dataProductDeploymentDev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index 4c0dae4..8620f1b 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -21,7 +21,7 @@ env: jobs: validation_dev: - uses: $GITHUB_REPOSITORY/.github/workflows/validationTemplate.yml@$GITHUB_SHA + uses: ${{ github.repository }}/.github/workflows/validationTemplate.yml@${{github.sha}} name: "Validation of IaC templates - Dev" with: environment: "dev" @@ -32,7 +32,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_dev: - uses: $GITHUB_REPOSITORY/.github/workflows/deploymentTemplate.yml@$GITHUB_SHA + uses: ${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{github.sha}} name: "Deployment of IaC templates - Dev" needs: [ validation_dev ] if: github.event_name == 'push' From 1dbaa3d51c586a7c149ee9b63998181ed6b55785 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Mon, 20 Dec 2021 09:20:30 +0100 Subject: [PATCH 21/30] Updated links in PR and Issue Templates --- .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 4 ++-- .github/ISSUE_TEMPLATE/DOCUMENTATION_ISSUE.yml | 4 ++-- .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml | 4 ++-- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index 268eb71..8dc6608 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -10,7 +10,7 @@ body: - type: markdown attributes: value: | - Thanks for taking the time to fill out this report! Before submitting, please make sure to [search through existing issues](https://github.com/Azure/data-product-streaming/issues) and [check the Known Issues section](/docs/EnterpriseScaleAnalytics-KnownIssues.md). + Thanks for taking the time to fill out this report! Before submitting, please make sure to [search through existing issues](https://github.com/Azure/data-product-streaming/issues) and [check the Known Issues section](https://github.com/Azure/data-product-streaming/blob/main/docs/EnterpriseScaleAnalytics-KnownIssues.md). - type: dropdown id: deployment @@ -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 dfbd53b..87f8f25 100644 --- a/.github/ISSUE_TEMPLATE/DOCUMENTATION_ISSUE.yml +++ b/.github/ISSUE_TEMPLATE/DOCUMENTATION_ISSUE.yml @@ -9,7 +9,7 @@ body: - type: markdown attributes: value: | - Thanks for taking the time to fill out this report! Before submitting, please make sure to [search through existing issues](https://github.com/Azure/data-product-streaming/issues) and [check the Known Issues section](/docs/EnterpriseScaleAnalytics-KnownIssues.md). + Thanks for taking the time to fill out this report! Before submitting, please make sure to [search through existing issues](https://github.com/Azure/data-product-streaming/issues) and [check the Known Issues section](https://github.com/Azure/data-product-streaming/blob/main/docs/EnterpriseScaleAnalytics-KnownIssues.md). - type: textarea id: description @@ -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 f7e1ad0..586f93f 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml @@ -10,7 +10,7 @@ body: - type: markdown attributes: value: | - Thanks for taking the time to fill out this report! Before submitting, please make sure to [search through existing issues](https://github.com/Azure/data-product-streaming/issues) and [check the Known Issues section](/docs/EnterpriseScaleAnalytics-KnownIssues.md). + Thanks for taking the time to fill out this report! Before submitting, please make sure to [search through existing issues](https://github.com/Azure/data-product-streaming/issues) and [check the Known Issues section](https://github.com/Azure/data-product-streaming/blob/main/docs/EnterpriseScaleAnalytics-KnownIssues.md). - type: textarea id: feature_description @@ -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..28b9223 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 +* [ ] Code of Conduct signed. If not, go to [Code of Conduct](https://github.com/Azure/data-management-zone/blob/main/CODE_OF_CONDUCT.md). ## Validation Steps Performed From 126673f93e1dac8ca48d57f0e22dfd94c917cbc1 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Mon, 20 Dec 2021 11:27:18 +0100 Subject: [PATCH 22/30] updated gh workflows and templates --- .../workflows/dataProductDeploymentDev.yml | 24 +++++----- .../dataProductDeploymentTestProd.yml | 47 +++++++++---------- .../deployment.yml} | 12 ++--- .../validation.yml} | 18 +++---- 4 files changed, 44 insertions(+), 57 deletions(-) rename .github/workflows/{deploymentTemplate.yml => templates/deployment.yml} (89%) rename .github/workflows/{validationTemplate.yml => templates/validation.yml} (86%) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index 8620f1b..78043de 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -15,31 +15,29 @@ on: - ".github/workflows/**" env: - AZURE_SUBSCRIPTION_ID_DEV: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}' - AZURE_RESOURCE_GROUP_NAME_DEV: "dlz01-dev-di002" # Update to '{dataLandingZoneName}-rg' - AZURE_LOCATION: "northeurope" # Update to '{regionName}' + DEV_ENVIRONMENT_NAME: "dev" # Update to '{devEnvironmentName}' jobs: validation_dev: - uses: ${{ github.repository }}/.github/workflows/validationTemplate.yml@${{github.sha}} + uses: ${{ github.repository }}/.github/workflows/templates/validation.yml@${{github.sha}} name: "Validation of IaC templates - Dev" with: - environment: "dev" - azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_DEV }} - azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_DEV }} - azure_location_name: ${{ env.AZURE_LOCATION }} + environment: ${{ env.DEV_ENVIRONMENT_NAME }} secrets: + azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + azure_resource_group_name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} + azure_location_name: ${{ secrets.AZURE_LOCATION }} azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_dev: - uses: ${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{github.sha}} + uses: ${{ github.repository }}/.github/workflows/templates/deployment.yml@${{github.sha}} name: "Deployment of IaC templates - Dev" needs: [ validation_dev ] if: github.event_name == 'push' with: - environment: "dev" - azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_DEV }} - azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_DEV }} - azure_location_name: ${{ env.AZURE_LOCATION }} + environment: ${{ env.DEV_ENVIRONMENT_NAME }} secrets: + azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + azure_resource_group_name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} + azure_location_name: ${{ secrets.AZURE_LOCATION }} azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} diff --git a/.github/workflows/dataProductDeploymentTestProd.yml b/.github/workflows/dataProductDeploymentTestProd.yml index 8f550b6..5a4e4be 100644 --- a/.github/workflows/dataProductDeploymentTestProd.yml +++ b/.github/workflows/dataProductDeploymentTestProd.yml @@ -13,58 +13,55 @@ on: - ".github/workflows/deploymentTemplate.yml" env: - AZURE_SUBSCRIPTION_ID_TEST: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}' - AZURE_RESOURCE_GROUP_NAME_TEST: "dlz01-dev-di002" # Update to '{dataLandingZoneName}-rg' - AZURE_SUBSCRIPTION_ID_PROD: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}' - AZURE_RESOURCE_GROUP_NAME_PROD: "dlz01-dev-di002" # Update to '{dataLandingZoneName}-rg' - AZURE_LOCATION: "northeurope" # Update to '{regionName}' + TEST_ENVIRONMENT_NAME: "test" # Update to '{testEnvironmentName}' + PROD_ENVIRONMENT_NAME: "prod" # Update to '{prodEnvironmentName}' jobs: validation_test: - uses: "${{ github.repository }}/.github/workflows/validationTemplate.yml@${{ github.ref_name }}" + uses: "${{ github.repository }}/.github/workflows/templates/validation.yml@${{ github.ref_name }}" name: "Validation of IaC templates - Test" with: - environment: "test" - azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_TEST }} - azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_TEST }} - azure_location_name: ${{ env.AZURE_LOCATION }} + environment: ${{ env.TEST_ENVIRONMENT_NAME }} secrets: + azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + azure_resource_group_name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} + azure_location_name: ${{ secrets.AZURE_LOCATION }} azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} validation_prod: - uses: "${{ github.repository }}/.github/workflows/validationTemplate.yml@${{ github.ref_name }}" + uses: "${{ github.repository }}/.github/workflows/templates/validation.yml@${{ github.ref_name }}" name: "Validation of IaC templates - Prod" needs: [ validation_test ] with: - environment: "prod" - azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_PROD }} - azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_PROD }} - azure_location_name: ${{ env.AZURE_LOCATION }} + environment: ${{ env.PROD_ENVIRONMENT_NAME }} secrets: + azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + azure_resource_group_name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} + azure_location_name: ${{ secrets.AZURE_LOCATION }} azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_test: - uses: "${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{ github.ref_name }}" + uses: "${{ github.repository }}/.github/workflows/templates/deployment.yml@${{ github.ref_name }}" name: "Deployment of IaC templates - Test" needs: [ validation_prod ] if: github.event_name == 'release' with: - environment: "test" - azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_TEST }} - azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_TEST }} - azure_location_name: ${{ env.AZURE_LOCATION }} + environment: ${{ env.TEST_ENVIRONMENT_NAME }} secrets: + azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + azure_resource_group_name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} + azure_location_name: ${{ secrets.AZURE_LOCATION }} azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_prod: - uses: "${{ github.repository }}/.github/workflows/deploymentTemplate.yml@${{ github.ref_name }}" + uses: "${{ github.repository }}/.github/workflows/templates/deployment.yml@${{ github.ref_name }}" name: "Deployment of IaC templates - Prod" needs: [ deployment_test ] if: github.event_name == 'release' with: - environment: "prod" - azure_subscription_id: ${{ env.AZURE_SUBSCRIPTION_ID_PROD }} - azure_resource_group_name: ${{ env.AZURE_RESOURCE_GROUP_NAME_PROD }} - azure_location_name: ${{ env.AZURE_LOCATION }} + environment: ${{ env.PROD_ENVIRONMENT_NAME }} secrets: + azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + azure_resource_group_name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} + azure_location_name: ${{ secrets.AZURE_LOCATION }} azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} diff --git a/.github/workflows/deploymentTemplate.yml b/.github/workflows/templates/deployment.yml similarity index 89% rename from .github/workflows/deploymentTemplate.yml rename to .github/workflows/templates/deployment.yml index cd4bb4d..f3d94c3 100644 --- a/.github/workflows/deploymentTemplate.yml +++ b/.github/workflows/templates/deployment.yml @@ -8,20 +8,16 @@ on: type: string default: "dev" description: "Specifies the environment of the deployment." + secrets: azure_subscription_id: required: true - type: string description: "Specifies the subscription id of the deployment." azure_resource_group_name: required: true - type: string description: "Specifies the resource group name of the deployment." azure_location_name: required: true - type: string - default: "northeurope" description: "Specifies the location name of the deployment." - secrets: azure_credentials: required: true description: "Specifies the azure credentials used for authentication." @@ -60,9 +56,9 @@ jobs: uses: azure/arm-deploy@v1 with: scope: resourcegroup - subscriptionId: ${{ inputs.azure_subscription_id }} - resourceGroupName: ${{ inputs.azure_resource_group_name }} - region: ${{ inputs.azure_location_name }} + subscriptionId: ${{ secrets.azure_subscription_id }} + resourceGroupName: ${{ secrets.azure_resource_group_name }} + region: ${{ secrets.azure_location_name }} template: ${{ github.workspace }}/infra/main.json parameters: ${{ github.workspace }}/infra/params.${{ inputs.environment }}.json administratorPassword="${{ steps.generate_password_001.outputs.password }}" deploymentMode: Incremental diff --git a/.github/workflows/validationTemplate.yml b/.github/workflows/templates/validation.yml similarity index 86% rename from .github/workflows/validationTemplate.yml rename to .github/workflows/templates/validation.yml index 3849b0f..8f19e8b 100644 --- a/.github/workflows/validationTemplate.yml +++ b/.github/workflows/templates/validation.yml @@ -8,20 +8,16 @@ on: type: string default: "dev" description: "Specifies the environment of the deployment." + secrets: azure_subscription_id: required: true - type: string description: "Specifies the subscription id of the deployment." azure_resource_group_name: required: true - type: string description: "Specifies the resource group name of the deployment." azure_location_name: required: true - type: string - default: "northeurope" description: "Specifies the location name of the deployment." - secrets: azure_credentials: required: true description: "Specifies the azure credentials used for authentication." @@ -59,9 +55,9 @@ jobs: uses: azure/arm-deploy@v1 with: scope: resourcegroup - subscriptionId: ${{ inputs.azure_subscription_id }} - resourceGroupName: ${{ inputs.azure_resource_group_name }} - region: ${{ inputs.azure_location_name }} + subscriptionId: ${{ secrets.azure_subscription_id }} + resourceGroupName: ${{ secrets.azure_resource_group_name }} + region: ${{ secrets.azure_location_name }} template: ${{ github.workspace }}/infra/main.json parameters: ${{ github.workspace }}/infra/params.${{ inputs.environment }}.json administratorPassword="${{ steps.generate_password_001.outputs.password }}" deploymentMode: Validate @@ -74,9 +70,9 @@ jobs: uses: azure/arm-deploy@v1 with: scope: resourcegroup - subscriptionId: ${{ inputs.azure_subscription_id }} - resourceGroupName: ${{ inputs.azure_resource_group_name }} - region: ${{ inputs.azure_location_name }} + subscriptionId: ${{ secrets.azure_subscription_id }} + resourceGroupName: ${{ secrets.azure_resource_group_name }} + region: ${{ secrets.azure_location_name }} template: ${{ github.workspace }}/infra/main.json parameters: ${{ github.workspace }}/infra/params.${{ inputs.environment }}.json administratorPassword="${{ steps.generate_password_001.outputs.password }}" deploymentMode: Incremental From 847568b125ee730bf17cb66400d6cdd2ee400082 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Mon, 20 Dec 2021 11:27:33 +0100 Subject: [PATCH 23/30] Added ado template --- .ado/workflows/templates/validation.yml | 101 ++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 .ado/workflows/templates/validation.yml diff --git a/.ado/workflows/templates/validation.yml b/.ado/workflows/templates/validation.yml new file mode 100644 index 0000000..a337306 --- /dev/null +++ b/.ado/workflows/templates/validation.yml @@ -0,0 +1,101 @@ +parameters: + - name: environment + displayName: Environment + type: string + - name: azure_resource_manager_connection_name + displayName: Azure Resource Manager Connection Name + type: string + - name: azure_subscription_id + displayName: Azure Subscription ID + type: string + - name: azure_resource_group_name + displayName: Azure Resource Group Name + type: string + - name: azure_location_name + displayName: Azure Location Name + type: string + +variables: + - group: ${{ parameters.environment }} + +jobs: + - job: Validation + displayName: "Validation of ARM templates" + continueOnError: false + pool: + vmImage: "ubuntu-latest" + variables: + - group: ${{ parameters.environment }} + + steps: + # Checkout code + - checkout: self + name: checkout_repository + displayName: "Checkout repository" + submodules: true + lfs: false + clean: true + continueOnError: false + enabled: true + + # Generate Password 001 + - task: PowerShell@2 + name: generate_password_001 + displayName: Generate Password 001 + enabled: true + continueOnError: false + inputs: + targetType: "filePath" + filePath: "$(System.DefaultWorkingDirectory)/code/GeneratePassword.ps1" + errorActionPreference: "stop" + failOnStderr: false + ignoreLASTEXITCODE: false + pwsh: true + + # Deploy Data Product - validation + - task: AzureResourceManagerTemplateDeployment@3 + name: data_product_validation + displayName: Deploy Data Product - validation + enabled: true + continueOnError: false + inputs: + deploymentScope: "Resource Group" + azureResourceManagerConnection: ${{ parameters.azure_resource_manager_connection_name }} + subscriptionId: ${{ parameters.azure_subscription_id }} + action: "Create Or Update Resource Group" + resourceGroupName: ${{ parameters.azure_resource_group_name }} + location: ${{ parameters.azure_location_name }} + templateLocation: "Linked artifact" + csmFile: "$(System.DefaultWorkingDirectory)/infra/main.json" + csmParametersFile: "$(System.DefaultWorkingDirectory)/infra/params.${{ parameters.environment }}.json" + deploymentMode: "Validation" + overrideParameters: > + -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: ${{ parameters.azure_resource_manager_connection_name }} + scriptType: pscore + scriptLocation: inlineScript + inlineScript: | + az account set ` + --subscription ${{ parameters.azure_subscription_id }} + + az deployment group what-if ` + --resource-group ${{ parameters.azure_resource_group_name }} ` + --exclude-change-types Ignore NoChange Unsupported ` + --mode "Incremental" ` + --template-file "$(System.DefaultWorkingDirectory)/infra/main.json" ` + --parameters "$(System.DefaultWorkingDirectory)/infra/params.${{ parameters.environment }}.json" administratorPassword="$(password)" ` + --result-format "FullResourcePayloads" + + powerShellErrorActionPreference: "stop" + addSpnToEnvironment: false + useGlobalConfig: false + failOnStandardError: false + powerShellIgnoreLASTEXITCODE: false From 3a99b8b8f545f6b165d3b483e003aafa73c19fc7 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Mon, 20 Dec 2021 12:05:04 +0100 Subject: [PATCH 24/30] Updated ado pipelines --- .ado/workflows/dataProductDeploymentDev.yml | 44 +++++++++++++ .../dataProductDeploymentTestProd.yml | 61 +++++++++++++++++++ .ado/workflows/templates/deployment.yml | 61 +++++++++++++++++++ .ado/workflows/templates/validation.yml | 42 +++++-------- .github/workflows/templates/validation.yml | 2 +- 5 files changed, 182 insertions(+), 28 deletions(-) create mode 100644 .ado/workflows/dataProductDeploymentDev.yml create mode 100644 .ado/workflows/dataProductDeploymentTestProd.yml create mode 100644 .ado/workflows/templates/deployment.yml diff --git a/.ado/workflows/dataProductDeploymentDev.yml b/.ado/workflows/dataProductDeploymentDev.yml new file mode 100644 index 0000000..38558e7 --- /dev/null +++ b/.ado/workflows/dataProductDeploymentDev.yml @@ -0,0 +1,44 @@ +name: Data Product Deployment - Dev + +trigger: + branches: + include: + - main + paths: + include: + - code/* + - infra/* + - .ado/workflows/* +pr: + branches: + include: + - main + paths: + include: + - code/* + - infra/* + - .ado/workflows/* + +variables: + DEV_ENVIRONMENT_NAME: "dev" # Update to '{devEnvironmentName}' + DEV_VARIABLE_GROUP_NAME: "dev-product-streaming" # Update to '{devVariableGroupName}' + +stages: + - stage: Validation_Dev + displayName: "Validation of IaC templates - Dev" + jobs: + - template: templates/validation.yml + parameters: + environment_name: ${{ variables.DEV_ENVIRONMENT_NAME }} + variable_group_name: ${{ variables.DEV_VARIABLE_GROUP_NAME }} + + - stage: Deployment_Dev + displayName: "Deployment of IaC templates - Dev" + dependsOn: [ Validation_Dev ] + # condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI')) + + jobs: + - template: templates/deployment.yml + parameters: + environment_name: ${{ variables.DEV_ENVIRONMENT_NAME }} + variable_group_name: ${{ variables.DEV_VARIABLE_GROUP_NAME }} diff --git a/.ado/workflows/dataProductDeploymentTestProd.yml b/.ado/workflows/dataProductDeploymentTestProd.yml new file mode 100644 index 0000000..c8a71e8 --- /dev/null +++ b/.ado/workflows/dataProductDeploymentTestProd.yml @@ -0,0 +1,61 @@ +name: Data Product Deployment - Test/Prod + +trigger: + branches: + include: + - main + - releases/* + tags: + include: + - '*' + paths: + include: + - code/* + - infra/* + - .ado/workflows/* + +variables: + TEST_ENVIRONMENT_NAME: "test" # Update to '{testEnvironmentName}' + TEST_VARIABLE_GROUP_NAME: "test-product-streaming" # Update to '{testVariableGroupName}' + PROD_ENVIRONMENT_NAME: "prod" # Update to '{prodEnvironmentName}' + PROD_VARIABLE_GROUP_NAME: "prod-product-streaming" # Update to '{prodVariableGroupName}' + +stages: + - stage: Validation_Test + displayName: "Validation of IaC templates - Test" + continue-on-error: false + jobs: + - template: templates/validation.yml + parameters: + environment_name: ${{ variables.TEST_ENVIRONMENT_NAME }} + variable_group_name: ${{ variables.TEST_VARIABLE_GROUP_NAME }} + + - stage: Validation_Prod + displayName: "Validation of IaC templates - Prod" + jobs: + - template: templates/validation.yml + parameters: + environment_name: ${{ variables.PROD_ENVIRONMENT_NAME }} + variable_group_name: ${{ variables.PROD_VARIABLE_GROUP_NAME }} + + - stage: Deployment_Test + displayName: "Deployment of IaC templates - Test" + dependsOn: [ Validation_Test, Validation_Prod ] + # condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI')) + + jobs: + - template: templates/deployment.yml + parameters: + environment_name: ${{ variables.TEST_ENVIRONMENT_NAME }} + variable_group_name: ${{ variables.TEST_VARIABLE_GROUP_NAME }} + + - stage: Deployment_Prod + displayName: "Deployment of IaC templates - Prod" + dependsOn: [ Deployment_Test ] + # condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI')) + + jobs: + - template: templates/deployment.yml + parameters: + environment_name: ${{ variables.PROD_ENVIRONMENT_NAME }} + variable_group_name: ${{ variables.PROD_VARIABLE_GROUP_NAME }} diff --git a/.ado/workflows/templates/deployment.yml b/.ado/workflows/templates/deployment.yml new file mode 100644 index 0000000..1f3c842 --- /dev/null +++ b/.ado/workflows/templates/deployment.yml @@ -0,0 +1,61 @@ +parameters: + - name: environment_name + displayName: Environment Name + type: string + - name: variable_group_name + displayName: Variable Group Name + type: string + +jobs: + - job: Deployment + displayName: "Deployment to ${{ parameters.environment_name }}" + continueOnError: false + pool: + vmImage: "ubuntu-latest" + variables: + - group: ${{ parameters.variable_group_name }} + + steps: + # Checkout code + - checkout: self + name: checkout_repository + displayName: "Checkout repository" + submodules: true + lfs: false + clean: true + continueOnError: false + enabled: true + + # Generate Password 001 + - task: PowerShell@2 + name: generate_password_001 + displayName: Generate Password 001 + enabled: true + continueOnError: false + inputs: + targetType: "filePath" + filePath: "$(System.DefaultWorkingDirectory)/code/GeneratePassword.ps1" + errorActionPreference: "stop" + failOnStderr: false + ignoreLASTEXITCODE: false + pwsh: true + + # Deploy Data Product + - task: AzureResourceManagerTemplateDeployment@3 + name: data_product_deployment + displayName: Deploy Data Product + enabled: true + continueOnError: false + inputs: + deploymentScope: "Resource Group" + azureResourceManagerConnection: $(AZURE_RESOURCE_MANAGER_CONNECTION_NAME) + subscriptionId: $(AZURE_SUBSCRIPTION_ID) + action: "Create Or Update Resource Group" + resourceGroupName: $(AZURE_RESOURCE_GROUP_NAME) + location: $(AZURE_LOCATION) + templateLocation: "Linked artifact" + csmFile: "$(System.DefaultWorkingDirectory)/infra/main.json" + csmParametersFile: "$(System.DefaultWorkingDirectory)/infra/params.${{ parameters.environment_name }}.json" + deploymentMode: "Incremental" + overrideParameters: > + -administratorPassword "$(password)" diff --git a/.ado/workflows/templates/validation.yml b/.ado/workflows/templates/validation.yml index a337306..0221637 100644 --- a/.ado/workflows/templates/validation.yml +++ b/.ado/workflows/templates/validation.yml @@ -1,31 +1,19 @@ parameters: - - name: environment - displayName: Environment + - name: environment_name + displayName: Environment Name type: string - - name: azure_resource_manager_connection_name - displayName: Azure Resource Manager Connection Name + - name: variable_group_name + displayName: Variable Group Name type: string - - name: azure_subscription_id - displayName: Azure Subscription ID - type: string - - name: azure_resource_group_name - displayName: Azure Resource Group Name - type: string - - name: azure_location_name - displayName: Azure Location Name - type: string - -variables: - - group: ${{ parameters.environment }} jobs: - job: Validation - displayName: "Validation of ARM templates" + displayName: "Validation of ${{ parameters.environment_name }}" continueOnError: false pool: vmImage: "ubuntu-latest" variables: - - group: ${{ parameters.environment }} + - group: ${{ parameters.variable_group_name }} steps: # Checkout code @@ -60,14 +48,14 @@ jobs: continueOnError: false inputs: deploymentScope: "Resource Group" - azureResourceManagerConnection: ${{ parameters.azure_resource_manager_connection_name }} - subscriptionId: ${{ parameters.azure_subscription_id }} + azureResourceManagerConnection: $(AZURE_RESOURCE_MANAGER_CONNECTION_NAME) + subscriptionId: $(AZURE_SUBSCRIPTION_ID) action: "Create Or Update Resource Group" - resourceGroupName: ${{ parameters.azure_resource_group_name }} - location: ${{ parameters.azure_location_name }} + resourceGroupName: $(AZURE_RESOURCE_GROUP_NAME) + location: $(AZURE_LOCATION) templateLocation: "Linked artifact" csmFile: "$(System.DefaultWorkingDirectory)/infra/main.json" - csmParametersFile: "$(System.DefaultWorkingDirectory)/infra/params.${{ parameters.environment }}.json" + csmParametersFile: "$(System.DefaultWorkingDirectory)/infra/params.${{ parameters.environment_name }}.json" deploymentMode: "Validation" overrideParameters: > -administratorPassword "$(password)" @@ -79,19 +67,19 @@ jobs: enabled: true continueOnError: false inputs: - azureSubscription: ${{ parameters.azure_resource_manager_connection_name }} + azureSubscription: $(AZURE_RESOURCE_MANAGER_CONNECTION_NAME) scriptType: pscore scriptLocation: inlineScript inlineScript: | az account set ` - --subscription ${{ parameters.azure_subscription_id }} + --subscription $(AZURE_SUBSCRIPTION_ID) az deployment group what-if ` - --resource-group ${{ parameters.azure_resource_group_name }} ` + --resource-group $(AZURE_RESOURCE_GROUP_NAME) ` --exclude-change-types Ignore NoChange Unsupported ` --mode "Incremental" ` --template-file "$(System.DefaultWorkingDirectory)/infra/main.json" ` - --parameters "$(System.DefaultWorkingDirectory)/infra/params.${{ parameters.environment }}.json" administratorPassword="$(password)" ` + --parameters "$(System.DefaultWorkingDirectory)/infra/params.${{ parameters.environment_name }}.json" administratorPassword="$(password)" ` --result-format "FullResourcePayloads" powerShellErrorActionPreference: "stop" diff --git a/.github/workflows/templates/validation.yml b/.github/workflows/templates/validation.yml index 8f19e8b..ade75f2 100644 --- a/.github/workflows/templates/validation.yml +++ b/.github/workflows/templates/validation.yml @@ -24,7 +24,7 @@ on: jobs: validation: - name: Validation in ${{ inputs.environment }} + name: Validation of ${{ inputs.environment }} runs-on: ubuntu-latest continue-on-error: false environment: ${{ inputs.environment }} From 2278a15471808c0a2451c43fb6cf5c76ec2c4b30 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Mon, 20 Dec 2021 12:15:38 +0100 Subject: [PATCH 25/30] updated trigger --- .ado/workflows/dataProductDeploymentTestProd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ado/workflows/dataProductDeploymentTestProd.yml b/.ado/workflows/dataProductDeploymentTestProd.yml index c8a71e8..9b5b3f8 100644 --- a/.ado/workflows/dataProductDeploymentTestProd.yml +++ b/.ado/workflows/dataProductDeploymentTestProd.yml @@ -7,7 +7,7 @@ trigger: - releases/* tags: include: - - '*' + - v* paths: include: - code/* From 9f58d02c78e19d80eae819acf21b07ebb903c47a Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Fri, 4 Mar 2022 18:22:02 +0100 Subject: [PATCH 26/30] updated workflows --- .github/workflows/dataProductDeploymentDev.yml | 4 ++-- .github/workflows/dataProductDeploymentTestProd.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index 78043de..574f299 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -19,7 +19,7 @@ env: jobs: validation_dev: - uses: ${{ github.repository }}/.github/workflows/templates/validation.yml@${{github.sha}} + uses: ./.github/workflows/templates/validation.yml name: "Validation of IaC templates - Dev" with: environment: ${{ env.DEV_ENVIRONMENT_NAME }} @@ -30,7 +30,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_dev: - uses: ${{ github.repository }}/.github/workflows/templates/deployment.yml@${{github.sha}} + uses: ./.github/workflows/templates/deployment.yml name: "Deployment of IaC templates - Dev" needs: [ validation_dev ] if: github.event_name == 'push' diff --git a/.github/workflows/dataProductDeploymentTestProd.yml b/.github/workflows/dataProductDeploymentTestProd.yml index 5a4e4be..ded2579 100644 --- a/.github/workflows/dataProductDeploymentTestProd.yml +++ b/.github/workflows/dataProductDeploymentTestProd.yml @@ -18,7 +18,7 @@ env: jobs: validation_test: - uses: "${{ github.repository }}/.github/workflows/templates/validation.yml@${{ github.ref_name }}" + uses: ./.github/workflows/templates/validation.yml name: "Validation of IaC templates - Test" with: environment: ${{ env.TEST_ENVIRONMENT_NAME }} @@ -29,7 +29,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} validation_prod: - uses: "${{ github.repository }}/.github/workflows/templates/validation.yml@${{ github.ref_name }}" + uses: ./.github/workflows/templates/validation.yml name: "Validation of IaC templates - Prod" needs: [ validation_test ] with: @@ -41,7 +41,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_test: - uses: "${{ github.repository }}/.github/workflows/templates/deployment.yml@${{ github.ref_name }}" + uses: ./.github/workflows/templates/deployment.yml name: "Deployment of IaC templates - Test" needs: [ validation_prod ] if: github.event_name == 'release' @@ -54,7 +54,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_prod: - uses: "${{ github.repository }}/.github/workflows/templates/deployment.yml@${{ github.ref_name }}" + uses: ./.github/workflows/templates/deployment.yml name: "Deployment of IaC templates - Prod" needs: [ deployment_test ] if: github.event_name == 'release' From d7f6ce375d9fcf546181e0119a0fff07babd99fa Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Fri, 4 Mar 2022 18:24:49 +0100 Subject: [PATCH 27/30] updated workflows --- .github/workflows/dataProductDeploymentDev.yml | 4 ++-- .github/workflows/dataProductDeploymentTestProd.yml | 8 ++++---- .github/workflows/{templates => }/deployment.yml | 0 .github/workflows/{templates => }/validation.yml | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename .github/workflows/{templates => }/deployment.yml (100%) rename .github/workflows/{templates => }/validation.yml (100%) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index 574f299..faa87ac 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -19,7 +19,7 @@ env: jobs: validation_dev: - uses: ./.github/workflows/templates/validation.yml + uses: ./.github/workflows/validation.yml name: "Validation of IaC templates - Dev" with: environment: ${{ env.DEV_ENVIRONMENT_NAME }} @@ -30,7 +30,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_dev: - uses: ./.github/workflows/templates/deployment.yml + uses: ./.github/workflows/deployment.yml name: "Deployment of IaC templates - Dev" needs: [ validation_dev ] if: github.event_name == 'push' diff --git a/.github/workflows/dataProductDeploymentTestProd.yml b/.github/workflows/dataProductDeploymentTestProd.yml index ded2579..2fdf565 100644 --- a/.github/workflows/dataProductDeploymentTestProd.yml +++ b/.github/workflows/dataProductDeploymentTestProd.yml @@ -18,7 +18,7 @@ env: jobs: validation_test: - uses: ./.github/workflows/templates/validation.yml + uses: ./.github/workflows/validation.yml name: "Validation of IaC templates - Test" with: environment: ${{ env.TEST_ENVIRONMENT_NAME }} @@ -29,7 +29,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} validation_prod: - uses: ./.github/workflows/templates/validation.yml + uses: ./.github/workflows/validation.yml name: "Validation of IaC templates - Prod" needs: [ validation_test ] with: @@ -41,7 +41,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_test: - uses: ./.github/workflows/templates/deployment.yml + uses: ./.github/workflows/deployment.yml name: "Deployment of IaC templates - Test" needs: [ validation_prod ] if: github.event_name == 'release' @@ -54,7 +54,7 @@ jobs: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} deployment_prod: - uses: ./.github/workflows/templates/deployment.yml + uses: ./.github/workflows/deployment.yml name: "Deployment of IaC templates - Prod" needs: [ deployment_test ] if: github.event_name == 'release' diff --git a/.github/workflows/templates/deployment.yml b/.github/workflows/deployment.yml similarity index 100% rename from .github/workflows/templates/deployment.yml rename to .github/workflows/deployment.yml diff --git a/.github/workflows/templates/validation.yml b/.github/workflows/validation.yml similarity index 100% rename from .github/workflows/templates/validation.yml rename to .github/workflows/validation.yml From e467a9fa83bc3661f4432db5997a9e6bbe3baeb8 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Fri, 4 Mar 2022 18:32:41 +0100 Subject: [PATCH 28/30] test --- .github/workflows/dataProductDeploymentDev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dataProductDeploymentDev.yml b/.github/workflows/dataProductDeploymentDev.yml index faa87ac..e5eb092 100644 --- a/.github/workflows/dataProductDeploymentDev.yml +++ b/.github/workflows/dataProductDeploymentDev.yml @@ -22,7 +22,7 @@ jobs: uses: ./.github/workflows/validation.yml name: "Validation of IaC templates - Dev" with: - environment: ${{ env.DEV_ENVIRONMENT_NAME }} + environment: "dev" secrets: azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} azure_resource_group_name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} @@ -35,7 +35,7 @@ jobs: needs: [ validation_dev ] if: github.event_name == 'push' with: - environment: ${{ env.DEV_ENVIRONMENT_NAME }} + environment: "dev" secrets: azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} azure_resource_group_name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} From 61ce92f02deb1043d792ca76df5186749d305898 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Fri, 4 Mar 2022 18:35:16 +0100 Subject: [PATCH 29/30] updated wf --- .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 2 +- .github/workflows/dataProductDeploymentTestProd.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index 8dc6608..f4d6afb 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -39,7 +39,7 @@ body: label: Error Message description: If possible, please share the error message that you received. placeholder: Error Messages - render: json + render: JSON validations: required: false diff --git a/.github/workflows/dataProductDeploymentTestProd.yml b/.github/workflows/dataProductDeploymentTestProd.yml index 2fdf565..c00a637 100644 --- a/.github/workflows/dataProductDeploymentTestProd.yml +++ b/.github/workflows/dataProductDeploymentTestProd.yml @@ -21,7 +21,7 @@ jobs: uses: ./.github/workflows/validation.yml name: "Validation of IaC templates - Test" with: - environment: ${{ env.TEST_ENVIRONMENT_NAME }} + environment: "test" secrets: azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} azure_resource_group_name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} @@ -33,7 +33,7 @@ jobs: name: "Validation of IaC templates - Prod" needs: [ validation_test ] with: - environment: ${{ env.PROD_ENVIRONMENT_NAME }} + environment: "prod" secrets: azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} azure_resource_group_name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} @@ -46,7 +46,7 @@ jobs: needs: [ validation_prod ] if: github.event_name == 'release' with: - environment: ${{ env.TEST_ENVIRONMENT_NAME }} + environment: "test" secrets: azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} azure_resource_group_name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} @@ -59,7 +59,7 @@ jobs: needs: [ deployment_test ] if: github.event_name == 'release' with: - environment: ${{ env.PROD_ENVIRONMENT_NAME }} + environment: "prod" secrets: azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} azure_resource_group_name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} From 163988681f4a17aa40dd5a3210ac2c12547ad47f Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Fri, 4 Mar 2022 18:42:00 +0100 Subject: [PATCH 30/30] update linting --- .github/workflows/lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8013b0c..b5169da 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -33,4 +33,5 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VALIDATE_JSCPD: false VALIDATE_JSON: false + VALIDATE_GITHUB_ACTIONS: false FILTER_REGEX_EXCLUDE: (/.devcontainer/|/reference/)