diff --git a/.azuredevops/modulePipelines/ms.automanage.accounts.yml b/.azuredevops/modulePipelines/ms.automanage.accounts.yml deleted file mode 100644 index 59355a9b1e..0000000000 --- a/.azuredevops/modulePipelines/ms.automanage.accounts.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: 'Automanage - Accounts' - -parameters: - - name: removeDeployment - displayName: Remove deployed module - type: boolean - default: true - - name: versioningOption - displayName: The mode to handle the version increments [major|minor|patch] - type: string - default: patch - values: - - patch - - minor - - major - - name: customVersion - displayName: Custom version to apply. Used only if higher than latest - type: string - default: '0.0.1' - -trigger: - batch: true - branches: - include: - - main - paths: - include: - - '/.azuredevops/modulePipelines/ms.automanage.accounts.yml' - - '/.azuredevops/pipelineTemplates/module.*.yml' - - '/arm/Microsoft.Automanage/accounts/*' - exclude: - - '/**/*.md' - -variables: - - template: '/.azuredevops/pipelineVariables/global.variables.yml' - - group: 'PLATFORM_VARIABLES' - - name: modulePath - value: '/arm/Microsoft.Automanage/accounts' - -stages: - - stage: Validation - displayName: Pester tests - jobs: - - template: /.azuredevops/pipelineTemplates/jobs.validateModulePester.yml - - - stage: Deployment - displayName: Deployment tests - jobs: - - template: /.azuredevops/pipelineTemplates/jobs.validateModuleDeployment.yml - parameters: - removeDeployment: '${{ parameters.removeDeployment }}' - deploymentBlocks: - - path: $(modulePath)/.parameters/parameters.json - - - stage: Publishing - displayName: Publish module - condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) - jobs: - - template: /.azuredevops/pipelineTemplates/jobs.publishModule.yml - parameters: - versioningOption: '${{ parameters.versioningOption }}' - customVersion: '${{ parameters.customVersion }}' diff --git a/.github/workflows/ms.automanage.accounts.yml b/.github/workflows/ms.automanage.accounts.yml deleted file mode 100644 index ff69faa49c..0000000000 --- a/.github/workflows/ms.automanage.accounts.yml +++ /dev/null @@ -1,147 +0,0 @@ -name: 'Automanage: Accounts' - -on: - workflow_dispatch: - inputs: - removeDeployment: - type: boolean - description: 'Remove deployed module' - required: false - default: 'true' - versioningOption: - type: choice - description: 'The mode to handle the version increments [major|minor|patch]' - required: false - default: 'patch' - options: - - major - - minor - - patch - customVersion: - description: 'Custom version to apply. Used only if higher than latest' - required: false - default: '0.0.1' - push: - branches: - - main - paths: - - '.github/actions/templates/**' - - '.github/workflows/ms.automanage.accounts.yml' - - 'arm/Microsoft.Automanage/accounts/**' - - '!*/**/readme.md' - - 'utilities/pipelines/**' - - '!utilities/pipelines/dependencies/**' - -env: - modulePath: 'arm/Microsoft.Automanage/accounts' - workflowPath: '.github/workflows/ms.automanage.accounts.yml' - AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }} - ARM_SUBSCRIPTION_ID: '${{ secrets.ARM_SUBSCRIPTION_ID }}' - ARM_MGMTGROUP_ID: '${{ secrets.ARM_MGMTGROUP_ID }}' - ARM_TENANT_ID: '${{ secrets.ARM_TENANT_ID }}' - DEPLOYMENT_SP_ID: '${{ secrets.DEPLOYMENT_SP_ID }}' - -jobs: - ############################ - # SET INPUT PARAMETERS # - ############################ - job_set_workflow_param: - runs-on: ubuntu-20.04 - name: 'Set input parameters to output variables' - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Set input parameters' - id: get-workflow-param - uses: ./.github/actions/templates/getWorkflowInput - with: - workflowPath: '${{ env.workflowPath}}' - outputs: - removeDeployment: ${{ steps.get-workflow-param.outputs.removeDeployment }} - 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 }}' - - #################### - # Deployment tests # - #################### - job_module_deploy_validation: - runs-on: ubuntu-20.04 - name: 'Deployment tests' - needs: - - job_set_workflow_param - - job_module_pester_validation - strategy: - fail-fast: false - matrix: - parameterFilePaths: ['parameters.json'] - 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: 'Using parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeployment - 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 }}' - removeDeployment: '${{ needs.job_set_workflow_param.outputs.removeDeployment }}' - - ############### - # PUBLISH # - ############### - job_publish_module: - name: 'Publish module' - if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' - 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 }}'