From 23650c718115aafc87e00c0b9b7b85ae3921346f Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 6 Jan 2022 09:49:55 +0100 Subject: [PATCH 1/2] RSV MI output fix --- .../workflows/ms.recoveryservices.vaults.yml | 102 +++++++++--------- .../vaults/deploy.bicep | 2 +- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/.github/workflows/ms.recoveryservices.vaults.yml b/.github/workflows/ms.recoveryservices.vaults.yml index c2baccd7c6..3408a16eaa 100644 --- a/.github/workflows/ms.recoveryservices.vaults.yml +++ b/.github/workflows/ms.recoveryservices.vaults.yml @@ -22,8 +22,8 @@ on: required: false default: '0.0.1' push: - branches: - - main + # branches: + # - main paths: - '.github/actions/templates/**' - '.github/workflows/ms.recoveryservices.vaults.yml' @@ -63,21 +63,21 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - #################### - # Pester Tests # - #################### - job_module_pester_validation: - runs-on: ubuntu-20.04 - name: 'Pester tests' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Run tests' - uses: ./.github/actions/templates/validateModulePester - with: - modulePath: '${{ env.modulePath }}' + # #################### + # # Pester Tests # + # #################### + # job_module_pester_validation: + # runs-on: ubuntu-20.04 + # name: 'Pester tests' + # steps: + # - name: 'Checkout' + # uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + # - name: 'Run tests' + # uses: ./.github/actions/templates/validateModulePester + # with: + # modulePath: '${{ env.modulePath }}' #################### # Deployment tests # @@ -87,7 +87,7 @@ jobs: name: 'Deployment tests' needs: - job_set_workflow_param - - job_module_pester_validation + # - job_module_pester_validation strategy: fail-fast: false matrix: @@ -112,36 +112,36 @@ jobs: managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' removeDeployment: '${{ needs.job_set_workflow_param.outputs.removeDeployment }}' - ############### - # PUBLISH # - ############### - job_publish_module: - name: 'Publish module' - if: contains(fromJson('["refs/heads/main", "refs/heads/master"]'), github.ref) - runs-on: ubuntu-20.04 - needs: - - job_set_workflow_param - - job_module_deploy_validation - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set environment variables - uses: deep-mm/set-variables@v1.0 - with: - variableFileName: 'global.variables' - - name: 'Publish module' - uses: ./.github/actions/templates/publishModule - with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - versioningOption: '${{ needs.job_set_workflow_param.outputs.versioningOption }}' - customVersion: '${{ needs.job_set_workflow_param.outputs.customVersion }}' - templateSpecsRGName: '${{ env.templateSpecsRGName }}' - templateSpecsRGLocation: '${{ env.templateSpecsRGLocation }}' - templateSpecsDescription: '${{ env.templateSpecsDescription }}' - templateSpecsDoPublish: '${{ env.templateSpecsDoPublish }}' - bicepRegistryName: '${{ env.bicepRegistryName }}' - bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' - bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' - bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + # ############### + # # PUBLISH # + # ############### + # job_publish_module: + # name: 'Publish module' + # if: contains(fromJson('["refs/heads/main", "refs/heads/master"]'), github.ref) + # runs-on: ubuntu-20.04 + # needs: + # - job_set_workflow_param + # - job_module_deploy_validation + # steps: + # - name: 'Checkout' + # uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + # - name: Set environment variables + # uses: deep-mm/set-variables@v1.0 + # with: + # variableFileName: 'global.variables' + # - name: 'Publish module' + # uses: ./.github/actions/templates/publishModule + # with: + # templateFilePath: '${{ env.modulePath }}/deploy.bicep' + # versioningOption: '${{ needs.job_set_workflow_param.outputs.versioningOption }}' + # customVersion: '${{ needs.job_set_workflow_param.outputs.customVersion }}' + # templateSpecsRGName: '${{ env.templateSpecsRGName }}' + # templateSpecsRGLocation: '${{ env.templateSpecsRGLocation }}' + # templateSpecsDescription: '${{ env.templateSpecsDescription }}' + # templateSpecsDoPublish: '${{ env.templateSpecsDoPublish }}' + # bicepRegistryName: '${{ env.bicepRegistryName }}' + # bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' + # bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' + # bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' diff --git a/arm/Microsoft.RecoveryServices/vaults/deploy.bicep b/arm/Microsoft.RecoveryServices/vaults/deploy.bicep index 0fec784b56..c7020ca09d 100644 --- a/arm/Microsoft.RecoveryServices/vaults/deploy.bicep +++ b/arm/Microsoft.RecoveryServices/vaults/deploy.bicep @@ -227,4 +227,4 @@ output recoveryServicesVaultResourceGroup string = resourceGroup().name output recoveryServicesVaultName string = rsv.name @description('The principal ID of the system assigned identity.') -output systemAssignedPrincipalId string = systemAssignedIdentity ? rsv.identity.principalId : '' +output systemAssignedPrincipalId string = systemAssignedIdentity && contains(rsv.identity, 'principalId') ? rsv.identity.principalId : '' From f5954607ebe3518903cbc7fe90878dead385dcdb Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 6 Jan 2022 10:05:09 +0100 Subject: [PATCH 2/2] reset workflow file --- .../workflows/ms.recoveryservices.vaults.yml | 102 +++++++++--------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ms.recoveryservices.vaults.yml b/.github/workflows/ms.recoveryservices.vaults.yml index 3408a16eaa..c2baccd7c6 100644 --- a/.github/workflows/ms.recoveryservices.vaults.yml +++ b/.github/workflows/ms.recoveryservices.vaults.yml @@ -22,8 +22,8 @@ on: required: false default: '0.0.1' push: - # branches: - # - main + branches: + - main paths: - '.github/actions/templates/**' - '.github/workflows/ms.recoveryservices.vaults.yml' @@ -63,21 +63,21 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - # #################### - # # Pester Tests # - # #################### - # job_module_pester_validation: - # runs-on: ubuntu-20.04 - # name: 'Pester tests' - # steps: - # - name: 'Checkout' - # uses: actions/checkout@v2 - # with: - # fetch-depth: 0 - # - name: 'Run tests' - # uses: ./.github/actions/templates/validateModulePester - # with: - # modulePath: '${{ env.modulePath }}' + #################### + # Pester Tests # + #################### + job_module_pester_validation: + runs-on: ubuntu-20.04 + name: 'Pester tests' + steps: + - name: 'Checkout' + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: 'Run tests' + uses: ./.github/actions/templates/validateModulePester + with: + modulePath: '${{ env.modulePath }}' #################### # Deployment tests # @@ -87,7 +87,7 @@ jobs: name: 'Deployment tests' needs: - job_set_workflow_param - # - job_module_pester_validation + - job_module_pester_validation strategy: fail-fast: false matrix: @@ -112,36 +112,36 @@ jobs: managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' removeDeployment: '${{ needs.job_set_workflow_param.outputs.removeDeployment }}' - # ############### - # # PUBLISH # - # ############### - # job_publish_module: - # name: 'Publish module' - # if: contains(fromJson('["refs/heads/main", "refs/heads/master"]'), github.ref) - # runs-on: ubuntu-20.04 - # needs: - # - job_set_workflow_param - # - job_module_deploy_validation - # steps: - # - name: 'Checkout' - # uses: actions/checkout@v2 - # with: - # fetch-depth: 0 - # - name: Set environment variables - # uses: deep-mm/set-variables@v1.0 - # with: - # variableFileName: 'global.variables' - # - name: 'Publish module' - # uses: ./.github/actions/templates/publishModule - # with: - # templateFilePath: '${{ env.modulePath }}/deploy.bicep' - # versioningOption: '${{ needs.job_set_workflow_param.outputs.versioningOption }}' - # customVersion: '${{ needs.job_set_workflow_param.outputs.customVersion }}' - # templateSpecsRGName: '${{ env.templateSpecsRGName }}' - # templateSpecsRGLocation: '${{ env.templateSpecsRGLocation }}' - # templateSpecsDescription: '${{ env.templateSpecsDescription }}' - # templateSpecsDoPublish: '${{ env.templateSpecsDoPublish }}' - # bicepRegistryName: '${{ env.bicepRegistryName }}' - # bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' - # bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' - # bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + ############### + # PUBLISH # + ############### + job_publish_module: + name: 'Publish module' + if: contains(fromJson('["refs/heads/main", "refs/heads/master"]'), github.ref) + runs-on: ubuntu-20.04 + needs: + - job_set_workflow_param + - job_module_deploy_validation + steps: + - name: 'Checkout' + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set environment variables + uses: deep-mm/set-variables@v1.0 + with: + variableFileName: 'global.variables' + - name: 'Publish module' + uses: ./.github/actions/templates/publishModule + with: + templateFilePath: '${{ env.modulePath }}/deploy.bicep' + versioningOption: '${{ needs.job_set_workflow_param.outputs.versioningOption }}' + customVersion: '${{ needs.job_set_workflow_param.outputs.customVersion }}' + templateSpecsRGName: '${{ env.templateSpecsRGName }}' + templateSpecsRGLocation: '${{ env.templateSpecsRGLocation }}' + templateSpecsDescription: '${{ env.templateSpecsDescription }}' + templateSpecsDoPublish: '${{ env.templateSpecsDoPublish }}' + bicepRegistryName: '${{ env.bicepRegistryName }}' + bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' + bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' + bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}'