diff --git a/.github/actions/templates/validateModuleApis/action.yml b/.github/actions/templates/validateModuleApis/action.yml deleted file mode 100644 index 2b4c6d35d7..0000000000 --- a/.github/actions/templates/validateModuleApis/action.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: 'Execute general module API tests' -description: 'Execute general module API tests (if any)' - -inputs: - modulePath: - description: 'The path to the module folder' - required: true - -runs: - using: 'composite' - steps: - - name: 'Setup agent' - shell: pwsh - run: | - # Load used functions - . (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'sharedScripts' 'Set-EnvironmentOnAgent.ps1') - # Set agent up - Set-EnvironmentOnAgent - - - name: Azure Login - uses: Azure/login@v1 - with: - creds: ${{ env.AZURE_CREDENTIALS }} - enable-AzPSSession: true - - # [Module Pester Test] task(s) - #----------------------------- - - name: 'Run API tests via (Pester)' - shell: pwsh - run: | - # --------------------- # - # INVOKE PESTER TEST(S) # - # --------------------- # - Invoke-Pester -Configuration @{ - Run = @{ - Container = New-PesterContainer -Path 'arm/.global/global.module.tests.ps1' -Data @{ - moduleFolderPaths = Join-Path $env:GITHUB_WORKSPACE "${{ inputs.modulePath }}" - } - } - Filter = @{ - Tag = 'ApiCheck' - } - TestResult = @{ - TestSuiteName = 'Global Module API Tests' - OutputPath = 'arm/.global/api-testResults.xml' - OutputFormat = 'JUnitXml' - Enabled = $true - } - Output = @{ - Verbosity = 'Detailed' - } - } - - - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v1 - # if: always() - with: - files: arm/.global/api-testResults.xml diff --git a/.github/actions/templates/validateModuleDeploy/action.yml b/.github/actions/templates/validateModuleDeploy/action.yml deleted file mode 100644 index 7950278eca..0000000000 --- a/.github/actions/templates/validateModuleDeploy/action.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: 'Validate module' -description: 'Validate module' - -inputs: - templateFilePath: - description: 'The path to the template file to use for testing & deployment' - required: true - parameterFilePath: - description: 'The path to the parameter file to use for testing & deployment' - required: true - location: - description: 'The location to use for deployment' - required: true - resourceGroupName: - description: 'The resource group to deploy to' - required: false - subscriptionId: - description: 'The subscriptionId to deploy to' - required: false - managementGroupId: - description: 'The managementGroupId to deploy to' - required: false - -runs: - using: 'composite' - steps: - - name: 'Setup agent' - shell: pwsh - run: | - # Load used functions - . (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'sharedScripts' 'Set-EnvironmentOnAgent.ps1') - - # Set agent up - Set-EnvironmentOnAgent - - - name: Azure Login - uses: Azure/login@v1 - with: - creds: ${{ env.AZURE_CREDENTIALS }} - enable-AzPSSession: true - - - name: 'Replace Parameter File Tokens [${{ inputs.parameterFilePath }}] ' - shell: pwsh - run: | - # Load used functions - . (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'tokensReplacement' 'Convert-TokensInParameterFile.ps1') - - # Load Settings File - $Settings = Get-Content -Path "settings.json" | ConvertFrom-Json - # Initialize Default Parameter File Tokens - $DefaultParameterFileTokens = @( - @{ Name = 'resourceGroupName'; Value = '${{ inputs.resourceGroupName }}' } - @{ Name = 'subscriptionId'; Value = '${{ inputs.subscriptionId }}' } - @{ Name = 'managementGroupId'; Value = '${{ inputs.managementGroupId }}' } - @{ Name = "tenantId"; Value = '${{ env.ARM_TENANT_ID }}' } - @{ Name = "deploymentSpId"; Value = '${{ env.DEPLOYMENT_SP_ID }}' } - ) | ForEach-Object { [PSCustomObject]$PSItem } - - # Construct Token Function Input - $ConvertTokensInputs = @{ - ParameterFilePath = '${{ inputs.parameterFilePath }}' - DefaultParameterFileTokens = $DefaultParameterFileTokens - LocalCustomParameterFileTokens = $Settings.parameterFileTokens.localTokens.tokens - TokenPrefix = $Settings.parameterFileTokens.tokenPrefix - TokenSuffix = $Settings.parameterFileTokens.tokenSuffix - } - # Invoke Token Replacement Functionality - $null = Convert-TokensInParameterFile @ConvertTokensInputs -Verbose - # [Test Deployment] task(s) - #-------------------------- - - name: 'Validate [${{ inputs.templateFilePath }}]' - shell: pwsh - run: | - # Load used functions - . (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'resourceValidation' 'Test-TemplateWithParameterFile.ps1') - - # ----------- # - # INVOKE TEST # - # ----------- # - $functionInput = @{ - templateFilePath = '${{ inputs.templateFilePath }}' - parameterFilePath = '${{ inputs.parameterFilePath }}' - location = '${{ inputs.location }}' - resourceGroupName = '${{ inputs.resourceGroupName }}' - subscriptionId = '${{ inputs.subscriptionId }}' - managementGroupId = '${{ inputs.managementGroupId }}' - } - - Write-Verbose "Invoke task with" -Verbose - Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose - - Test-TemplateWithParameterFile @functionInput -Verbose diff --git a/.github/actions/templates/deployModule/action.yml b/.github/actions/templates/validateModuleDeployment/action.yml similarity index 67% rename from .github/actions/templates/deployModule/action.yml rename to .github/actions/templates/validateModuleDeployment/action.yml index 0ae0391798..d781fe54f7 100644 --- a/.github/actions/templates/deployModule/action.yml +++ b/.github/actions/templates/validateModuleDeployment/action.yml @@ -28,6 +28,8 @@ inputs: runs: using: 'composite' steps: + # [Setup] task(s) + # ---------------- - name: 'Setup agent' shell: pwsh run: | @@ -36,13 +38,14 @@ runs: # Set agent up Set-EnvironmentOnAgent - - name: Azure Login uses: Azure/login@v1 with: creds: ${{ env.AZURE_CREDENTIALS }} enable-AzPSSession: true + # [Token replacement] task(s) + # --------------------------- - name: 'Replace Parameter File Tokens [${{ inputs.parameterFilePath }}] ' shell: pwsh run: | @@ -58,7 +61,9 @@ runs: @{ Name = 'managementGroupId'; Value = '${{ inputs.managementGroupId }}' } @{ Name = "tenantId"; Value = '${{ env.ARM_TENANT_ID }}' } @{ Name = "deploymentSpId"; Value = '${{ env.DEPLOYMENT_SP_ID }}' } - ) | ForEach-Object { [PSCustomObject]$PSItem } + ) + + $DefaultParameterFileTokens = $DefaultParameterFileTokens | ForEach-Object { [PSCustomObject]$PSItem } # Construct Token Function Input $ConvertTokensInputs = @{ @@ -71,6 +76,33 @@ runs: # Invoke Token Replacement Functionality $null = Convert-TokensInParameterFile @ConvertTokensInputs -Verbose + # [Deployment validation] task(s) + # ------------------------- + - name: 'Validate [${{ inputs.templateFilePath }}]' + shell: pwsh + run: | + # Load used functions + . (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'resourceValidation' 'Test-TemplateWithParameterFile.ps1') + + # ----------- # + # INVOKE TEST # + # ----------- # + $functionInput = @{ + templateFilePath = '${{ inputs.templateFilePath }}' + parameterFilePath = '${{ inputs.parameterFilePath }}' + location = '${{ inputs.location }}' + resourceGroupName = '${{ inputs.resourceGroupName }}' + subscriptionId = '${{ inputs.subscriptionId }}' + managementGroupId = '${{ inputs.managementGroupId }}' + } + + Write-Verbose "Invoke task with" -Verbose + Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose + + Test-TemplateWithParameterFile @functionInput -Verbose + + # [Deployment execution] task(s) + # -------------------- - name: 'Deploy [${{ inputs.templateFilePath }}] with parameters [${{ inputs.parameterFilePath }}]' shell: pwsh id: deploy_step @@ -95,37 +127,39 @@ runs: $res = New-ModuleDeployment @functionInput -Verbose # Get deployment name - if($res -is [hashtable]) { - $deploymentName = $res['DeploymentName'] - } elseif($res -is [string]) { - $deploymentName = $res - } else { - throw ("Output-Type of New-ModuleDeployment invocation has invalid type [{0}]" -f $res.GetType()) + Write-Output ('::set-output name={0}::{1}' -f 'deploymentName', $res.deploymentName) + + # Populate further outputs + foreach ($outputKey in $res.deploymentOutput.Keys) { + Write-Output ('::set-output name={0}::{1}' -f $outputKey, $res.deploymentOutput[$outputKey].Value) } - Write-Output ('::set-output name=deploymentName::{0}' -f $deploymentName) - if($res -is [hashtable]) { + if ($res.ContainsKey('exception')) { # Happens only if there is an exception - throw $res['Exception'] + throw $res.exception } + # [Deployment removal] task(s) + # ----------------- - name: 'Remove [${{ inputs.templateFilePath }}] from parameters [${{ inputs.parameterFilePath }}]' shell: pwsh - if: always() + if: ${{ always() && steps.deploy_step.outputs.deploymentName != '' }} run: | if('${{ inputs.removeDeployment }}' -eq 'true') { # Load used function . (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'resourceRemoval' 'Remove-DeployedModule.ps1') - $functionInput = @{ + if(-not [String]::IsNullOrEmpty('${{ steps.deploy_step.outputs.deploymentName }}')) { + $functionInput = @{ deploymentName = '${{ steps.deploy_step.outputs.deploymentName }}' templateFilePath = Join-Path $env:GITHUB_WORKSPACE '${{ inputs.templateFilePath }}' resourceGroupName = '${{ inputs.resourceGroupName }}' verbose = $true - } + } - Write-Verbose 'Invoke task with' -Verbose - Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose + Write-Verbose 'Invoke task with' -Verbose + Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose - Remove-DeployedModule @functionInput + Remove-DeployedModule @functionInput + } } diff --git a/.github/actions/templates/validateModuleGeneral/action.yml b/.github/actions/templates/validateModulePester/action.yml similarity index 56% rename from .github/actions/templates/validateModuleGeneral/action.yml rename to .github/actions/templates/validateModulePester/action.yml index a8b472babc..9c22549ecf 100644 --- a/.github/actions/templates/validateModuleGeneral/action.yml +++ b/.github/actions/templates/validateModulePester/action.yml @@ -1,5 +1,5 @@ -name: 'Execute general module tests' -description: 'Execute general module tests (if any)' +name: 'Execute Pester module tests' +description: 'Execute Pester module tests (if any)' inputs: modulePath: @@ -27,7 +27,7 @@ runs: # [Module Pester Test] task(s) #----------------------------- - - name: 'Run tests via (Pester)' + - name: 'Run global tests via Pester' shell: pwsh run: | # --------------------- # @@ -55,6 +55,40 @@ runs: - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v1 - # if: always() + if: always() with: files: arm/.global/global-testResults.xml + + # [Module Pester Test] task(s) + #----------------------------- + - name: 'Run API tests via Pester' + shell: pwsh + run: | + # --------------------- # + # Invoke Pester test(s) # + # --------------------- # + Invoke-Pester -Configuration @{ + Run = @{ + Container = New-PesterContainer -Path 'arm/.global/global.module.tests.ps1' -Data @{ + moduleFolderPaths = Join-Path $env:GITHUB_WORKSPACE "${{ inputs.modulePath }}" + } + } + Filter = @{ + Tag = 'ApiCheck' + } + TestResult = @{ + TestSuiteName = 'Global Module API Tests' + OutputPath = 'arm/.global/api-testResults.xml' + OutputFormat = 'JUnitXml' + Enabled = $true + } + Output = @{ + Verbosity = 'Detailed' + } + } + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v1 + if: always() + with: + files: arm/.global/api-testResults.xml diff --git a/.github/workflows/ms.analysisservices.servers.yml b/.github/workflows/ms.analysisservices.servers.yml index a0b3e71f09..a6c8b0f258 100644 --- a/.github/workflows/ms.analysisservices.servers.yml +++ b/.github/workflows/ms.analysisservices.servers.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.apimanagement.service.yml b/.github/workflows/ms.apimanagement.service.yml index 6366bc82a2..d1abcfebac 100644 --- a/.github/workflows/ms.apimanagement.service.yml +++ b/.github/workflows/ms.apimanagement.service.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.authorization.policyassignments.yml b/.github/workflows/ms.authorization.policyassignments.yml index 07b6d86087..0afb027b87 100644 --- a/.github/workflows/ms.authorization.policyassignments.yml +++ b/.github/workflows/ms.authorization.policyassignments.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -118,24 +100,11 @@ jobs: with: # Name of variable file variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/.bicep/nested_policyAssignments_sub.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' # ------------------- # ## Deploy & Remove ## # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/.bicep/nested_policyAssignments_sub.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +132,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.authorization.policydefinitions.yml b/.github/workflows/ms.authorization.policydefinitions.yml index 4a20a57746..3a19c9ed6a 100644 --- a/.github/workflows/ms.authorization.policydefinitions.yml +++ b/.github/workflows/ms.authorization.policydefinitions.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -118,24 +100,11 @@ jobs: with: # Name of variable file variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/.bicep/nested_policyDefinitions_sub.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' # ------------------- # ## Deploy & Remove ## # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/.bicep/nested_policyDefinitions_sub.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +132,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.authorization.policyexemptions.yml b/.github/workflows/ms.authorization.policyexemptions.yml index 8c1627c9cc..ea118c889f 100644 --- a/.github/workflows/ms.authorization.policyexemptions.yml +++ b/.github/workflows/ms.authorization.policyexemptions.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -118,24 +100,11 @@ jobs: with: # Name of variable file variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/.bicep/nested_policyExemptions_sub.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' # ------------------- # ## Deploy & Remove ## # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/.bicep/nested_policyExemptions_sub.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +132,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.authorization.policysetdefinitions.yml b/.github/workflows/ms.authorization.policysetdefinitions.yml index 6b4e2787be..ddf36c5fab 100644 --- a/.github/workflows/ms.authorization.policysetdefinitions.yml +++ b/.github/workflows/ms.authorization.policysetdefinitions.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -118,24 +100,11 @@ jobs: with: # Name of variable file variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/.bicep/nested_policySetDefinition_sub.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' # ------------------- # ## Deploy & Remove ## # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/.bicep/nested_policySetDefinition_sub.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +132,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.authorization.roleassignments.yml b/.github/workflows/ms.authorization.roleassignments.yml index 518eb5111b..034296674d 100644 --- a/.github/workflows/ms.authorization.roleassignments.yml +++ b/.github/workflows/ms.authorization.roleassignments.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -118,24 +100,11 @@ jobs: with: # Name of variable file variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/.bicep/nested_rbac_sub.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' # ------------------- # ## Deploy & Remove ## # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/.bicep/nested_rbac_sub.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +132,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.authorization.roledefinitions.yml b/.github/workflows/ms.authorization.roledefinitions.yml index 56ea61d19d..56d12a5c6f 100644 --- a/.github/workflows/ms.authorization.roledefinitions.yml +++ b/.github/workflows/ms.authorization.roledefinitions.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -118,24 +100,11 @@ jobs: with: # Name of variable file variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/.bicep/nested_roleDefinitions_sub.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' # ------------------- # ## Deploy & Remove ## # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/.bicep/nested_roleDefinitions_sub.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +132,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.automanage.accounts.yml b/.github/workflows/ms.automanage.accounts.yml index 95654ea582..2a41f0e4cc 100644 --- a/.github/workflows/ms.automanage.accounts.yml +++ b/.github/workflows/ms.automanage.accounts.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.automation.automationaccounts.yml b/.github/workflows/ms.automation.automationaccounts.yml index 85345f9e46..2483bf3963 100644 --- a/.github/workflows/ms.automation.automationaccounts.yml +++ b/.github/workflows/ms.automation.automationaccounts.yml @@ -62,49 +62,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -117,26 +99,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -164,8 +129,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.batch.batchaccounts.yml b/.github/workflows/ms.batch.batchaccounts.yml index f357edffc4..fd2c03a60d 100644 --- a/.github/workflows/ms.batch.batchaccounts.yml +++ b/.github/workflows/ms.batch.batchaccounts.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.cognitiveservices.accounts.yml b/.github/workflows/ms.cognitiveservices.accounts.yml index d7c5b77ea5..2ba9d0c6e5 100644 --- a/.github/workflows/ms.cognitiveservices.accounts.yml +++ b/.github/workflows/ms.cognitiveservices.accounts.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.compute.availabilitysets.yml b/.github/workflows/ms.compute.availabilitysets.yml index 6f5c679882..ad14b7ddf0 100644 --- a/.github/workflows/ms.compute.availabilitysets.yml +++ b/.github/workflows/ms.compute.availabilitysets.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.compute.diskencryptionsets.yml b/.github/workflows/ms.compute.diskencryptionsets.yml index 63f77969e3..9ea418bfeb 100644 --- a/.github/workflows/ms.compute.diskencryptionsets.yml +++ b/.github/workflows/ms.compute.diskencryptionsets.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.compute.galleries.yml b/.github/workflows/ms.compute.galleries.yml index fe18f38eb2..d8edda51fa 100644 --- a/.github/workflows/ms.compute.galleries.yml +++ b/.github/workflows/ms.compute.galleries.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.compute.images.yml b/.github/workflows/ms.compute.images.yml index d0cfb57c88..18b0dcec26 100644 --- a/.github/workflows/ms.compute.images.yml +++ b/.github/workflows/ms.compute.images.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.compute.proximityplacementgroups.yml b/.github/workflows/ms.compute.proximityplacementgroups.yml index e4bf3eea31..e7275bc0e5 100644 --- a/.github/workflows/ms.compute.proximityplacementgroups.yml +++ b/.github/workflows/ms.compute.proximityplacementgroups.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.compute.virtualmachines.yml b/.github/workflows/ms.compute.virtualmachines.yml index 76b317fdc9..f8be1a17d4 100644 --- a/.github/workflows/ms.compute.virtualmachines.yml +++ b/.github/workflows/ms.compute.virtualmachines.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -122,26 +104,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -169,8 +134,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.compute.virtualmachinescalesets.yml b/.github/workflows/ms.compute.virtualmachinescalesets.yml index 52be9e49bd..43e0b9e85e 100644 --- a/.github/workflows/ms.compute.virtualmachinescalesets.yml +++ b/.github/workflows/ms.compute.virtualmachinescalesets.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -122,26 +104,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -169,8 +134,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.consumption.budgets.yml b/.github/workflows/ms.consumption.budgets.yml index f433cabf8f..ed9e571aaa 100644 --- a/.github/workflows/ms.consumption.budgets.yml +++ b/.github/workflows/ms.consumption.budgets.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.containerinstance.containergroups.yml b/.github/workflows/ms.containerinstance.containergroups.yml index d2de128599..14da4abffe 100644 --- a/.github/workflows/ms.containerinstance.containergroups.yml +++ b/.github/workflows/ms.containerinstance.containergroups.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.containerregistry.registries.yml b/.github/workflows/ms.containerregistry.registries.yml index 4d4687ce7e..2812f6f246 100644 --- a/.github/workflows/ms.containerregistry.registries.yml +++ b/.github/workflows/ms.containerregistry.registries.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.containerservice.managedclusters.yml b/.github/workflows/ms.containerservice.managedclusters.yml index 828052a643..3a66d2465a 100644 --- a/.github/workflows/ms.containerservice.managedclusters.yml +++ b/.github/workflows/ms.containerservice.managedclusters.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.databricks.workspaces.yml b/.github/workflows/ms.databricks.workspaces.yml index 80af2c0202..d232020142 100644 --- a/.github/workflows/ms.databricks.workspaces.yml +++ b/.github/workflows/ms.databricks.workspaces.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.datafactory.factories.yml b/.github/workflows/ms.datafactory.factories.yml index 3348954a7d..51ff36c627 100644 --- a/.github/workflows/ms.datafactory.factories.yml +++ b/.github/workflows/ms.datafactory.factories.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.desktopvirtualization.applicationgroups.yml b/.github/workflows/ms.desktopvirtualization.applicationgroups.yml index 145c485070..a9dd86c433 100644 --- a/.github/workflows/ms.desktopvirtualization.applicationgroups.yml +++ b/.github/workflows/ms.desktopvirtualization.applicationgroups.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.desktopvirtualization.hostpools.yml b/.github/workflows/ms.desktopvirtualization.hostpools.yml index 26be5d578e..b8b710e2cf 100644 --- a/.github/workflows/ms.desktopvirtualization.hostpools.yml +++ b/.github/workflows/ms.desktopvirtualization.hostpools.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.desktopvirtualization.workspaces.yml b/.github/workflows/ms.desktopvirtualization.workspaces.yml index bf77c58701..d9b6669ac3 100644 --- a/.github/workflows/ms.desktopvirtualization.workspaces.yml +++ b/.github/workflows/ms.desktopvirtualization.workspaces.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.documentdb.databaseaccounts.yml b/.github/workflows/ms.documentdb.databaseaccounts.yml index 4012687b69..4a833a338e 100644 --- a/.github/workflows/ms.documentdb.databaseaccounts.yml +++ b/.github/workflows/ms.documentdb.databaseaccounts.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -121,26 +103,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -168,8 +133,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.eventgrid.topics.yml b/.github/workflows/ms.eventgrid.topics.yml index 07640ccba7..7d406814b5 100644 --- a/.github/workflows/ms.eventgrid.topics.yml +++ b/.github/workflows/ms.eventgrid.topics.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.eventhub.namespaces.yml b/.github/workflows/ms.eventhub.namespaces.yml index d6d1ed36c5..5a13becf09 100644 --- a/.github/workflows/ms.eventhub.namespaces.yml +++ b/.github/workflows/ms.eventhub.namespaces.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.healthbot.healthbots.yml b/.github/workflows/ms.healthbot.healthbots.yml index 3028267f10..37ca3007ab 100644 --- a/.github/workflows/ms.healthbot.healthbots.yml +++ b/.github/workflows/ms.healthbot.healthbots.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.insights.actiongroups.yml b/.github/workflows/ms.insights.actiongroups.yml index 588872b770..9be7da63bd 100644 --- a/.github/workflows/ms.insights.actiongroups.yml +++ b/.github/workflows/ms.insights.actiongroups.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.insights.activitylogalerts.yml b/.github/workflows/ms.insights.activitylogalerts.yml index cf5b5ab9a5..c27d2ce165 100644 --- a/.github/workflows/ms.insights.activitylogalerts.yml +++ b/.github/workflows/ms.insights.activitylogalerts.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.insights.components.yml b/.github/workflows/ms.insights.components.yml index 364a53a8dc..7bebd0cd32 100644 --- a/.github/workflows/ms.insights.components.yml +++ b/.github/workflows/ms.insights.components.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.insights.diagnosticsettings.yml b/.github/workflows/ms.insights.diagnosticsettings.yml index d20c9870e8..b9c5dc8060 100644 --- a/.github/workflows/ms.insights.diagnosticsettings.yml +++ b/.github/workflows/ms.insights.diagnosticsettings.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.insights.metricalerts.yml b/.github/workflows/ms.insights.metricalerts.yml index 596f22e6f9..e9772d07cc 100644 --- a/.github/workflows/ms.insights.metricalerts.yml +++ b/.github/workflows/ms.insights.metricalerts.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.insights.privatelinkscopes.yml b/.github/workflows/ms.insights.privatelinkscopes.yml index 73e1fb01b3..e2d038b0b6 100644 --- a/.github/workflows/ms.insights.privatelinkscopes.yml +++ b/.github/workflows/ms.insights.privatelinkscopes.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.insights.scheduledqueryrules.yml b/.github/workflows/ms.insights.scheduledqueryrules.yml index 423ce053e3..bb42f44224 100644 --- a/.github/workflows/ms.insights.scheduledqueryrules.yml +++ b/.github/workflows/ms.insights.scheduledqueryrules.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.keyvault.vaults.yml b/.github/workflows/ms.keyvault.vaults.yml index 6eb330bda5..1723b4a627 100644 --- a/.github/workflows/ms.keyvault.vaults.yml +++ b/.github/workflows/ms.keyvault.vaults.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.logic.workflows.yml b/.github/workflows/ms.logic.workflows.yml index 230eb92962..7999195489 100644 --- a/.github/workflows/ms.logic.workflows.yml +++ b/.github/workflows/ms.logic.workflows.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.machinelearningservices.workspaces.yml b/.github/workflows/ms.machinelearningservices.workspaces.yml index 9fec486c6d..fe4768b5d8 100644 --- a/.github/workflows/ms.machinelearningservices.workspaces.yml +++ b/.github/workflows/ms.machinelearningservices.workspaces.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.managedidentity.userassignedidentities.yml b/.github/workflows/ms.managedidentity.userassignedidentities.yml index 0a0b691a56..e81f783679 100644 --- a/.github/workflows/ms.managedidentity.userassignedidentities.yml +++ b/.github/workflows/ms.managedidentity.userassignedidentities.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.managedservices.registrationdefinitions.yml b/.github/workflows/ms.managedservices.registrationdefinitions.yml index b2e4057a4b..2060fb0d69 100644 --- a/.github/workflows/ms.managedservices.registrationdefinitions.yml +++ b/.github/workflows/ms.managedservices.registrationdefinitions.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.management.managementgroups.yml b/.github/workflows/ms.management.managementgroups.yml index 14976418b5..a72afb0b48 100644 --- a/.github/workflows/ms.management.managementgroups.yml +++ b/.github/workflows/ms.management.managementgroups.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.netapp.netappaccounts.yml b/.github/workflows/ms.netapp.netappaccounts.yml index a3b4858950..560d2cca6d 100644 --- a/.github/workflows/ms.netapp.netappaccounts.yml +++ b/.github/workflows/ms.netapp.netappaccounts.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -121,26 +103,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -168,8 +133,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.applicationgateways.yml b/.github/workflows/ms.network.applicationgateways.yml index 9f4fc4ac69..7ccc2461da 100644 --- a/.github/workflows/ms.network.applicationgateways.yml +++ b/.github/workflows/ms.network.applicationgateways.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.applicationsecuritygroups.yml b/.github/workflows/ms.network.applicationsecuritygroups.yml index 640e3b7b1c..d8cb4fecf3 100644 --- a/.github/workflows/ms.network.applicationsecuritygroups.yml +++ b/.github/workflows/ms.network.applicationsecuritygroups.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.azurefirewalls.yml b/.github/workflows/ms.network.azurefirewalls.yml index e87dc0d3af..c5850a18e8 100644 --- a/.github/workflows/ms.network.azurefirewalls.yml +++ b/.github/workflows/ms.network.azurefirewalls.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.bastionhosts.yml b/.github/workflows/ms.network.bastionhosts.yml index 985e8258df..bcca86cbb7 100644 --- a/.github/workflows/ms.network.bastionhosts.yml +++ b/.github/workflows/ms.network.bastionhosts.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.connections.yml b/.github/workflows/ms.network.connections.yml index e9996ea6f7..965fa14986 100644 --- a/.github/workflows/ms.network.connections.yml +++ b/.github/workflows/ms.network.connections.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.ddosprotectionplans.yml b/.github/workflows/ms.network.ddosprotectionplans.yml index b43388b89c..58c956c549 100644 --- a/.github/workflows/ms.network.ddosprotectionplans.yml +++ b/.github/workflows/ms.network.ddosprotectionplans.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.expressroutecircuits.yml b/.github/workflows/ms.network.expressroutecircuits.yml index 537586d11e..3830364ce6 100644 --- a/.github/workflows/ms.network.expressroutecircuits.yml +++ b/.github/workflows/ms.network.expressroutecircuits.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.firewallpolicies.yml b/.github/workflows/ms.network.firewallpolicies.yml index 424b2aec2d..e8f47e861c 100644 --- a/.github/workflows/ms.network.firewallpolicies.yml +++ b/.github/workflows/ms.network.firewallpolicies.yml @@ -94,9 +94,9 @@ jobs: with: modulePath: '${{ env.modulePath }}' - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 name: 'Run deployment validation module tests' diff --git a/.github/workflows/ms.network.ipgroups.yml b/.github/workflows/ms.network.ipgroups.yml index d4ee06ac2c..469e646410 100644 --- a/.github/workflows/ms.network.ipgroups.yml +++ b/.github/workflows/ms.network.ipgroups.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.loadbalancers.yml b/.github/workflows/ms.network.loadbalancers.yml index 820331315d..da6cf163e7 100644 --- a/.github/workflows/ms.network.loadbalancers.yml +++ b/.github/workflows/ms.network.loadbalancers.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.localnetworkgateways.yml b/.github/workflows/ms.network.localnetworkgateways.yml index 0344fce30e..bf266164b3 100644 --- a/.github/workflows/ms.network.localnetworkgateways.yml +++ b/.github/workflows/ms.network.localnetworkgateways.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.natgateways.yml b/.github/workflows/ms.network.natgateways.yml index b21e1f0be6..fefcfdedbe 100644 --- a/.github/workflows/ms.network.natgateways.yml +++ b/.github/workflows/ms.network.natgateways.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.networksecuritygroups.yml b/.github/workflows/ms.network.networksecuritygroups.yml index b69795137a..47168dbcda 100644 --- a/.github/workflows/ms.network.networksecuritygroups.yml +++ b/.github/workflows/ms.network.networksecuritygroups.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.networkwatchers.yml b/.github/workflows/ms.network.networkwatchers.yml index 3b9a31e93a..548ae584ac 100644 --- a/.github/workflows/ms.network.networkwatchers.yml +++ b/.github/workflows/ms.network.networkwatchers.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.privatednszones.yml b/.github/workflows/ms.network.privatednszones.yml index e98c77b347..a202a8d813 100644 --- a/.github/workflows/ms.network.privatednszones.yml +++ b/.github/workflows/ms.network.privatednszones.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.privateendpoints.yml b/.github/workflows/ms.network.privateendpoints.yml index a7477c6b2d..d1567e244b 100644 --- a/.github/workflows/ms.network.privateendpoints.yml +++ b/.github/workflows/ms.network.privateendpoints.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.publicipaddresses.yml b/.github/workflows/ms.network.publicipaddresses.yml index 7b1a151d9c..1c40000b79 100644 --- a/.github/workflows/ms.network.publicipaddresses.yml +++ b/.github/workflows/ms.network.publicipaddresses.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.publicipprefixes.yml b/.github/workflows/ms.network.publicipprefixes.yml index 978eeef4dc..7d13050617 100644 --- a/.github/workflows/ms.network.publicipprefixes.yml +++ b/.github/workflows/ms.network.publicipprefixes.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.routetables.yml b/.github/workflows/ms.network.routetables.yml index 6999aa2ebc..3592198ec1 100644 --- a/.github/workflows/ms.network.routetables.yml +++ b/.github/workflows/ms.network.routetables.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.trafficmanagerprofiles.yml b/.github/workflows/ms.network.trafficmanagerprofiles.yml index c22dadc7d1..949baec878 100644 --- a/.github/workflows/ms.network.trafficmanagerprofiles.yml +++ b/.github/workflows/ms.network.trafficmanagerprofiles.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.virtualnetworkgateways.yml b/.github/workflows/ms.network.virtualnetworkgateways.yml index ad29cf823c..a90544899c 100644 --- a/.github/workflows/ms.network.virtualnetworkgateways.yml +++ b/.github/workflows/ms.network.virtualnetworkgateways.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -117,26 +99,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -164,8 +129,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.virtualnetworks.yml b/.github/workflows/ms.network.virtualnetworks.yml index 303781bb26..9959ba4c63 100644 --- a/.github/workflows/ms.network.virtualnetworks.yml +++ b/.github/workflows/ms.network.virtualnetworks.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.virtualwans.yml b/.github/workflows/ms.network.virtualwans.yml index 4b04e9fb36..2bc2dd852b 100644 --- a/.github/workflows/ms.network.virtualwans.yml +++ b/.github/workflows/ms.network.virtualwans.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.operationalinsights.workspaces.yml b/.github/workflows/ms.operationalinsights.workspaces.yml index b9bd03ab4a..bf71cab557 100644 --- a/.github/workflows/ms.operationalinsights.workspaces.yml +++ b/.github/workflows/ms.operationalinsights.workspaces.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.recoveryservices.vaults.yml b/.github/workflows/ms.recoveryservices.vaults.yml index 44343c4f90..c73e2a4944 100644 --- a/.github/workflows/ms.recoveryservices.vaults.yml +++ b/.github/workflows/ms.recoveryservices.vaults.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.resources.deploymentscripts.yml b/.github/workflows/ms.resources.deploymentscripts.yml index 576f84cc05..aa59f20c63 100644 --- a/.github/workflows/ms.resources.deploymentscripts.yml +++ b/.github/workflows/ms.resources.deploymentscripts.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.resources.resourcegroups.yml b/.github/workflows/ms.resources.resourcegroups.yml index d26577eb35..fb0879d596 100644 --- a/.github/workflows/ms.resources.resourcegroups.yml +++ b/.github/workflows/ms.resources.resourcegroups.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.security.azuresecuritycenter.yml b/.github/workflows/ms.security.azuresecuritycenter.yml index a6f89bbcbc..6aa6e3c49f 100644 --- a/.github/workflows/ms.security.azuresecuritycenter.yml +++ b/.github/workflows/ms.security.azuresecuritycenter.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.servicebus.namespaces.yml b/.github/workflows/ms.servicebus.namespaces.yml index d0f2e192ef..a1bdf68f95 100644 --- a/.github/workflows/ms.servicebus.namespaces.yml +++ b/.github/workflows/ms.servicebus.namespaces.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.sql.managedinstances.yml b/.github/workflows/ms.sql.managedinstances.yml index a80eb253ef..7820f32bd5 100644 --- a/.github/workflows/ms.sql.managedinstances.yml +++ b/.github/workflows/ms.sql.managedinstances.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.sql.servers.yml b/.github/workflows/ms.sql.servers.yml index e996b166ce..254b426504 100644 --- a/.github/workflows/ms.sql.servers.yml +++ b/.github/workflows/ms.sql.servers.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.storage.storageaccounts.yml b/.github/workflows/ms.storage.storageaccounts.yml index 84d9e980f4..f84d595b31 100644 --- a/.github/workflows/ms.storage.storageaccounts.yml +++ b/.github/workflows/ms.storage.storageaccounts.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -117,26 +99,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -164,8 +129,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.virtualmachineimages.imagetemplates.yml b/.github/workflows/ms.virtualmachineimages.imagetemplates.yml index 300c63c9d3..1a7af2b183 100644 --- a/.github/workflows/ms.virtualmachineimages.imagetemplates.yml +++ b/.github/workflows/ms.virtualmachineimages.imagetemplates.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.web.connections.yml b/.github/workflows/ms.web.connections.yml index 0abc6be047..6be9435078 100644 --- a/.github/workflows/ms.web.connections.yml +++ b/.github/workflows/ms.web.connections.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.web.hostingenvironments.yml b/.github/workflows/ms.web.hostingenvironments.yml index b71dc8a634..192c244c12 100644 --- a/.github/workflows/ms.web.hostingenvironments.yml +++ b/.github/workflows/ms.web.hostingenvironments.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.web.serverfarms.yml b/.github/workflows/ms.web.serverfarms.yml index 89473a05eb..d31761bfaf 100644 --- a/.github/workflows/ms.web.serverfarms.yml +++ b/.github/workflows/ms.web.serverfarms.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -116,26 +98,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -163,8 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.web.sites.yml b/.github/workflows/ms.web.sites.yml index 6bf6d0bde5..c29aa9e983 100644 --- a/.github/workflows/ms.web.sites.yml +++ b/.github/workflows/ms.web.sites.yml @@ -61,49 +61,31 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - ################## - # UNIT TESTS # - ################## - # Global tests - # ------------ - job_tests_module_global: + #################### + # Pester Tests # + #################### + job_module_pester_validation: runs-on: ubuntu-20.04 - name: 'Run global module tests' + name: 'Pester tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleGeneral + - name: 'Validate module with Pester' + uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' - # Global API tests - # ---------------- - job_tests_module_global_api: - runs-on: ubuntu-20.04 - name: 'Run global API module tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Test module' - uses: ./.github/actions/templates/validateModuleApis - with: - modulePath: '${{ env.modulePath }}' - - ########################### - # Deployment module tests # - ########################### + #################### + # Deployment tests # + #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Run deployment validation module tests' + name: 'Deployment tests' needs: - job_set_workflow_param - job_tests_module_global - - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -122,26 +104,9 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here - # ----------- # - ## Dry Run ## - # ----------- # - - name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeploy - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' - location: '${{ env.defaultLocation }}' - resourceGroupName: '${{ env.resourceGroupName }}' - subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' - # ------------------- # - ## Deploy & Remove ## - # ------------------- # - - name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]' - id: step_deploy - uses: ./.github/actions/templates/deployModule + variableFileName: 'variables.module' + - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' + uses: ./.github/actions/templates/validateModuleDeployment with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -169,8 +134,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'variables.module' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/docs/wiki/PipelinesDesign.md b/docs/wiki/PipelinesDesign.md index 87e787d57d..9f339ee46e 100644 --- a/docs/wiki/PipelinesDesign.md +++ b/docs/wiki/PipelinesDesign.md @@ -76,7 +76,7 @@ The validation phase performs all test outside of a test deployment. This includ #### Static module validation -This static validation executes the tests documented in the [testing](./Testing) section. Without diving into to much detail, we test aspects like a proper ReadMe documentation, a proper module folder structure, a minimum number of refresh of the leveraged of API versions and the like. +This static validation executes the tests documented in the [testing](./Testing) section. Without diving into to much detail, we test aspects like a proper ReadMe documentation, a proper module folder structure, a minimum number of refresh of the leveraged of API versions and the like. For example, each resource's API version is compared with those currently available on Azure. Accepted are both the latest 5 versions (including preview versions) as well as the latest 5 non-preview versions. #### Simulated deployment validation @@ -218,14 +218,13 @@ The [pipeline configuration file](#pipeline-variables) can be found at `.github/ We use several composite actions to perform various tasks shared by our module workflows: -- **validateModuleGeneral**
- This action perform all [static tests](#static-module-validation) for a module using Pester. -- **validateModuleApis**
- This action performs further [static tests](#static-module-validation), focused on API version tests for a module to ensure we notice if a version becomes stale. Each resource's API version is compared with those currently available on Azure. Accepted are both the latest 5 versions (including preview versions) as well as the latest 5 non-preview versions. -- **validateModuleDeploy:**
- This action performs the [simulated deployment](#simulated-deployment-validation) using a provided parameter file. -- **deployModule:**
- This action performs an [actual deployment](#test-deploy) to Azure using a provided parameter file. Once a deployment ran it [removes](#removal) the resource +- **validateModulePester**
+ This action performs [static tests](#static-module-validation) for a module using Pester, including API versions focused tests to avoid those become stale overtime. +- **validateModuleDeployment:**
+ This action performs the following tasks: + 1. A [simulated deployment](#simulated-deployment-validation) using a provided parameter file. + 1. An [actual deployment](#test-deploy) to Azure using a provided parameter file. + 1. The [removal](#removal) of the test-deployed resources - **publishModule:**
This action is capable of [publishing](#publish) the given template to a location specified in the pipeline [variable file](#component-variable-files). - **getWorkflowInput:**
diff --git a/utilities/pipelines/resourceDeployment/New-ModuleDeployment.ps1 b/utilities/pipelines/resourceDeployment/New-ModuleDeployment.ps1 index 92b699d1ac..da899f50df 100644 --- a/utilities/pipelines/resourceDeployment/New-ModuleDeployment.ps1 +++ b/utilities/pipelines/resourceDeployment/New-ModuleDeployment.ps1 @@ -1,3 +1,4 @@ +#region helper <# .SYNOPSIS Run a template deployment using a given parameter file @@ -10,7 +11,238 @@ Works on a resource group, subscription, managementgroup and tenant level Mandatory. The path to the deployment file .PARAMETER parameterFilePath -Mandatory. Path to the parameter file from root. Can be a single file, multiple files, or directory that conains (.json) files. +Optional. Path to the parameter file from root. Can be a single file, multiple files, or directory that contains (.json) files. + +.PARAMETER location +Mandatory. Location to test in. E.g. WestEurope + +.PARAMETER resourceGroupName +Optional. Name of the resource group to deploy into. Mandatory if deploying into a resource group (resource group level) + +.PARAMETER subscriptionId +Optional. ID of the subscription to deploy into. Mandatory if deploying into a subscription (subscription level) using a Management groups service connection + +.PARAMETER managementGroupId +Optional. Name of the management group to deploy into. Mandatory if deploying into a management group (management group level) + +.PARAMETER additionalTags +Optional. Provde a Key Value Pair (Object) that will be appended to the Parameter file tags. Example: @{myKey = 'myValue',myKey2 = 'myValue2'}. + +.PARAMETER retryLimit +Optional. Maximum retry limit if the deployment fails. Default is 3. + +.PARAMETER doNotThrow +Optional. Do not throw an exception if it failed. Still returns the error message though + +.EXAMPLE +New-DeploymentWithParameterFile -templateFilePath 'C:/KeyVault/deploy.json' -parameterFilePath 'C:/KeyVault/.parameters/parameters.json' -location 'WestEurope' -resourceGroupName 'aLegendaryRg' + +Deploy the deploy.json of the KeyVault module with the parameter file 'parameters.json' using the resource group 'aLegendaryRg' in location 'WestEurope' + +.EXAMPLE +New-DeploymentWithParameterFile -templateFilePath 'C:/ResourceGroup/deploy.json' -location 'WestEurope' + +Deploy the deploy.json of the ResourceGroup module without a parameter file in location 'WestEurope' +#> +function New-DeploymentWithParameterFile { + + [CmdletBinding(SupportsShouldProcess = $true)] + param ( + [Parameter(Mandatory)] + [string] $templateFilePath, + + [Parameter(Mandatory = $false)] + [string] $parameterFilePath, + + [Parameter(Mandatory = $false)] + [string] $resourceGroupName = '', + + [Parameter(Mandatory)] + [string] $location, + + [Parameter(Mandatory = $false)] + [string] $subscriptionId, + + [Parameter(Mandatory = $false)] + [string] $managementGroupId, + + [Parameter(Mandatory = $false)] + [PSCustomObject]$additionalTags, + + [Parameter(Mandatory = $false)] + [Hashtable]$additionalParameters, + + [Parameter(Mandatory = $false)] + [switch] $doNotThrow, + + [Parameter(Mandatory = $false)] + [int]$retryLimit = 3 + ) + + $moduleName = Split-Path -Path (Split-Path $templateFilePath -Parent) -LeafBase + + [bool]$Stoploop = $false + [int]$retryCount = 1 + + # Generate a valid deployment name. Must match ^[-\w\._\(\)]+$ + do { + $deploymentName = "$moduleName-$(-join (Get-Date -Format yyyyMMddTHHMMssffffZ)[0..63])" + } while ($deploymentName -notmatch '^[-\w\._\(\)]+$') + + Write-Verbose "Deploying with deployment name [$deploymentName]" -Verbose + + $DeploymentInputs = @{ + DeploymentName = $deploymentName + TemplateFile = $templateFilePath + Verbose = $true + ErrorAction = 'Stop' + } + + if ($additionalParameters) { + $DeploymentInputs += $additionalParameters + } + + if (-not [String]::IsNullOrEmpty($parameterFilePath)) { + $DeploymentInputs['TemplateParameterFile'] = $parameterFile + $fileProperties = Get-Item -Path $parameterFile + Write-Verbose "Deploying: $($fileProperties.Name)" + } + + ## Append Tags to Parameters if Resource supports them (all tags must be in one object) + if ($additionalTags) { + + # Parameter tags + if (-not [String]::IsNullOrEmpty($parameterFilePath)) { + $parameterFileTags = (ConvertFrom-Json (Get-Content -Raw -Path $parameterFile) -AsHashtable).parameters.tags.value + } + if (-not $parameterFileTags) { $parameterFileTags = @{} } + + # Pipeline tags + if ($additionalTags) { $parameterFileTags += $additionalTags } # If additionalTags object is provided, append tag to the resource + + # Overwrites parameter file tags parameter + Write-Verbose ("additionalTags: $(($additionalTags) ? ($additionalTags | ConvertTo-Json) : '[]')") + $DeploymentInputs += @{Tags = $parameterFileTags } + } + + if ((Split-Path $templateFilePath -Extension) -eq '.bicep') { + # Bicep + $bicepContent = Get-Content $templateFilePath + $bicepScope = $bicepContent | Where-Object { $_ -like '*targetscope =*' } + if (-not $bicepScope) { + $deploymentScope = 'resourceGroup' + } else { + $deploymentScope = $bicepScope.ToLower().Replace('targetscope = ', '').Replace("'", '').Trim() + } + } else { + # ARM + $armSchema = (ConvertFrom-Json (Get-Content -Raw -Path $templateFilePath)).'$schema' + switch -regex ($armSchema) { + '\/deploymentTemplate.json#$' { $deploymentScope = 'resourceGroup' } + '\/subscriptionDeploymentTemplate.json#$' { $deploymentScope = 'subscription' } + '\/managementGroupDeploymentTemplate.json#$' { $deploymentScope = 'managementGroup' } + '\/tenantDeploymentTemplate.json#$' { $deploymentScope = 'tenant' } + Default { throw "[$armSchema] is a non-supported ARM template schema" } + } + } + + ####################### + ## INVOKE DEPLOYMENT ## + ####################### + do { + try { + switch ($deploymentScope) { + 'resourceGroup' { + if ($subscriptionId) { + $Context = Get-AzContext -ListAvailable | Where-Object Subscription -Match $subscriptionId + if ($Context) { + $null = $Context | Set-AzContext + } + } + if (-not (Get-AzResourceGroup -Name $resourceGroupName -ErrorAction 'SilentlyContinue')) { + if ($PSCmdlet.ShouldProcess("Resource group [$resourceGroupName] in location [$location]", 'Create')) { + New-AzResourceGroup -Name $resourceGroupName -Location $location + } + } + if ($PSCmdlet.ShouldProcess('Resource group level deployment', 'Create')) { + $res = New-AzResourceGroupDeployment @DeploymentInputs -ResourceGroupName $resourceGroupName + } + break + } + 'subscription' { + if ($subscriptionId) { + $Context = Get-AzContext -ListAvailable | Where-Object Subscription -Match $subscriptionId + if ($Context) { + $null = $Context | Set-AzContext + } + } + if ($PSCmdlet.ShouldProcess('Subscription level deployment', 'Create')) { + $res = New-AzSubscriptionDeployment @DeploymentInputs -Location $location + } + break + } + 'managementGroup' { + if ($PSCmdlet.ShouldProcess('Management group level deployment', 'Create')) { + $res = New-AzManagementGroupDeployment @DeploymentInputs -Location $location -ManagementGroupId $managementGroupId + } + break + } + 'tenant' { + if ($PSCmdlet.ShouldProcess('Tenant level deployment', 'Create')) { + $res = New-AzTenantDeployment @DeploymentInputs -Location $location + } + break + } + default { + throw "[$deploymentScope] is a non-supported template scope" + $Stoploop = $true + } + } + $Stoploop = $true + } catch { + if ($retryCount -ge $retryLimit) { + if ($doNotThrow) { + return @{ + DeploymentName = $deploymentName + Exception = $PSitem.Exception.Message + } + } else { + throw $PSitem.Exception.Message + } + $Stoploop = $true + } else { + Write-Verbose "Resource deployment Failed.. ($retryCount/$retryLimit) Retrying in 5 Seconds.. `n" + Write-Verbose ($PSitem.Exception.Message | Out-String) -Verbose + Start-Sleep -Seconds 5 + $retryCount++ + } + } + } + until ($Stoploop -eq $true -or $retryCount -gt $retryLimit) + + Write-Verbose 'Result' -Verbose + Write-Verbose '------' -Verbose + Write-Verbose ($res | Out-String) -Verbose + return @{ + deploymentName = $deploymentName + deploymentOutput = $res.Outputs + } +} +#endregion + +<# +.SYNOPSIS +Run a template deployment using a given parameter file + +.DESCRIPTION +Run a template deployment using a given parameter file. +Works on a resource group, subscription, managementgroup and tenant level + +.PARAMETER templateFilePath +Mandatory. The path to the deployment file + +.PARAMETER parameterFilePath +Optional. Path to the parameter file from root. Can be a single file, multiple files, or directory that contains (.json) files. .PARAMETER location Mandatory. Location to test in. E.g. WestEurope @@ -50,14 +282,14 @@ function New-ModuleDeployment { [Parameter(Mandatory)] [string] $templateFilePath, - [Parameter(Mandatory)] + [Parameter(Mandatory = $false)] [string[]] $parameterFilePath, [Parameter(Mandatory)] [string] $location, [Parameter(Mandatory = $false)] - [string] $resourceGroupName, + [string] $resourceGroupName = '', [Parameter(Mandatory = $false)] [string] $subscriptionId, @@ -65,6 +297,9 @@ function New-ModuleDeployment { [Parameter(Mandatory = $false)] [string] $managementGroupId, + [Parameter(Mandatory = $false)] + [Hashtable]$additionalParameters, + [Parameter(Mandatory = $false)] [PSCustomObject]$additionalTags, @@ -80,152 +315,43 @@ function New-ModuleDeployment { } process { - - $moduleName = Split-Path -Path (Split-Path $templateFilePath -Parent) -LeafBase - ## Assess Provided Parameter Path - if ((Test-Path -Path $parameterFilePath -PathType Container) -and $parameterFilePath.Length -eq 1) { + if ((-not [String]::IsNullOrEmpty($parameterFilePath)) -and (Test-Path -Path $parameterFilePath -PathType 'Container') -and $parameterFilePath.Length -eq 1) { ## Transform Path to Files $parameterFilePath = Get-ChildItem $parameterFilePath -Recurse -Filter *.json | Select-Object -ExpandProperty FullName Write-Verbose "Detected Parameter File(s)/Directory - Count: `n $($parameterFilePath.Count)" } ## Iterate through each file - foreach ($parameterFile in $parameterFilePath) { - $fileProperties = Get-Item -Path $parameterFile - Write-Verbose "Deploying: $($fileProperties.Name)" - [bool]$Stoploop = $false - [int]$retryCount = 1 - - # Generate a valid deployment name. Must match ^[-\w\._\(\)]+$ - do { - $deploymentName = "$moduleName-$(-join (Get-Date -Format yyyyMMddTHHMMssffffZ)[0..63])" - } while ($deploymentName -notmatch '^[-\w\._\(\)]+$') - - Write-Verbose "Deploying with deployment name [$deploymentName]" -Verbose - - $DeploymentInputs = @{ - DeploymentName = $deploymentName - TemplateFile = $templateFilePath - TemplateParameterFile = $parameterFile - Verbose = $true - ErrorAction = 'Stop' - } - - ## Append Tags to Parameters if Resource supports them (all tags must be in one object) - if ($additionalTags) { - - # Parameter tags - $parameterFileTags = (ConvertFrom-Json (Get-Content -Raw -Path $parameterFile) -AsHashtable).parameters.tags.value - if ($parameterFileTags) { $parameterFileTags = @{} } - - # Pipeline tags - if ($additionalTags) { $parameterFileTags += $additionalTags } # If additionalTags object is provided, append tag to the resource - - # Overwrites parameter file tags parameter - Write-Verbose ("additionalTags: $(($additionalTags) ? ($additionalTags | ConvertTo-Json) : '[]')") - $DeploymentInputs += @{Tags = $parameterFileTags } - } - - if ((Split-Path $templateFilePath -Extension) -eq '.bicep') { - # Bicep - $bicepContent = Get-Content $templateFilePath - $bicepScope = $bicepContent | Where-Object { $_ -like '*targetscope =*' } - if (-not $bicepScope) { - $deploymentScope = 'resourceGroup' - } else { - $deploymentScope = $bicepScope.ToLower().Replace('targetscope = ', '').Replace("'", '').Trim() + $deploymentInputObject = @{ + templateFilePath = $templateFilePath + additionalTags = $additionalTags + additionalParameters = $additionalParameters + location = $location + resourceGroupName = $resourceGroupName + subscriptionId = $subscriptionId + managementGroupId = $managementGroupId + doNotThrow = $doNotThrow + retryLimit = $retryLimit + } + if ($parameterFilePath) { + if ($parameterFilePath -is [array]) { + $deploymentResult = [System.Collections.ArrayList]@() + foreach ($parameterFile in $parameterFilePath) { + if ($PSCmdlet.ShouldProcess("Deployment for parameter file [$parameterFilePath]", 'Trigger')) { + $deploymentResult += New-DeploymentWithParameterFile @deploymentInputObject -parameterFilePath $parameterFile + } } + return $deploymentResult } else { - # ARM - $armSchema = (ConvertFrom-Json (Get-Content -Raw -Path $templateFilePath)).'$schema' - switch -regex ($armSchema) { - '\/deploymentTemplate.json#$' { $deploymentScope = 'resourceGroup' } - '\/subscriptionDeploymentTemplate.json#$' { $deploymentScope = 'subscription' } - '\/managementGroupDeploymentTemplate.json#$' { $deploymentScope = 'managementGroup' } - '\/tenantDeploymentTemplate.json#$' { $deploymentScope = 'tenant' } - Default { throw "[$armSchema] is a non-supported ARM template schema" } + if ($PSCmdlet.ShouldProcess("Deployment for single parameter file [$parameterFilePath]", 'Trigger')) { + return New-DeploymentWithParameterFile @deploymentInputObject -parameterFilePath $parameterFilePath } } - - ####################### - ## INVOKE DEPLOYMENT ## - ####################### - do { - try { - switch ($deploymentScope) { - 'resourceGroup' { - if ($subscriptionId) { - $Context = Get-AzContext -ListAvailable | Where-Object Subscription -Match $subscriptionId - if ($Context) { - $null = $Context | Set-AzContext - } - } - if (-not (Get-AzResourceGroup -Name $resourceGroupName -ErrorAction 'SilentlyContinue')) { - if ($PSCmdlet.ShouldProcess("Resource group [$resourceGroupName] in location [$location]", 'Create')) { - New-AzResourceGroup -Name $resourceGroupName -Location $location - } - } - if ($PSCmdlet.ShouldProcess('Resource group level deployment', 'Create')) { - $res = New-AzResourceGroupDeployment @DeploymentInputs -ResourceGroupName $resourceGroupName - } - break - } - 'subscription' { - if ($subscriptionId) { - $Context = Get-AzContext -ListAvailable | Where-Object Subscription -Match $subscriptionId - if ($Context) { - $null = $Context | Set-AzContext - } - } - if ($PSCmdlet.ShouldProcess('Subscription level deployment', 'Create')) { - $res = New-AzSubscriptionDeployment @DeploymentInputs -Location $location - } - break - } - 'managementGroup' { - if ($PSCmdlet.ShouldProcess('Management group level deployment', 'Create')) { - $res = New-AzManagementGroupDeployment @DeploymentInputs -Location $location -ManagementGroupId $managementGroupId - } - break - } - 'tenant' { - if ($PSCmdlet.ShouldProcess('Tenant level deployment', 'Create')) { - $res = New-AzTenantDeployment @DeploymentInputs -Location $location - } - break - } - default { - throw "[$deploymentScope] is a non-supported template scope" - $Stoploop = $true - } - } - $Stoploop = $true - } catch { - if ($retryCount -ge $retryLimit) { - if ($doNotThrow) { - return @{ - DeploymentName = $deploymentName - Exception = $PSitem.Exception.Message - } - } else { - throw $PSitem.Exception.Message - } - $Stoploop = $true - } else { - Write-Verbose "Resource deployment Failed.. ($retryCount/$retryLimit) Retrying in 5 Seconds.. `n" - Write-Verbose ($PSitem.Exception.Message | Out-String) -Verbose - Start-Sleep -Seconds 5 - $retryCount++ - } - } + } else { + if ($PSCmdlet.ShouldProcess('Deployment without parameter file', 'Trigger')) { + return New-DeploymentWithParameterFile @deploymentInputObject } - until ($Stoploop -eq $true -or $retryCount -gt $retryLimit) - - Write-Verbose 'Result' -Verbose - Write-Verbose '------' -Verbose - Write-Verbose ($res | Out-String) -Verbose - return $deploymentName } }