diff --git a/.azuredevops/modulePipelines/ms.analysisservices.servers.yml b/.azuredevops/modulePipelines/ms.analysisservices.servers.yml new file mode 100644 index 0000000000..395a1dba9e --- /dev/null +++ b/.azuredevops/modulePipelines/ms.analysisservices.servers.yml @@ -0,0 +1,63 @@ +name: 'AnalysisServices - Servers' + +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.analysisservices.servers.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.AnalysisServices/servers/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.AnalysisServices/servers' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + - path: $(modulePath)/.parameters/parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.apimanagement.service.yml b/.azuredevops/modulePipelines/ms.apimanagement.service.yml new file mode 100644 index 0000000000..8ac3f37524 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.apimanagement.service.yml @@ -0,0 +1,63 @@ +name: 'ApiManagement - Service' + +parameters: + - name: removeDeployment + displayName: Remove deployed module + type: boolean + default: false # Soft-delete prevents re-deployment + - 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.apimanagement.service.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.ApiManagement/service/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.ApiManagement/service' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/max.parameters.json + - path: $(modulePath)/.parameters/parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.authorization.policyassignments.yml b/.azuredevops/modulePipelines/ms.authorization.policyassignments.yml new file mode 100644 index 0000000000..d47eff7e36 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.authorization.policyassignments.yml @@ -0,0 +1,65 @@ +name: 'Authorization - PolicyAssignments' + +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.authorization.policyassignments.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Authorization/policyAssignments/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Authorization/policyAssignments' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + templateFilePath: $(modulePath)/.bicep/nested_policyAssignments_sub.bicep + - path: $(modulePath)/.parameters/parameters.json + templateFilePath: $(modulePath)/.bicep/nested_policyAssignments_sub.bicep + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.authorization.policydefinitions.yml b/.azuredevops/modulePipelines/ms.authorization.policydefinitions.yml new file mode 100644 index 0000000000..8f2d84e1dd --- /dev/null +++ b/.azuredevops/modulePipelines/ms.authorization.policydefinitions.yml @@ -0,0 +1,65 @@ +name: 'Authorization - PolicyDefinitions' + +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.authorization.policydefinitions.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Authorization/policyDefinitions/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Authorization/policyDefinitions' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + templateFilePath: $(modulePath)/.bicep/nested_policyDefinitions_sub.bicep + - path: $(modulePath)/.parameters/parameters.json + templateFilePath: $(modulePath)/.bicep/nested_policyDefinitions_sub.bicep + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.authorization.policyexemptions.yml b/.azuredevops/modulePipelines/ms.authorization.policyexemptions.yml new file mode 100644 index 0000000000..265f983858 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.authorization.policyexemptions.yml @@ -0,0 +1,65 @@ +name: 'Authorization - PolicyExemptions' + +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.authorization.policyexemptions.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Authorization/policyExemptions/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Authorization/policyExemptions' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + templateFilePath: $(modulePath)/.bicep/nested_policyExemptions_sub.bicep + - path: $(modulePath)/.parameters/parameters.json + templateFilePath: $(modulePath)/.bicep/nested_policyExemptions_sub.bicep + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.authorization.policysetdefinitions.yml b/.azuredevops/modulePipelines/ms.authorization.policysetdefinitions.yml new file mode 100644 index 0000000000..07dc74c22c --- /dev/null +++ b/.azuredevops/modulePipelines/ms.authorization.policysetdefinitions.yml @@ -0,0 +1,65 @@ +name: 'Authorization - PolicySetDefinitions' + +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.authorization.policysetdefinitions.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Authorization/policySetDefinitions/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Authorization/policySetDefinitions' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + templateFilePath: $(modulePath)/.bicep/nested_policySetDefinition_sub.bicep + - path: $(modulePath)/.parameters/parameters.json + templateFilePath: $(modulePath)/.bicep/nested_policySetDefinition_sub.bicep + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.authorization.roleassignments.yml b/.azuredevops/modulePipelines/ms.authorization.roleassignments.yml new file mode 100644 index 0000000000..a3477c6486 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.authorization.roleassignments.yml @@ -0,0 +1,65 @@ +name: 'Authorization - RoleAssignments' + +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.authorization.roleassignments.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Authorization/roleAssignments/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Authorization/roleAssignments' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + templateFilePath: $(modulePath)/.bicep/nested_rbac_sub.bicep + - path: $(modulePath)/.parameters/parameters.json + templateFilePath: $(modulePath)/.bicep/nested_rbac_sub.bicep + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.authorization.roledefinitions.yml b/.azuredevops/modulePipelines/ms.authorization.roledefinitions.yml new file mode 100644 index 0000000000..fab720300f --- /dev/null +++ b/.azuredevops/modulePipelines/ms.authorization.roledefinitions.yml @@ -0,0 +1,65 @@ +name: 'Authorization - RoleDefinitions' + +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.authorization.roledefinitions.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Authorization/roleDefinitions/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Authorization/roleDefinitions' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + templateFilePath: $(modulePath)/.bicep/nested_roleDefinitions_sub.bicep + - path: $(modulePath)/.parameters/parameters.json + templateFilePath: $(modulePath)/.bicep/nested_roleDefinitions_sub.bicep + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.automanage.accounts.yml b/.azuredevops/modulePipelines/ms.automanage.accounts.yml new file mode 100644 index 0000000000..497a50862a --- /dev/null +++ b/.azuredevops/modulePipelines/ms.automanage.accounts.yml @@ -0,0 +1,62 @@ +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/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.automation.automationaccounts.yml b/.azuredevops/modulePipelines/ms.automation.automationaccounts.yml new file mode 100644 index 0000000000..008122b18c --- /dev/null +++ b/.azuredevops/modulePipelines/ms.automation.automationaccounts.yml @@ -0,0 +1,63 @@ +name: 'Automation - AutomationAccounts' + +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.automation.automationaccounts.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Automation/automationAccounts/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Automation/automationAccounts' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + - path: $(modulePath)/.parameters/parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.batch.batchaccounts.yml b/.azuredevops/modulePipelines/ms.batch.batchaccounts.yml new file mode 100644 index 0000000000..11b941d728 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.batch.batchaccounts.yml @@ -0,0 +1,62 @@ +name: 'Batch - BatchAccounts' + +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.batch.batchaccounts.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Batch/batchAccounts/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Batch/batchAccounts' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.cognitiveservices.accounts.yml b/.azuredevops/modulePipelines/ms.cognitiveservices.accounts.yml new file mode 100644 index 0000000000..496e51d831 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.cognitiveservices.accounts.yml @@ -0,0 +1,62 @@ +name: 'CognitiveServices - Accounts' + +parameters: + - name: removeDeployment + displayName: Remove deployed module + type: boolean + default: false # Soft-delete prevents re-deployment + - 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.cognitiveservices.accounts.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.CognitiveServices/accounts/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.CognitiveServices/accounts' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.compute.availabilitysets.yml b/.azuredevops/modulePipelines/ms.compute.availabilitysets.yml new file mode 100644 index 0000000000..1ea2b813b9 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.compute.availabilitysets.yml @@ -0,0 +1,62 @@ +name: 'Compute - AvailabilitySets' + +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.compute.availabilitysets.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Compute/availabilitySets/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Compute/availabilitySets' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.compute.diskencryptionsets.yml b/.azuredevops/modulePipelines/ms.compute.diskencryptionsets.yml new file mode 100644 index 0000000000..4d705857e9 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.compute.diskencryptionsets.yml @@ -0,0 +1,62 @@ +name: 'Compute - DiskEncryptionSets' + +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.compute.diskencryptionsets.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Compute/diskEncryptionSets/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Compute/diskEncryptionSets' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.compute.galleries.yml b/.azuredevops/modulePipelines/ms.compute.galleries.yml new file mode 100644 index 0000000000..d6b94e0376 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.compute.galleries.yml @@ -0,0 +1,67 @@ +name: 'Compute - Galleries' + +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.compute.galleries.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Compute/galleries/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Compute/galleries' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + parameters: + deploymentBlocks: + - path: $(modulePath)/.parameters/images.parameters.json + - path: $(modulePath)/.parameters/parameters.json + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/images.parameters.json + - path: $(modulePath)/.parameters/parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.compute.images.yml b/.azuredevops/modulePipelines/ms.compute.images.yml new file mode 100644 index 0000000000..d721278918 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.compute.images.yml @@ -0,0 +1,62 @@ +name: 'Compute - Images' + +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.compute.images.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Compute/images/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Compute/images' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.compute.proximityplacementgroups.yml b/.azuredevops/modulePipelines/ms.compute.proximityplacementgroups.yml new file mode 100644 index 0000000000..6a663f3453 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.compute.proximityplacementgroups.yml @@ -0,0 +1,62 @@ +name: 'Compute - ProximityPlacementGroups' + +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.compute.proximityplacementgroups.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Compute/proximityPlacementGroups/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Compute/proximityPlacementGroups' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.compute.virtualmachines.yml b/.azuredevops/modulePipelines/ms.compute.virtualmachines.yml new file mode 100644 index 0000000000..efb4901bc2 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.compute.virtualmachines.yml @@ -0,0 +1,65 @@ +name: 'Compute - VirtualMachines' + +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.compute.virtualmachines.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Compute/virtualMachines/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Compute/virtualMachines' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/linux.min.parameters.json + - path: $(modulePath)/.parameters/linux.parameters.json + - path: $(modulePath)/.parameters/windows.min.parameters.json + - path: $(modulePath)/.parameters/windows.parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.compute.virtualmachinescalesets.yml b/.azuredevops/modulePipelines/ms.compute.virtualmachinescalesets.yml new file mode 100644 index 0000000000..3ec6809b5b --- /dev/null +++ b/.azuredevops/modulePipelines/ms.compute.virtualmachinescalesets.yml @@ -0,0 +1,65 @@ +name: 'Compute - VirtualMachineScaleSets' + +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.compute.virtualmachinescalesets.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Compute/virtualMachineScaleSets/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Compute/virtualMachineScaleSets' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/linux.min.parameters.json + - path: $(modulePath)/.parameters/linux.parameters.json + - path: $(modulePath)/.parameters/windows.min.parameters.json + - path: $(modulePath)/.parameters/windows.parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.consumption.budgets.yml b/.azuredevops/modulePipelines/ms.consumption.budgets.yml new file mode 100644 index 0000000000..a6794d6fcb --- /dev/null +++ b/.azuredevops/modulePipelines/ms.consumption.budgets.yml @@ -0,0 +1,62 @@ +name: 'Consumption - Budgets' + +parameters: + - name: removeDeployment + displayName: Remove deployed module + type: boolean + default: false # Deployment does not support tags + - 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.consumption.budgets.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Consumption/budgets/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Consumption/budgets' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.containerinstance.containergroups.yml b/.azuredevops/modulePipelines/ms.containerinstance.containergroups.yml new file mode 100644 index 0000000000..49b2450976 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.containerinstance.containergroups.yml @@ -0,0 +1,62 @@ +name: 'ContainerInstance - ContainerGroups' + +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.containerinstance.containergroups.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.ContainerInstance/containerGroups/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.ContainerInstance/containerGroups' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.containerregistry.registries.yml b/.azuredevops/modulePipelines/ms.containerregistry.registries.yml new file mode 100644 index 0000000000..3c79f55f9f --- /dev/null +++ b/.azuredevops/modulePipelines/ms.containerregistry.registries.yml @@ -0,0 +1,62 @@ +name: 'ContainerRegistry - Registries' + +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.containerregistry.registries.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.ContainerRegistry/registries/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.ContainerRegistry/registries' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.containerservice.managedclusters.yml b/.azuredevops/modulePipelines/ms.containerservice.managedclusters.yml new file mode 100644 index 0000000000..bfece1d9ac --- /dev/null +++ b/.azuredevops/modulePipelines/ms.containerservice.managedclusters.yml @@ -0,0 +1,63 @@ +name: 'ContainerService - ManagedClusters' + +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.containerservice.managedclusters.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.ContainerService/managedClusters/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.ContainerService/managedClusters' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/azure.parameters.json + - path: $(modulePath)/.parameters/kubenet.parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.databricks.workspaces.yml b/.azuredevops/modulePipelines/ms.databricks.workspaces.yml new file mode 100644 index 0000000000..e1b51111f2 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.databricks.workspaces.yml @@ -0,0 +1,62 @@ +name: 'Databricks - Workspaces' + +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.databricks.workspaces.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Databricks/workspaces/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Databricks/workspaces' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.datafactory.factories.yml b/.azuredevops/modulePipelines/ms.datafactory.factories.yml new file mode 100644 index 0000000000..877c4b2e2a --- /dev/null +++ b/.azuredevops/modulePipelines/ms.datafactory.factories.yml @@ -0,0 +1,62 @@ +name: 'DataFactory - Factories' + +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.datafactory.factories.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.DataFactory/factories/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.DataFactory/factories' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.desktopvirtualization.applicationgroups.yml b/.azuredevops/modulePipelines/ms.desktopvirtualization.applicationgroups.yml new file mode 100644 index 0000000000..1a62e00938 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.desktopvirtualization.applicationgroups.yml @@ -0,0 +1,63 @@ +name: 'DesktopVirtualization - ApplicationGroups' + +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.desktopvirtualization.applicationgroups.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.DesktopVirtualization/applicationgroups/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.DesktopVirtualization/applicationgroups' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + - path: $(modulePath)/.parameters/parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.desktopvirtualization.hostpools.yml b/.azuredevops/modulePipelines/ms.desktopvirtualization.hostpools.yml new file mode 100644 index 0000000000..afa83c614b --- /dev/null +++ b/.azuredevops/modulePipelines/ms.desktopvirtualization.hostpools.yml @@ -0,0 +1,62 @@ +name: 'DesktopVirtualization - HostPools' + +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.desktopvirtualization.hostpools.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.DesktopVirtualization/hostpools/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.DesktopVirtualization/hostpools' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.desktopvirtualization.workspaces.yml b/.azuredevops/modulePipelines/ms.desktopvirtualization.workspaces.yml new file mode 100644 index 0000000000..fce79b94e2 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.desktopvirtualization.workspaces.yml @@ -0,0 +1,62 @@ +name: 'DesktopVirtualization - Workspaces' + +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.desktopvirtualization.workspaces.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.DesktopVirtualization/workspaces/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.DesktopVirtualization/workspaces' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.documentdb.databaseaccounts.yml b/.azuredevops/modulePipelines/ms.documentdb.databaseaccounts.yml new file mode 100644 index 0000000000..2f7efad7d0 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.documentdb.databaseaccounts.yml @@ -0,0 +1,64 @@ +name: 'DocumentDB - DatabaseAccounts' + +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.documentdb.databaseaccounts.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.DocumentDB/databaseAccounts/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.DocumentDB/databaseAccounts' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/mongodb.parameters.json + - path: $(modulePath)/.parameters/plain.parameters.json + - path: $(modulePath)/.parameters/sqldb.parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.eventgrid.topics.yml b/.azuredevops/modulePipelines/ms.eventgrid.topics.yml new file mode 100644 index 0000000000..08e4c8995e --- /dev/null +++ b/.azuredevops/modulePipelines/ms.eventgrid.topics.yml @@ -0,0 +1,62 @@ +name: 'EventGrid - Topics' + +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.eventgrid.topics.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.EventGrid/topics/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.EventGrid/topics' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.eventhub.namespaces.yml b/.azuredevops/modulePipelines/ms.eventhub.namespaces.yml new file mode 100644 index 0000000000..2262d57a9d --- /dev/null +++ b/.azuredevops/modulePipelines/ms.eventhub.namespaces.yml @@ -0,0 +1,63 @@ +name: 'EventHub - Namespaces' + +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.eventhub.namespaces.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.EventHub/namespaces/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.EventHub/namespaces' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + - path: $(modulePath)/.parameters/parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.healthbot.healthbots.yml b/.azuredevops/modulePipelines/ms.healthbot.healthbots.yml new file mode 100644 index 0000000000..d9fa80f662 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.healthbot.healthbots.yml @@ -0,0 +1,62 @@ +name: 'HealthBot - HealthBots' + +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.healthbot.healthbots.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.HealthBot/healthBots/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.HealthBot/healthBots' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.insights.actiongroups.yml b/.azuredevops/modulePipelines/ms.insights.actiongroups.yml new file mode 100644 index 0000000000..d767074fd3 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.insights.actiongroups.yml @@ -0,0 +1,62 @@ +name: 'Insights - ActionGroups' + +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.insights.actiongroups.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Insights/actionGroups/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Insights/actionGroups' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.insights.activitylogalerts.yml b/.azuredevops/modulePipelines/ms.insights.activitylogalerts.yml new file mode 100644 index 0000000000..cad6376c0d --- /dev/null +++ b/.azuredevops/modulePipelines/ms.insights.activitylogalerts.yml @@ -0,0 +1,62 @@ +name: 'Insights - ActivityLogAlerts' + +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.insights.activitylogalerts.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Insights/activityLogAlerts/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Insights/activityLogAlerts' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.insights.components.yml b/.azuredevops/modulePipelines/ms.insights.components.yml new file mode 100644 index 0000000000..d7edf12ba9 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.insights.components.yml @@ -0,0 +1,62 @@ +name: 'Insights - Components' + +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.insights.components.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Insights/components/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Insights/components' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.insights.diagnosticsettings.yml b/.azuredevops/modulePipelines/ms.insights.diagnosticsettings.yml new file mode 100644 index 0000000000..f6479273be --- /dev/null +++ b/.azuredevops/modulePipelines/ms.insights.diagnosticsettings.yml @@ -0,0 +1,62 @@ +name: 'Insights - DiagnosticSettings' + +parameters: + - name: removeDeployment + displayName: Remove deployed module + type: boolean + default: false # Needs custom removals script + - 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.insights.diagnosticsettings.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Insights/diagnosticSettings/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Insights/diagnosticSettings' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.insights.metricalerts.yml b/.azuredevops/modulePipelines/ms.insights.metricalerts.yml new file mode 100644 index 0000000000..6ba264ce34 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.insights.metricalerts.yml @@ -0,0 +1,62 @@ +name: 'Insights - MetricAlerts' + +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.insights.metricalerts.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Insights/metricAlerts/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Insights/metricAlerts' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.insights.privatelinkscopes.yml b/.azuredevops/modulePipelines/ms.insights.privatelinkscopes.yml new file mode 100644 index 0000000000..a86205bf4e --- /dev/null +++ b/.azuredevops/modulePipelines/ms.insights.privatelinkscopes.yml @@ -0,0 +1,62 @@ +name: 'Insights - PrivateLinkScopes' + +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.insights.privatelinkscopes.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Insights/privateLinkScopes/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Insights/privateLinkScopes' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.insights.scheduledqueryrules.yml b/.azuredevops/modulePipelines/ms.insights.scheduledqueryrules.yml new file mode 100644 index 0000000000..213d90ad53 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.insights.scheduledqueryrules.yml @@ -0,0 +1,62 @@ +name: 'Insights - ScheduledQueryRules' + +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.insights.scheduledqueryrules.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Insights/scheduledQueryRules/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Insights/scheduledQueryRules' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.keyvault.vaults.yml b/.azuredevops/modulePipelines/ms.keyvault.vaults.yml new file mode 100644 index 0000000000..0ac1346c69 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.keyvault.vaults.yml @@ -0,0 +1,63 @@ +name: 'KeyVault - Vaults' + +parameters: + - name: removeDeployment + displayName: Remove deployed module + type: boolean + default: false # Soft-delete prevents re-deployment + - 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.keyvault.vaults.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.KeyVault/vaults/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.KeyVault/vaults' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + - path: $(modulePath)/.parameters/parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.logic.workflows.yml b/.azuredevops/modulePipelines/ms.logic.workflows.yml new file mode 100644 index 0000000000..64efe446b9 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.logic.workflows.yml @@ -0,0 +1,62 @@ +name: 'Logic - Workflows' + +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.logic.workflows.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Logic/workflows/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Logic/workflows' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.machinelearningservices.workspaces.yml b/.azuredevops/modulePipelines/ms.machinelearningservices.workspaces.yml new file mode 100644 index 0000000000..0e6dcff465 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.machinelearningservices.workspaces.yml @@ -0,0 +1,62 @@ +name: 'MachineLearningServices - Workspaces' + +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.machinelearningservices.workspaces.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.MachineLearningServices/workspaces/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.MachineLearningServices/workspaces' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.managedidentity.userassignedidentities.yml b/.azuredevops/modulePipelines/ms.managedidentity.userassignedidentities.yml new file mode 100644 index 0000000000..2f8f5c2378 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.managedidentity.userassignedidentities.yml @@ -0,0 +1,62 @@ +name: 'ManagedIdentity - UserAssignedIdentities' + +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.managedidentity.userassignedidentities.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.ManagedIdentity/userAssignedIdentities/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.ManagedIdentity/userAssignedIdentities' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.managedservices.registrationdefinitions.yml b/.azuredevops/modulePipelines/ms.managedservices.registrationdefinitions.yml new file mode 100644 index 0000000000..882de3b1ea --- /dev/null +++ b/.azuredevops/modulePipelines/ms.managedservices.registrationdefinitions.yml @@ -0,0 +1,63 @@ +name: 'ManagedServices - RegistrationDefinitions' + +parameters: + - name: removeDeployment + displayName: Remove deployed module + type: boolean + default: false # Needs a custom removal script + - 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.managedservices.registrationdefinitions.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.ManagedServices/registrationDefinitions/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.ManagedServices/registrationDefinitions' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/parameters.json + - path: $(modulePath)/.parameters/rg.parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.management.managementgroups.yml b/.azuredevops/modulePipelines/ms.management.managementgroups.yml new file mode 100644 index 0000000000..007a7ea0ed --- /dev/null +++ b/.azuredevops/modulePipelines/ms.management.managementgroups.yml @@ -0,0 +1,62 @@ +name: 'Management - ManagementGroups' + +parameters: + - name: removeDeployment + displayName: Remove deployed module + type: boolean + default: false # Deployment does not support tags + - 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.management.managementgroups.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Management/managementGroups/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Management/managementGroups' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.netapp.netappaccounts.yml b/.azuredevops/modulePipelines/ms.netapp.netappaccounts.yml new file mode 100644 index 0000000000..555516b59b --- /dev/null +++ b/.azuredevops/modulePipelines/ms.netapp.netappaccounts.yml @@ -0,0 +1,64 @@ +name: 'NetApp - NetAppAccounts' + +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.netapp.netappaccounts.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.NetApp/netAppAccounts/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.NetApp/netAppAccounts' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + - path: $(modulePath)/.parameters/nfs3.parameters.json + - path: $(modulePath)/.parameters/nfs41.parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.applicationgateways.yml b/.azuredevops/modulePipelines/ms.network.applicationgateways.yml new file mode 100644 index 0000000000..c77531065d --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.applicationgateways.yml @@ -0,0 +1,62 @@ +name: 'Network - ApplicationGateways' + +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.network.applicationgateways.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/applicationGateways/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/applicationGateways' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.applicationsecuritygroups.yml b/.azuredevops/modulePipelines/ms.network.applicationsecuritygroups.yml new file mode 100644 index 0000000000..0a77c78142 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.applicationsecuritygroups.yml @@ -0,0 +1,62 @@ +name: 'Network - ApplicationSecurityGroups' + +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.network.applicationsecuritygroups.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/applicationSecurityGroups/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/applicationSecurityGroups' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.azurefirewalls.yml b/.azuredevops/modulePipelines/ms.network.azurefirewalls.yml new file mode 100644 index 0000000000..eec3c3e2ee --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.azurefirewalls.yml @@ -0,0 +1,62 @@ +name: 'Network - AzureFirewalls' + +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.network.azurefirewalls.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/azureFirewalls/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/azureFirewalls' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.bastionhosts.yml b/.azuredevops/modulePipelines/ms.network.bastionhosts.yml new file mode 100644 index 0000000000..0d005a2e32 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.bastionhosts.yml @@ -0,0 +1,63 @@ +name: 'Network - BastionHosts' + +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.network.bastionhosts.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/bastionHosts/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/bastionHosts' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + - path: $(modulePath)/.parameters/parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.connections.yml b/.azuredevops/modulePipelines/ms.network.connections.yml new file mode 100644 index 0000000000..e7e5ac3afd --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.connections.yml @@ -0,0 +1,62 @@ +name: 'Network - Connections' + +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.network.connections.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/connections/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/connections' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.ddosprotectionplans.yml b/.azuredevops/modulePipelines/ms.network.ddosprotectionplans.yml new file mode 100644 index 0000000000..e55bca2a98 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.ddosprotectionplans.yml @@ -0,0 +1,62 @@ +name: 'Network - DdosProtectionPlans' + +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.network.ddosprotectionplans.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/ddosProtectionPlans/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/ddosProtectionPlans' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.expressroutecircuits.yml b/.azuredevops/modulePipelines/ms.network.expressroutecircuits.yml new file mode 100644 index 0000000000..cef1ccdcee --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.expressroutecircuits.yml @@ -0,0 +1,62 @@ +name: 'Network - ExpressRouteCircuits' + +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.network.expressroutecircuits.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/expressRouteCircuits/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/expressRouteCircuits' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.ipgroups.yml b/.azuredevops/modulePipelines/ms.network.ipgroups.yml new file mode 100644 index 0000000000..7538f14d2d --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.ipgroups.yml @@ -0,0 +1,62 @@ +name: 'Network - IpGroups' + +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.network.ipgroups.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/ipGroups/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/ipGroups' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.loadbalancers.yml b/.azuredevops/modulePipelines/ms.network.loadbalancers.yml new file mode 100644 index 0000000000..6f25287269 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.loadbalancers.yml @@ -0,0 +1,62 @@ +name: 'Network - LoadBalancers' + +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.network.loadbalancers.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/loadBalancers/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/loadBalancers' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.localnetworkgateways.yml b/.azuredevops/modulePipelines/ms.network.localnetworkgateways.yml new file mode 100644 index 0000000000..fc981ac91a --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.localnetworkgateways.yml @@ -0,0 +1,62 @@ +name: 'Network - LocalNetworkGateways' + +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.network.localnetworkgateways.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/localNetworkGateways/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/localNetworkGateways' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.natgateways.yml b/.azuredevops/modulePipelines/ms.network.natgateways.yml new file mode 100644 index 0000000000..adb71c15ea --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.natgateways.yml @@ -0,0 +1,62 @@ +name: 'Network - NatGateways' + +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.network.natgateways.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/natGateways/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/natGateways' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.networksecuritygroups.yml b/.azuredevops/modulePipelines/ms.network.networksecuritygroups.yml new file mode 100644 index 0000000000..9d0881dbc7 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.networksecuritygroups.yml @@ -0,0 +1,62 @@ +name: 'Network - NetworkSecurityGroups' + +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.network.networksecuritygroups.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/networkSecurityGroups/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/networkSecurityGroups' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.networkwatchers.yml b/.azuredevops/modulePipelines/ms.network.networkwatchers.yml new file mode 100644 index 0000000000..3b525b581f --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.networkwatchers.yml @@ -0,0 +1,63 @@ +name: 'Network - NetworkWatchers' + +parameters: + - name: removeDeployment + displayName: Remove deployed module + type: boolean + default: false # Required as a dependency + Only one Network Watcher can exist in the same location. If removed, a default would be created in a dedicated RG + - 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.network.networkwatchers.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/networkWatchers/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/networkWatchers' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + - path: $(modulePath)/.parameters/parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.privatednszones.yml b/.azuredevops/modulePipelines/ms.network.privatednszones.yml new file mode 100644 index 0000000000..0bb013e5f8 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.privatednszones.yml @@ -0,0 +1,62 @@ +name: 'Network - PrivateDnsZones' + +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.network.privatednszones.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/privateDnsZones/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/privateDnsZones' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.privateendpoints.yml b/.azuredevops/modulePipelines/ms.network.privateendpoints.yml new file mode 100644 index 0000000000..b9e86be65f --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.privateendpoints.yml @@ -0,0 +1,63 @@ +name: 'Network - PrivateEndpoints' + +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.network.privateendpoints.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/privateEndpoints/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/privateEndpoints' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + - path: $(modulePath)/.parameters/parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.publicipaddresses.yml b/.azuredevops/modulePipelines/ms.network.publicipaddresses.yml new file mode 100644 index 0000000000..badcb417ac --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.publicipaddresses.yml @@ -0,0 +1,62 @@ +name: 'Network - PublicIpAddresses' + +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.network.publicipaddresses.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/publicIPAddresses/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/publicIPAddresses' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.publicipprefixes.yml b/.azuredevops/modulePipelines/ms.network.publicipprefixes.yml new file mode 100644 index 0000000000..ee3ae3d98a --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.publicipprefixes.yml @@ -0,0 +1,62 @@ +name: 'Network - PublicIpPrefixes' + +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.network.publicipprefixes.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/publicIPPrefixes/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/publicIPPrefixes' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.routetables.yml b/.azuredevops/modulePipelines/ms.network.routetables.yml new file mode 100644 index 0000000000..8dfd82292c --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.routetables.yml @@ -0,0 +1,62 @@ +name: 'Network - RouteTables' + +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.network.routetables.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/routeTables/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/routeTables' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.trafficmanagerprofiles.yml b/.azuredevops/modulePipelines/ms.network.trafficmanagerprofiles.yml new file mode 100644 index 0000000000..80e7d38df7 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.trafficmanagerprofiles.yml @@ -0,0 +1,62 @@ +name: 'Network - TrafficManagerProfiles' + +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.network.trafficmanagerprofiles.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/trafficmanagerprofiles/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/trafficmanagerprofiles' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.virtualnetworkgateways.yml b/.azuredevops/modulePipelines/ms.network.virtualnetworkgateways.yml new file mode 100644 index 0000000000..859dbced39 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.virtualnetworkgateways.yml @@ -0,0 +1,63 @@ +name: 'Network - VirtualNetworkGateways' + +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.network.virtualnetworkgateways.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/virtualNetworkGateways/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/virtualNetworkGateways' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/expressRoute.parameters.json + - path: $(modulePath)/.parameters/vpn.parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.virtualnetworks.yml b/.azuredevops/modulePipelines/ms.network.virtualnetworks.yml new file mode 100644 index 0000000000..8e4af17fc0 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.virtualnetworks.yml @@ -0,0 +1,63 @@ +name: 'Network - VirtualNetworks' + +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.network.virtualnetworks.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/virtualNetworks/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/virtualNetworks' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/parameters.json + - path: $(modulePath)/.parameters/vnetPeering.parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.network.virtualwans.yml b/.azuredevops/modulePipelines/ms.network.virtualwans.yml new file mode 100644 index 0000000000..fab75d09d2 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.network.virtualwans.yml @@ -0,0 +1,62 @@ +name: 'Network - VirtualWans' + +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.network.virtualwans.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Network/virtualWans/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Network/virtualWans' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.operationalinsights.workspaces.yml b/.azuredevops/modulePipelines/ms.operationalinsights.workspaces.yml new file mode 100644 index 0000000000..b941e93f5f --- /dev/null +++ b/.azuredevops/modulePipelines/ms.operationalinsights.workspaces.yml @@ -0,0 +1,63 @@ +name: 'OperationalInsights - Workspaces' + +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.operationalinsights.workspaces.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.OperationalInsights/workspaces/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.OperationalInsights/workspaces' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + - path: $(modulePath)/.parameters/parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.recoveryservices.vaults.yml b/.azuredevops/modulePipelines/ms.recoveryservices.vaults.yml new file mode 100644 index 0000000000..ef1ebcabf2 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.recoveryservices.vaults.yml @@ -0,0 +1,62 @@ +name: 'RecoveryServices - Vaults' + +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.recoveryservices.vaults.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.RecoveryServices/vaults/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.RecoveryServices/vaults' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.resources.deploymentscripts.yml b/.azuredevops/modulePipelines/ms.resources.deploymentscripts.yml new file mode 100644 index 0000000000..8d4733592b --- /dev/null +++ b/.azuredevops/modulePipelines/ms.resources.deploymentscripts.yml @@ -0,0 +1,62 @@ +name: 'Resources - DeploymentScripts' + +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.resources.deploymentscripts.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Resources/deploymentScripts/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Resources/deploymentScripts' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.resources.resourcegroups.yml b/.azuredevops/modulePipelines/ms.resources.resourcegroups.yml new file mode 100644 index 0000000000..4f98a5ec58 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.resources.resourcegroups.yml @@ -0,0 +1,62 @@ +name: 'Resources - ResourceGroups' + +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.resources.resourcegroups.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Resources/resourceGroups/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Resources/resourceGroups' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.security.azuresecuritycenter.yml b/.azuredevops/modulePipelines/ms.security.azuresecuritycenter.yml new file mode 100644 index 0000000000..302b62963f --- /dev/null +++ b/.azuredevops/modulePipelines/ms.security.azuresecuritycenter.yml @@ -0,0 +1,62 @@ +name: 'Security - AzureSecurityCenter' + +parameters: + - name: removeDeployment + displayName: Remove deployed module + type: boolean + default: false # Needs custom removals script + - 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.security.azuresecuritycenter.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Security/azureSecurityCenter/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Security/azureSecurityCenter' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.servicebus.namespaces.yml b/.azuredevops/modulePipelines/ms.servicebus.namespaces.yml new file mode 100644 index 0000000000..18a22a829e --- /dev/null +++ b/.azuredevops/modulePipelines/ms.servicebus.namespaces.yml @@ -0,0 +1,63 @@ +name: 'ServiceBus - Namespaces' + +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.servicebus.namespaces.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.ServiceBus/namespaces/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.ServiceBus/namespaces' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + - path: $(modulePath)/.parameters/parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.sql.managedinstances.yml b/.azuredevops/modulePipelines/ms.sql.managedinstances.yml new file mode 100644 index 0000000000..9ad4e5a8c0 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.sql.managedinstances.yml @@ -0,0 +1,63 @@ +name: 'Sql - ManagedInstances' + +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.sql.managedinstances.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Sql/managedInstances/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Sql/managedInstances' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/parameters.json + defaultJobTimeoutInMinutes: 360 + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.sql.servers.yml b/.azuredevops/modulePipelines/ms.sql.servers.yml new file mode 100644 index 0000000000..88855325bb --- /dev/null +++ b/.azuredevops/modulePipelines/ms.sql.servers.yml @@ -0,0 +1,62 @@ +name: 'Sql - Servers' + +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.sql.servers.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Sql/servers/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Sql/servers' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.storage.storageaccounts.yml b/.azuredevops/modulePipelines/ms.storage.storageaccounts.yml new file mode 100644 index 0000000000..8869d678e8 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.storage.storageaccounts.yml @@ -0,0 +1,64 @@ +name: 'Storage - StorageAccounts' + +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.storage.storageaccounts.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Storage/storageAccounts/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Storage/storageAccounts' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/min.parameters.json + - path: $(modulePath)/.parameters/parameters.json + - path: $(modulePath)/.parameters/v1.parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.virtualmachineimages.imagetemplates.yml b/.azuredevops/modulePipelines/ms.virtualmachineimages.imagetemplates.yml new file mode 100644 index 0000000000..0ff785ac20 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.virtualmachineimages.imagetemplates.yml @@ -0,0 +1,62 @@ +name: 'VirtualMachineImages - ImageTemplates' + +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.virtualmachineimages.imagetemplates.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.VirtualMachineImages/imageTemplates/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.VirtualMachineImages/imageTemplates' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.web.connections.yml b/.azuredevops/modulePipelines/ms.web.connections.yml new file mode 100644 index 0000000000..d4b7ed0496 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.web.connections.yml @@ -0,0 +1,62 @@ +name: 'Web - Connections' + +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.web.connections.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Web/connections/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Web/connections' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.web.hostingenvironments.yml b/.azuredevops/modulePipelines/ms.web.hostingenvironments.yml new file mode 100644 index 0000000000..fac295ca78 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.web.hostingenvironments.yml @@ -0,0 +1,62 @@ +name: 'Web - HostingEnvironments' + +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.web.hostingenvironments.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Web/hostingEnvironments/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Web/hostingEnvironments' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.web.serverfarms.yml b/.azuredevops/modulePipelines/ms.web.serverfarms.yml new file mode 100644 index 0000000000..19fa310daf --- /dev/null +++ b/.azuredevops/modulePipelines/ms.web.serverfarms.yml @@ -0,0 +1,62 @@ +name: 'Web - Serverfarms' + +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.web.serverfarms.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Web/serverfarms/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Web/serverfarms' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.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/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/modulePipelines/ms.web.sites.yml b/.azuredevops/modulePipelines/ms.web.sites.yml new file mode 100644 index 0000000000..d4944df4a1 --- /dev/null +++ b/.azuredevops/modulePipelines/ms.web.sites.yml @@ -0,0 +1,65 @@ +name: 'Web - Sites' + +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.web.sites.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.Web/sites/*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.Web/sites' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + - path: $(modulePath)/.parameters/fa.min.parameters.json + - path: $(modulePath)/.parameters/fa.parameters.json + - path: $(modulePath)/.parameters/wa.min.parameters.json + - path: $(modulePath)/.parameters/wa.parameters.json + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/.azuredevops/pipelineTemplates/module.jobs.deploy.yml b/.azuredevops/pipelineTemplates/module.jobs.deploy.yml new file mode 100644 index 0000000000..275b2c7400 --- /dev/null +++ b/.azuredevops/pipelineTemplates/module.jobs.deploy.yml @@ -0,0 +1,302 @@ +######################################################### +## DEPLOYMENT PIPELINE ## +######################################################### +## +## This pipeline template contains the logic to deploy a given module's ARM template using the provided parameter file(s) +## +## Enabled levels of deployment +## - Resource-Group-Level +## - Subscription-Level +## - Management-Group-Level +## - Tenant-Level +## +######################################################## +## +##---------------------------------------------## +## TEMPLATE PARAMETERS ## +##---------------------------------------------## +## +## By default it uses the variables specified in the below [parameters] section. However, you can overwrite these variables in the +## referencing pipeline by providing the parameter explicitly. +## +## NOTE: If you don't need to overwrite a shared value, you can IGNORE this section +## +## |=================================================================================================================================================================================================================================| +## | Parameter | Default Value | Description | Example | +## |---------------------------------|--------------------------------------|-----------------------------------------------------------------------------------------------------------|--------------------------------------------| +## | serviceConnection | '$(serviceConnection)' | The service connection that connects to Azure | 'demo-internal' | +## | removeDeployment | '$(removeDeployment)' | Set to [true] to flag resource for removal. If not provided, defaults to false. | 'true' | +## | poolName | '$(poolName)' | You can provide either a [poolname] or [vmImage] to run the job on | 'Custom Deployment Pool' | +## | vmImage | '$(vmImage)' | You can provide either a [poolname] or [vmImage] to run the job on | 'ubuntu20.04' | +## | defaultJobTimeoutInMinutes | 120 | The timeout for the job in this pipeline | 120 | +## | checkoutRepositories | '' | An optional list of repositories to check out at the beginning of this job in addition to the source | 'Components' | +## | modulePath | '$(modulePath)' | The path to the module to deploy. E.g. [c:/KeyVault] | 'c:/KeyVault' | +## | deploymentBlocks | | The parameter file(s) to deploy with. Must be provided | path: 'C:/parameters.json' | +## | location | '$(defaultLocation)' | The location to deploy with | 'EastUs2' | +## | resourceGroupName | '$(defaultResourceGroupName)' | The resourcegroup to deploy into. Required only for Resource-Group-Level deployments | 'validation-rg' | +## | subscriptionId | '$(ARM_SUBSCRIPTION_ID)' | The id of the subscription to deploy into when using a Management group service connection | 'aed7c000-6387-412e-bed0-24dfddf4bbc6' | +## | managementGroupId | '$(ARM_MGMTGROUP_ID)' | The id of the management group to deploy into. Required only for Management-Group-Level deployments | '6ycc9620-cb01-454f-9ebc-fc6b1df48d64' | +## | parametersRepository | '$(Build.Repository.Name)' | The respository with the parameter files. Defaults to the triggering repository | 'Solutions' | +## | modulesRepository | '$(modulesRepository)' | The respository with the modules. | 'Components' | +## | azurePowerShellVersion | '$(azurePowerShellVersion)' | Used for configuring the Azure PowerShellModules Version, one of the example values. | 'latestVersion' or 'OtherVersion' | +## | preferredAzurePowerShellVersion | '$(preferredAzurePowerShellVersion)' | Used for configuring the Azure PowerShellModules Version, either an empty string or the specific version. | '4.4.0' | +## |=================================================================================================================================================================================================================================| +## +##---------------------------------------------## + +parameters: + # Pipeline-related parameters + serviceConnection: '$(serviceConnection)' + poolName: '$(poolName)' + vmImage: '$(vmImage)' + defaultJobTimeoutInMinutes: 120 + checkoutRepositories: '' + dependsOn: [] + # Logic-related parameters + removeDeployment: false + modulePath: '$(modulePath)' + deploymentBlocks: '' + location: '$(defaultLocation)' + resourceGroupName: '$(defaultResourceGroupName)' + subscriptionId: '$(ARM_SUBSCRIPTION_ID)' + managementGroupId: '$(ARM_MGMTGROUP_ID)' + parametersRepository: '$(Build.Repository.Name)' + modulesRepository: '$(modulesRepository)' + # Azure PowerShell Version parameters + azurePowerShellVersion: '$(azurePowerShellVersion)' + preferredAzurePowerShellVersion: '$(preferredAzurePowerShellVersion)' + +##---------------------------------------------## +## TEMPLATE LOGIC ## +##---------------------------------------------## + +jobs: + - ${{ each deploymentBlock in parameters.deploymentBlocks }}: + - job: ${{ deploymentBlock.jobName }} + + ${{ if ne( deploymentBlock.displayName, '') }}: + displayName: ${{ deploymentBlock.displayName }} + ${{ if eq( deploymentBlock.displayName, '') }}: + displayName: Deploy with [${{ replace( deploymentBlock.path, '$(modulePath)', '') }}] + timeoutInMinutes: ${{ parameters.defaultJobTimeoutInMinutes }} + ${{ if ne( parameters.dependsOn, '') }}: + dependsOn: ${{ parameters.dependsOn }} + pool: + ${{ if ne(parameters.vmImage, '') }}: + vmImage: ${{ parameters.vmImage }} + ${{ if ne(parameters.poolName, '') }}: + name: ${{ parameters.poolName }} + + steps: + # [Checkout Repositories] task(s) + #-------------------------------- + - checkout: self + - ${{ if ne(parameters.checkoutRepositories, '') }}: + - ? ${{ each checkoutRepository in parameters.checkoutRepositories }} + : - checkout: ${{ checkoutRepository }} + fetchDepth: 1 # the depth of commits to ask Git to fetch; if not set defaults to no limit + path: 's/${{ checkoutRepository }}' + + # [Agent] Prepare environment + #---------------------------- + - task: PowerShell@2 + displayName: 'Setup agent' + inputs: + targetType: inline + pwsh: true + script: | + # Load used functions + . (Join-Path '$(System.DefaultWorkingDirectory)' 'utilities' 'pipelines' 'sharedScripts' 'Set-EnvironmentOnAgent.ps1') + + # Set agent up + Set-EnvironmentOnAgent + + # [Multi Repo] Support task + #-------------------------- + - task: PowerShell@2 + displayName: Handle Multi-Repo Invocation + inputs: + targetType: inline + pwsh: true + script: | + # Handle multiple-repositories + if( "${{ join(';',parameters.checkoutRepositories) }}".length -gt 0) { + Write-Verbose "Multi-Repo Checkout" -Verbose + $moduleRepoRoot = Join-Path '$(System.DefaultWorkingDirectory)' '$(modulesRepository)' + $parametersRepoRoot = Join-Path '$(System.DefaultWorkingDirectory)' '${{ parameters.parametersRepository }}' + } else { + Write-Verbose "No Multi-Repo Checkout" -Verbose + $moduleRepoRoot = '$(System.DefaultWorkingDirectory)' + $parametersRepoRoot = '$(System.DefaultWorkingDirectory)' + } + Write-Host "##vso[task.setvariable variable=ModuleRepoRoot]$moduleRepoRoot" + Write-Host "##vso[task.setvariable variable=parametersRepoRoot]$parametersRepoRoot" + + # [Agent] Replace tokens + #----------------------- + - task: AzurePowerShell@5 + displayName: 'Replace Tokens [${{ deploymentBlock.path }}] via connection [${{ parameters.serviceConnection }}]' + inputs: + azureSubscription: ${{ parameters.serviceConnection }} + azurePowerShellVersion: ${{ parameters.azurePowerShellVersion }} + preferredAzurePowerShellVersion: ${{ parameters.preferredAzurePowerShellVersion }} + ScriptType: InlineScript + pwsh: true + inline: | + # Load used functions + . (Join-Path '$(moduleRepoRoot)' 'utilities' 'pipelines' 'tokensReplacement' 'Convert-TokensInParameterFile.ps1') + + # Load Settings File + $Settings = Get-Content -Path (Join-Path '$(moduleRepoRoot)' 'settings.json') | ConvertFrom-Json + + # Initialize Default Parameter File Tokens + $DefaultParameterFileTokens = @( + @{ Name = 'resourceGroupName'; Value = '${{ parameters.resourceGroupName }}' } + @{ Name = 'subscriptionId'; Value = '${{ parameters.subscriptionId }}' } + @{ Name = 'managementGroupId'; Value = '${{ parameters.managementGroupId }}' } + @{ Name = "tenantId"; Value = '$(ARM_TENANT_ID)' } + @{ Name = "deploymentSpId"; Value = '$(DEPLOYMENT_SP_ID)' } + ) | ForEach-Object { [PSCustomObject]$PSItem } + + # Construct Token Function Input + $ConvertTokensInputs = @{ + ParameterFilePath = Join-Path '$(parametersRepoRoot)' '${{ deploymentBlock.path }}' + DefaultParameterFileTokens = $DefaultParameterFileTokens + LocalCustomParameterFileTokens = $Settings.parameterFileTokens.localTokens.tokens + TokenPrefix = $Settings.parameterFileTokens.tokenPrefix + TokenSuffix = $Settings.parameterFileTokens.tokenSuffix + } + # Invoke Token Replacement Functionality + $null = Convert-TokensInParameterFile @ConvertTokensInputs -Verbose + + # [Validation] task(s) + #--------------------- + - task: AzurePowerShell@5 + displayName: 'Validate [${{ deploymentBlock.path }}] via connection [${{ parameters.serviceConnection }}]' + inputs: + azureSubscription: ${{ parameters.serviceConnection }} + azurePowerShellVersion: ${{ parameters.azurePowerShellVersion }} + preferredAzurePowerShellVersion: ${{ parameters.preferredAzurePowerShellVersion }} + ScriptType: InlineScript + pwsh: true + inline: | + # Load used functions + . (Join-Path '$(moduleRepoRoot)' '$(pipelineFunctionsPath)' 'resourceValidation' 'Test-TemplateWithParameterFile.ps1') + + if(-not [String]::IsNullOrEmpty('${{ deploymentBlock.templateFilePath }}')) { + $templateFilePath = Join-Path '$(moduleRepoRoot)' '${{ deploymentBlock.templateFilePath }}' + } else { + # Use default path + $templateFilePath = (Test-Path (Join-Path '$(ModuleRepoRoot)' '$(modulePath)' 'deploy.bicep')) ? + (Join-Path '$(ModuleRepoRoot)' '$(modulePath)' 'deploy.bicep') : + (Join-Path '$(ModuleRepoRoot)' '$(modulePath)' 'deploy.json') + } + + # ----------- # + # INVOKE TEST # + # ----------- # + $functionInput = @{ + templateFilePath = $templateFilePath + parameterFilePath = Join-Path '$(ParametersRepoRoot)' '${{ deploymentBlock.path }}' + location = '${{ parameters.location }}' + resourceGroupName = '${{ parameters.resourceGroupName }}' + subscriptionId = '${{ parameters.subscriptionId }}' + managementGroupId = '${{ parameters.managementGroupId }}' + } + + Write-Verbose "Invoke task with" -Verbose + Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose + + Test-TemplateWithParameterFile @functionInput -Verbose + + # [Deployment] task(s) + #--------------------- + - task: AzurePowerShell@5 + displayName: 'Deploy [${{ deploymentBlock.path }}] via connection [${{ parameters.serviceConnection }}]' + inputs: + azureSubscription: ${{ parameters.serviceConnection }} + azurePowerShellVersion: ${{ parameters.azurePowerShellVersion }} + preferredAzurePowerShellVersion: ${{ parameters.preferredAzurePowerShellVersion }} + pwsh: true + ScriptType: InlineScript + inline: | + # Load used functions + . (Join-Path '$(moduleRepoRoot)' '$(pipelineFunctionsPath)' 'resourceDeployment' 'New-ModuleDeployment.ps1') + + if(-not [String]::IsNullOrEmpty('${{ deploymentBlock.templateFilePath }}')) { + $templateFilePath = Join-Path '$(moduleRepoRoot)' '${{ deploymentBlock.templateFilePath }}' + } else { + # Use default path + $templateFilePath = (Test-Path (Join-Path '$(ModuleRepoRoot)' '$(modulePath)' 'deploy.bicep')) ? + (Join-Path '$(ModuleRepoRoot)' '$(modulePath)' 'deploy.bicep') : + (Join-Path '$(ModuleRepoRoot)' '$(modulePath)' 'deploy.json') + } + + # ----------------- # + # INVOKE DEPLOYMENT # + # ----------------- # + $functionInput = @{ + templateFilePath = $templateFilePath + parameterFilePath = Join-Path '$(parametersRepoRoot)' '${{ deploymentBlock.path }}' + location = '${{ parameters.location }}' + resourceGroupName = '${{ parameters.resourceGroupName }}' + subscriptionId = '${{ parameters.subscriptionId }}' + managementGroupId = '${{ parameters.managementGroupId }}' + doNotThrow = $true + } + + Write-Verbose "Invoke task with" -Verbose + Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose + + # Invoke deployment + $res = New-ModuleDeployment @functionInput -Verbose + + # Get deployment name + Write-Host ('##vso[task.setvariable variable=deploymentName]{0}' -f $res.deploymentName) + + # Populate further outputs + foreach ($outputKey in $res.deploymentOutput.Keys) { + Write-Output ('##vso[task.setvariable variable={0}]{1}' -f $outputKey, $res.deploymentOutput[$outputKey].Value) + } + + if ($res.ContainsKey('exception')) { + # Happens only if there is an exception + throw $res.exception + } + + # [Removal] task(s) + #------------------ + - task: AzurePowerShell@5 + displayName: 'Remove deployed resources via [${{ parameters.serviceConnection }}]' + condition: and(eq( '${{ parameters.removeDeployment }}', 'true'), not(eq(variables['deploymentName'],''))) + inputs: + azureSubscription: ${{ parameters.serviceConnection }} + azurePowerShellVersion: ${{ parameters.azurePowerShellVersion }} + preferredAzurePowerShellVersion: ${{ parameters.preferredAzurePowerShellVersion }} + ScriptType: InlineScript + failOnStandardError: false + pwsh: true + inline: | + # Load used function + . (Join-Path '$(moduleRepoRoot)' '$(pipelineFunctionsPath)' 'resourceRemoval' 'Remove-DeployedModule.ps1') + + if(-not [String]::IsNullOrEmpty('${{ deploymentBlock.templateFilePath }}')) { + $templateFilePath = Join-Path '$(moduleRepoRoot)' '${{ deploymentBlock.templateFilePath }}' + } else { + # Use default path + $templateFilePath = (Test-Path (Join-Path '$(ModuleRepoRoot)' '$(modulePath)' 'deploy.bicep')) ? + (Join-Path '$(ModuleRepoRoot)' '$(modulePath)' 'deploy.bicep') : + (Join-Path '$(ModuleRepoRoot)' '$(modulePath)' 'deploy.json') + } + + $functionInput = @{ + deploymentName = '$(deploymentName)' + templateFilePath = $templateFilePath + resourceGroupName = '${{ parameters.resourceGroupName }}' + verbose = $true + } + + Write-Verbose 'Invoke task with' -Verbose + Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose + + Remove-DeployedModule @functionInput diff --git a/.azuredevops/pipelineTemplates/module.jobs.publish.yml b/.azuredevops/pipelineTemplates/module.jobs.publish.yml new file mode 100644 index 0000000000..2bbb8f6245 --- /dev/null +++ b/.azuredevops/pipelineTemplates/module.jobs.publish.yml @@ -0,0 +1,251 @@ +######################################################### +## PUBLISH PIPELINE ## +######################################################### +## +## This pipeline template contains the logic to publish module data as +## - A build artifact and/or +## - As a new version to a given storage account and/or +## - As a new version as an UniversalPackage to a given artifact-feed +## +######################################################### + +##---------------------------------------------## +## TEMPLATE PARAMETERS ## +##---------------------------------------------## +## +## By default it uses the variables specified in the below [parameters] section. However, you can overwrite these variables in the +## referencing pipeline by providing the paramater explicitly. +## +## NOTE: If you don't need to overwrite a shared value, you can IGNORE this section +## +## |==================================================================================================================================================================================================================| +## | Parameter | Default Value | Description | Example | +## |---------------------------------|--------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------| +## | displayName | 'Publish module' | Name for the pipeline job | 'Publish KeyVault' | +## | serviceConnection | '$(serviceConnection)' | The service connection that connects to Azure | 'demo-internal' | +## | poolName | '$(poolName)' | You can provide either a [poolname] or [vmImage] to run the job on | 'Custom Deployment Pool' | +## | vmImage | '$(vmImage)' | You can provide either a [poolname] or [vmImage] to run the job on | 'ubuntu20.04' | +## | defaultJobTimeoutInMinutes | 120 | The timeout for the job in this pipeline | 120 | +## | versionOption | '$(versionOption)' | The mode to handle the version increments [major|minor|patch|custom]. | 'patch' | +## | moduleVersion | '$(moduleVersion)' | The version to enforce if [versionOption] is set to [custom] | '1.0.0' | +## | modulePath | '$(modulePath)' | The path to the module to deploy. E.g. [c:/KeyVault] | 'c:/KeyVault' | +## | templateSpecsRGName | '$(templateSpecsRGName)' | Required to publish to template spec. ResourceGroup of the template spec to publish to | 'mgmt-rg' | +## | templateSpecsRGLocation | '$(templateSpecsRGLocation)' | Required to publish to template spec. Location of the template spec resource group | 'West Europe' | +## | templateSpecsDescription | '$(templateSpecsDescription)' | Required to publish to template spec. Description of the template spec to publish to | 'IaCs module' | +## | vstsFeedName | '$(vstsFeedName)' | Required to publish to a DevOps feed. Name to the feed to publish to. | 'modules' | +## | vstsProject | '$(System.TeamProject)' | Required to publish to a DevOps feed. Name of the project hosting the artifacts feed. May be empty. | 'iacs' | +## | bicepRegistryName | '$(bicepRegistryName)' | Required to publish to the private bicep registry. Name of the hosting container registry | 'adpsxxazacrx001' | +## | bicepRegistryRGName | '$(bicepRegistryRGName)' | Required to publish to the private bicep registry. Resource group of the hosting container registry | 'artifacts-rg' | +## | vstsOrganization | '$(vstsOrganization)' | Required to publish to a DevOps feed. Name of the organization hosting the artifacts feed. | 'servicescode' | +## | azurePowerShellVersion | '$(azurePowerShellVersion)' | Used for configuring the Azure PowerShell Version, one of the example values. | 'latestVersion' or 'OtherVersion' | +## | preferredAzurePowerShellVersion | '$(preferredAzurePowerShellVersion)' | Used for configuring the Azure PowerShell Version, either an empty string or specific version. | '4.4.0' | +## |==================================================================================================================================================================================================================| +## +##---------------------------------------------## + +parameters: + # Pipeline-related parameters + checkoutRepositories: '' + displayName: 'Publish module' + serviceConnection: '$(serviceConnection)' + poolName: '$(poolName)' + vmImage: '$(vmImage)' + defaultJobTimeoutInMinutes: 120 + modulesRepository: '$(modulesRepository)' + + # Logic-related parameters + ## Module-related + versionOption: '$(versionOption)' + moduleVersion: '$(moduleVersion)' + modulePath: '$(modulePath)' + + ## TemplateSpec-related + templateSpecsRGName: '$(templateSpecsRGName)' + templateSpecsRGLocation: '$(templateSpecsRGLocation)' + templateSpecsDescription: '$(templateSpecsDescription)' + + ## Artifact-Feed-related + vstsFeedName: '$(vstsFeedName)' + vstsProject: '$(System.TeamProject)' + vstsOrganization: '$(vstsOrganization)' + + ## Private-Bicep-Registry-related + bicepRegistryName: '$(bicepRegistryName)' + bicepRegistryRGName: '$(bicepRegistryRGName)' + +##---------------------------------------------## +## TEMPLATE LOGIC ## +##---------------------------------------------## +jobs: + - job: + displayName: ${{ parameters.displayName }} + timeoutInMinutes: ${{ parameters.defaultJobTimeoutInMinutes }} + pool: + ${{ if ne(parameters.vmImage, '') }}: + vmImage: ${{ parameters.vmImage }} + ${{ if ne(parameters.poolName, '') }}: + name: ${{ parameters.poolName }} + steps: + # [Checkout Repositories] task(s) + #-------------------------------- + - checkout: self + - ${{ if ne(parameters.checkoutRepositories, '') }}: + - ${{ each checkoutRepository in parameters.checkoutRepositories }}: + - checkout: ${{ checkoutRepository }} + fetchDepth: 1 # the depth of commits to ask Git to fetch; if not set defaults to no limit + path: 's/${{ checkoutRepository }}' + + # [Agent] Prepare environment + #---------------------------- + - task: PowerShell@2 + displayName: 'Setup agent' + inputs: + targetType: inline + pwsh: true + script: | + # Load used functions + . (Join-Path '$(System.DefaultWorkingDirectory)' 'utilities' 'pipelines' 'sharedScripts' 'Set-EnvironmentOnAgent.ps1') + + # Set agent up + Set-EnvironmentOnAgent + + # [Multi Repo] Support task + #-------------------------- + - task: PowerShell@2 + displayName: Handle Multi-Repo Invocation + inputs: + targetType: inline + pwsh: true + script: | + # ---------------------------- # + # HANDLE MULTI-REPO INVOCATION # + # ---------------------------- # + + # Handle multiple-repositories + if( "${{ join(';',parameters.checkoutRepositories) }}".length -gt 0) { + Write-Verbose "Multi-Repo Checkout" -Verbose + $modulePath = Join-Path '$(System.DefaultWorkingDirectory)' '$(modulesRepository)' '${{ parameters.modulePath }}' + } else { + Write-Verbose "No Multi-Repo Checkout" -Verbose + $modulePath = Join-Path '$(System.DefaultWorkingDirectory)' '${{ parameters.modulePath }}' + } + Write-Host "##vso[task.setvariable variable=ENVMODULEPATH]$modulePath" + + # [Universal Artifact-feed publish] task(s) + #------------------------------------------ + - powershell: | + # Load used functions + . (Join-Path '$(System.DefaultWorkingDirectory)' '$(pipelineFunctionsPath)' 'resourcePublish' 'Initialize-UniversalArtifactPublish.ps1') + + $functionInput = @{ + templateFilePath = Join-Path '$(ENVMODULEPATH)' 'deploy.bicep' + vstsOrganization = '${{ parameters.vstsOrganization }}' + vstsProject = '${{ parameters.vstsProject }}' + vstsFeedName = '${{ parameters.vstsFeedName }}' + customVersion = '${{ parameters.customVersion }}' + versioningOption = '${{ parameters.versioningOption }}' + } + + Write-Verbose "Invoke task with" -Verbose + Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose + + $output = Initialize-UniversalArtifactPublish @functionInput -Verbose + + # Write output value(s) into pipeline environment + $output.Keys | ForEach-Object { + Write-Host ("Publishing variable [{0}] with value [{1}] to pipeline environment" -f $_, $output[$_]) + Write-Host ("##vso[task.setVariable variable={0}]{1}" -f $_, $output[$_]) + } + displayName: 'Prepare publish to artifacts feed' + condition: and( + eq(variables['artifactsFeedDoPublish'], true), + succeeded() + ) + enabled: true + env: + TOKEN: $(system.accesstoken) + + - task: UniversalPackages@0 + condition: and( + eq(variables['artifactsFeedDoPublish'], true), + succeeded() + ) + displayName: Publish Universal Package + inputs: + command: publish + publishDirectory: '$(ENVMODULEPATH)' + ${{ if eq(parameters.vstsProject, '') }}: + vstsFeedPublish: '${{ parameters.vstsFeedName }}' + ${{ if ne(parameters.vstsProject, '') }}: + vstsFeedPublish: '${{ parameters.vstsProject }}/${{ parameters.vstsFeedName }}' + vstsFeedPackagePublish: '$(universalPackageModuleName)' # Published via [Initialize-UniversalArtifactPublish] invocation + versionOption: '$(publishingMode)' # Published via [Initialize-UniversalArtifactPublish] invocation + versionPublish: '$(newVersionObject)' # Published via [Initialize-UniversalArtifactPublish] invocation + packagePublishDescription: '$(universalPackageModuleName) Module' + verbosity: 'error' + enabled: true + + # [template-spec publish] task(s) + #-------------------------------- + - task: AzurePowerShell@5 + displayName: 'Publish module to template specs' + condition: and( + eq(variables['templateSpecsDoPublish'], true), + succeeded() + ) + enabled: true + inputs: + azureSubscription: '${{ parameters.serviceConnection }}' + azurePowerShellVersion: ${{ parameters.azurePowerShellVersion }} + preferredAzurePowerShellVersion: ${{ parameters.preferredAzurePowerShellVersion }} + pwsh: true + ScriptType: InlineScript + inline: | + # Load used functions + . (Join-Path '$(System.DefaultWorkingDirectory)' '$(pipelineFunctionsPath)' 'resourcePublish' 'Publish-ModuleToTemplateSpec.ps1') + + $functionInput = @{ + templateFilePath = Join-Path '$(ENVMODULEPATH)' 'deploy.bicep' + templateSpecsRgName = '${{ parameters.templateSpecsRgName }}' + templateSpecsRgLocation = '${{ parameters.templateSpecsRgLocation }}' + templateSpecsDescription = '${{ parameters.templateSpecsDescription }}' + customVersion = '${{ parameters.customVersion }}' + versioningOption = '${{ parameters.versioningOption }}' + } + + Write-Verbose "Invoke task with" -Verbose + Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose + + Publish-ModuleToTemplateSpec @functionInput -Verbose + + # [private bicep registry publish] task(s) + #------------------------------------------- + - task: AzurePowerShell@5 + displayName: 'Publish module to private bicep registry' + condition: and( + eq(variables['bicepRegistryDoPublish'], true), + succeeded() + ) + enabled: true + inputs: + azureSubscription: '${{ parameters.serviceConnection }}' + azurePowerShellVersion: ${{ parameters.azurePowerShellVersion }} + preferredAzurePowerShellVersion: ${{ parameters.preferredAzurePowerShellVersion }} + pwsh: true + ScriptType: InlineScript + inline: | + # Load used functions + . (Join-Path '$(System.DefaultWorkingDirectory)' '$(pipelineFunctionsPath)' 'resourcePublish' 'Publish-ModuleToPrivateBicepRegistry.ps1') + + $functionInput = @{ + templateFilePath = Join-Path '$(ENVMODULEPATH)' 'deploy.bicep' + bicepRegistryName = '${{ parameters.bicepRegistryName }}' + bicepRegistryRgName = '${{ parameters.bicepRegistryRgName }}' + customVersion = '${{ parameters.customVersion }}' + versioningOption = '${{ parameters.versioningOption }}' + } + + Write-Verbose "Invoke task with" -Verbose + Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose + + Publish-ModuleToPrivateBicepRegistry @functionInput -Verbose diff --git a/.azuredevops/pipelineTemplates/module.jobs.validate.yml b/.azuredevops/pipelineTemplates/module.jobs.validate.yml new file mode 100644 index 0000000000..368888f5f9 --- /dev/null +++ b/.azuredevops/pipelineTemplates/module.jobs.validate.yml @@ -0,0 +1,258 @@ +######################################################### +## VALIDATION PIPELINE ## +######################################################### +## +## This pipeline template contains the logic to validate a given modue's ARM template using the provided parameter file(s) +## +## Enabled levels of validation +## - Resource-Group-Level +## - Subscription-Level +## - Management-Group-Level +## - Tenant-Level +## +######################################################### +## +##---------------------------------------------## +## TEMPLATE PARAMETERS ## +##---------------------------------------------## +## +## By default it uses the variables specified in the below [parameters] section. However, you can overwrite these variables in the +## referencing pipeline by providing the parameter explicitly. +## +## NOTE: If you don't need to overwrite a shared value, you can IGNORE this section +## +## |=============================================================================================================================================================================================================================| +## | Parameter | Default Value | Description | Example | +## |---------------------------------|--------------------------------------|-----------------------------------------------------------------------------------------------------------|----------------------------------------| +## | serviceConnection | '$(serviceConnection)' | The service connection that connects to Azure | 'demo-internal' | +## | poolName | '$(poolName)' | You can provide either a [poolname] or [vmImage] to run the job on | 'Custom Deployment Pool' | +## | vmImage | '$(vmImage)' | You can provide either a [poolname] or [vmImage] to run the job on | 'ubuntu20.04' | +## | defaultJobTimeoutInMinutes | 120 | The timeout for the job in this pipeline | 120 | +## | checkoutRepositories | '' | An optional list of repositories to check out at the beginning of this job in addition to the source | 'Components' | +## | modulePath | '$(modulePath)' | The path to the module to deploy. E.g. [c:/KeyVault] | 'c:/KeyVault' | +## | location | '$(defaultLocation)' | The location to validate with | 'France Central' | +## | resourceGroupName | '$(defaultResourceGroupName)' | The resourcegroup to validate into. Required only for Resource-Group-Level validations | 'validation-rg' | +## | subscriptionId | '$(ARM_SUBSCRIPTION_ID)' | The id of the subscription to validate with when using a Management group service connection | 'aed7c000-6387-412e-bed0-24dfddf4bbc6' | +## | managementGroupId | '$(ARM_MGMTGROUP_ID)' | The id of the management group to validate with. Required only for Management-Group-Level validations | '477c9620-cb01-454f-9ebc-fc6b1df48c14' | +## | parametersRepository | '$(Build.Repository.Name)' | The respository with the parameter files. Defaults to the triggering repository | 'Solutions' | +## | modulesRepository | '$(modulesRepository)' | The respository with the modules. | 'Components' | +## | azurePowerShellVersion | '$(azurePowerShellVersion)' | Used for configuring the Azure PowerShellModules Version, one of the example values. | 'latestVersion' or 'OtherVersion' | +## | preferredAzurePowerShellVersion | '$(preferredAzurePowerShellVersion)' | Used for configuring the Azure PowerShellModules Version, either an empty string or the specific version. | '4.4.0' | +## |=============================================================================================================================================================================================================================| +## +##---------------------------------------------## + +parameters: + # Pipeline-related parameters + serviceConnection: '$(serviceConnection)' + poolName: '$(poolName)' + vmImage: '$(vmImage)' + defaultJobTimeoutInMinutes: 120 + checkoutRepositories: '' + # Logic-related parameters + modulePath: '$(modulePath)' + parametersRepository: '$(Build.Repository.Name)' + location: '$(defaultLocation)' + resourceGroupName: '$(defaultResourceGroupName)' + subscriptionId: '$(ARM_SUBSCRIPTION_ID)' + managementGroupId: '$(ARM_MGMTGROUP_ID)' + modulesRepository: '$(modulesRepository)' + # Azure PowerShell Version parameter + azurePowerShellVersion: '$(azurePowerShellVersion)' + preferredAzurePowerShellVersion: '$(preferredAzurePowerShellVersion)' + +##---------------------------------------------## +## TEMPLATE LOGIC ## +##---------------------------------------------## +jobs: + - job: + displayName: Run global tests + timeoutInMinutes: ${{ parameters.defaultJobTimeoutInMinutes }} + pool: + ${{ if ne(parameters.vmImage, '') }}: + vmImage: ${{ parameters.vmImage }} + ${{ if ne(parameters.poolName, '') }}: + name: ${{ parameters.poolName }} + steps: + # [Checkout Repositories] task(s) + #-------------------------------- + - checkout: self + - ${{ if ne(parameters.checkoutRepositories, '') }}: + - ${{ each checkoutRepository in parameters.checkoutRepositories }}: + - checkout: ${{ checkoutRepository }} + fetchDepth: 1 # the depth of commits to ask Git to fetch; if not set defaults to no limit + path: 's/${{ checkoutRepository }}' + + # [Multi Repo] Support task + #-------------------------- + - task: PowerShell@2 + displayName: Handle Multi-Repo Invocation + inputs: + targetType: inline + pwsh: true + script: | + # Handle multiple-repositories + if( "${{ join(';',parameters.checkoutRepositories) }}".length -gt 0) { + Write-Verbose "Multi-Repo Checkout" -Verbose + $moduleRepoRoot = Join-Path '$(System.DefaultWorkingDirectory)' '$(modulesRepository)' + $parametersRepoRoot = Join-Path '$(System.DefaultWorkingDirectory)' '${{ parameters.parametersRepository }}' + } else { + Write-Verbose "No Multi-Repo Checkout" -Verbose + $moduleRepoRoot = '$(System.DefaultWorkingDirectory)' + $parametersRepoRoot = '$(System.DefaultWorkingDirectory)' + } + Write-Host "##vso[task.setvariable variable=ModuleRepoRoot]$moduleRepoRoot" + Write-Host "##vso[task.setvariable variable=ParametersRepoRoot]$parametersRepoRoot" + + # [Agent] Prepare environment + #---------------------------- + - task: PowerShell@2 + displayName: 'Setup agent' + inputs: + targetType: inline + pwsh: true + script: | + # Load used functions + . (Join-Path '$(moduleRepoRoot)' 'utilities' 'pipelines' 'sharedScripts' 'Set-EnvironmentOnAgent.ps1') + + # Set agent up + Set-EnvironmentOnAgent + + # [Module Pester Test] task(s) + #----------------------------- + - task: AzurePowerShell@5 + displayName: 'Run general tests via (Pester) via connection [${{ parameters.serviceConnection }}]' + inputs: + azureSubscription: ${{ parameters.serviceConnection }} + azurePowerShellVersion: ${{ parameters.azurePowerShellVersion }} + preferredAzurePowerShellVersion: ${{ parameters.preferredAzurePowerShellVersion }} + ScriptType: InlineScript + pwsh: true + inline: | + Invoke-Pester -Configuration @{ + Run = @{ + Container = New-PesterContainer -Path (Join-Path '$(moduleRepoRoot)' 'arm' '.global' 'global.module.tests.ps1') -Data @{ + moduleFolderPaths = Join-Path '$(moduleRepoRoot)' '${{ parameters.modulePath }}' + } + } + Filter = @{ + ExcludeTag = 'ApiCheck' + } + TestResult = @{ + TestSuiteName = 'Global Module Tests' + OutputPath = 'arm/.global/global-testResults.xml' + OutputFormat = 'NUnitXml' + Enabled = $true + } + Output = @{ + Verbosity = 'Detailed' + } + } -ErrorAction 'Stop' + errorActionPreference: continue + + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testRunTitle: 'Global Module Tests' + testResultsFormat: NUnit + testResultsFiles: global-testResults.xml + failTaskOnFailedTests: false + searchFolder: 'arm/.global' + continueOnError: false + condition: succeededOrFailed() + + - job: + displayName: Run global API tests + timeoutInMinutes: ${{ parameters.defaultJobTimeoutInMinutes }} + pool: + ${{ if ne(parameters.vmImage, '') }}: + vmImage: ${{ parameters.vmImage }} + ${{ if ne(parameters.poolName, '') }}: + name: ${{ parameters.poolName }} + steps: + # [Checkout Repositories] task(s) + #-------------------------------- + - checkout: self + - ${{ if ne(parameters.checkoutRepositories, '') }}: + - ${{ each checkoutRepository in parameters.checkoutRepositories }}: + - checkout: ${{ checkoutRepository }} + fetchDepth: 1 # the depth of commits to ask Git to fetch; if not set defaults to no limit + path: 's/${{ checkoutRepository }}' + + # [Multi Repo] Support task + #-------------------------- + - task: PowerShell@2 + displayName: Handle Multi-Repo Invocation + inputs: + targetType: inline + pwsh: true + script: | + # Handle multiple-repositories + if( "${{ join(';',parameters.checkoutRepositories) }}".length -gt 0) { + Write-Verbose "Multi-Repo Checkout" -Verbose + $moduleRepoRoot = Join-Path '$(System.DefaultWorkingDirectory)' '$(modulesRepository)' + $parametersRepoRoot = Join-Path '$(System.DefaultWorkingDirectory)' '${{ parameters.parametersRepository }}' + } else { + Write-Verbose "No Multi-Repo Checkout" -Verbose + $moduleRepoRoot = '$(System.DefaultWorkingDirectory)' + $parametersRepoRoot = '$(System.DefaultWorkingDirectory)' + } + Write-Host "##vso[task.setvariable variable=ModuleRepoRoot]$moduleRepoRoot" + Write-Host "##vso[task.setvariable variable=ParametersRepoRoot]$parametersRepoRoot" + + # [Agent] Prepare environment + #---------------------------- + - task: PowerShell@2 + displayName: 'Setup agent' + inputs: + targetType: inline + pwsh: true + script: | + # Load used functions + . (Join-Path '$(moduleRepoRoot)' 'utilities' 'pipelines' 'sharedScripts' 'Set-EnvironmentOnAgent.ps1') + + # Set agent up + Set-EnvironmentOnAgent + + # [Module Pester Test] task(s) + #----------------------------- + - task: AzurePowerShell@5 + displayName: 'Run API tests via (Pester) via connection [${{ parameters.serviceConnection }}]' + inputs: + azureSubscription: ${{ parameters.serviceConnection }} + azurePowerShellVersion: ${{ parameters.azurePowerShellVersion }} + preferredAzurePowerShellVersion: ${{ parameters.preferredAzurePowerShellVersion }} + ScriptType: InlineScript + pwsh: true + inline: | + Invoke-Pester -Configuration @{ + Run = @{ + Container = New-PesterContainer -Path (Join-Path '$(moduleRepoRoot)' 'arm' '.global' 'global.module.tests.ps1') -Data @{ + moduleFolderPaths = Join-Path '$(moduleRepoRoot)' '${{ parameters.modulePath }}' + } + } + Filter = @{ + Tag = 'ApiCheck' + } + TestResult = @{ + TestSuiteName = 'Global Module API Tests' + OutputPath = 'arm/.global/api-testResults.xml' + OutputFormat = 'NUnitXml' + Enabled = $true + } + Output = @{ + Verbosity = 'Detailed' + } + } -ErrorAction 'Stop' + errorActionPreference: continue + + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testRunTitle: 'Global Module API Tests' + testResultsFormat: NUnit + testResultsFiles: api-testResults.xml + failTaskOnFailedTests: false + searchFolder: 'arm/.global' + continueOnError: false + condition: succeededOrFailed() diff --git a/.azuredevops/pipelineVariables/global.variables.yml b/.azuredevops/pipelineVariables/global.variables.yml new file mode 100644 index 0000000000..271181c2c7 --- /dev/null +++ b/.azuredevops/pipelineVariables/global.variables.yml @@ -0,0 +1,71 @@ +variables: + ###################################### + # Agent settings + ###################################### + + vmImage: 'ubuntu-latest' # Use this for Microsoft-hosted agents + poolName: '' # Use this for self-hosted agents + serviceConnection: 'CARML-CSU-Tenant-Connection' + + ###################################### + # Source + ###################################### + + vstsOrganization: servicescode + vstsProject: '$(System.TeamProject)' + modulesRepository: ResourceModules # The repository hosting the deployment code (i.e. 'Components'). MUST be provided as a variable with every pipeline + modulePath: arm/$(moduleName) # only use in module pielines + pipelineFunctionsPath: 'utilities/pipelines' + + ###################################### + # Validation deployment settings + ###################################### + + defaultLocation: 'West Europe' # The default location to test deploy resources to + defaultResourceGroupName: 'validation-rg' # The default resource group to test deployment resources into + + ###################################### + # Publish: Template-Spec settings + ###################################### + + templateSpecsDoPublish: true # Set to true, if you would like to publish module templates as template specs + templateSpecsRGName: 'artifacts-rg' # The name of the resource group to publish to. If the resource group does not exist, it will be created. + templateSpecsRGLocation: 'West Europe' # The location of the resource group to publish to + templateSpecsDescription: components # The description to add to template specs published by this platform + + ###################################### + # Publish: Universal packages settings + ###################################### + + artifactsFeedDoPublish: true # Set to true, if you would like to publish modules as Universal Packages (in Azure DevOps Artifacts) + vstsFeedName: 'ResourceModules' # The name of the Azure DevOps universal packages feed to publish to + vstsFeedProject: '$(System.TeamProject)' # The project that hosts the feed + + ###################################### + # Publish: Private Bicep Registry settings + ###################################### + + bicepRegistryDoPublish: true # Set to true, if you would like to publish module templates to a bicep registry + bicepRegistryName: adpsxxazacrx001 # The name of the bicep registry (ACR) to publish to. If it does not exist, it will be created. + bicepRegistryRGName: 'artifacts-rg' # The resource group that hosts the private bicep registry (ACR) + + ###################################### + # Azure PowerShell Version + ###################################### + + # Should be set to 'latestVersion' unless there is an issue with the Az PowerShell modules. + # If a specific version needs to be set azurePowerShellVersion should be changed to 'OtherVersion'. + # NOTE: The strings are case sensitive and will not work unless properly entered. + azurePowerShellVersion: 'latestVersion' + # If using the latest version of the Az PowerShell modules, set `preferredAzurePowerShellVersion` to an empty string ''. + # If overriding the Az PowerShell module version, set to the version. Example: '4.4.0' + preferredAzurePowerShellVersion: '' +# +# NOTE: To override for just an individual template, just add the following to the +# templates pipeline.yml replacing '4.4.0' with the desired version: +# +# - name: azurePowerShellVersion +# value: 'OtherVersion' +# - name: preferredAzurePowerShellVersion +# value: '4.4.0' +# diff --git a/.azuredevops/platformPipelines/platform.updateReadMe.yml b/.azuredevops/platformPipelines/platform.updateReadMe.yml new file mode 100644 index 0000000000..c4f560eee3 --- /dev/null +++ b/.azuredevops/platformPipelines/platform.updateReadMe.yml @@ -0,0 +1,84 @@ +name: '.Platform: Update ReadMe Module Tables' + +trigger: + batch: true + branches: + include: + - main + paths: + include: + - 'arm/**/deploy.bicep' + - 'arm/**/deploy.json' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - name: pipelinePrincipalGitUserName + value: 'CARMLPipelinePrincipal' + - name: pipelinePrincipalGitUserEmail + value: 'CARML@noreply.github.com' + +jobs: + - job: Update_module_tables + pool: + ${{ if ne($(vmImage), '') }}: + vmImage: '$(vmImage)' + ${{ if ne($(poolName), '') }}: + name: '$(poolName)' + steps: + - checkout: self + persistCredentials: true + - task: PowerShell@2 + displayName: 'Update general ReadMe' + inputs: + targetType: inline + pwsh: true + script: | + # Load used functions + . (Join-Path '$(System.DefaultWorkingDirectory)' 'utilities' 'tools' 'Set-GitHubReadMeModuleTable.ps1') + + $functionInput = @{ + ModulesPath = Join-Path '$(System.DefaultWorkingDirectory)' 'arm' + FilePath = Join-Path '$(System.DefaultWorkingDirectory)' 'README.md' + Organization = ('$(Build.Repository.Name)').split('/')[0] + RepositoryName = ('$(Build.Repository.Name)').split('/')[1] + ColumnsInOrder = @('Name', 'Status') + SortByColumn = 'Name' + } + + Write-Verbose "Invoke task with" -Verbose + Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose + + Set-GitHubReadMeModuleTable @functionInput -Verbose + - task: PowerShell@2 + displayName: 'Update module folder ReadMe' + inputs: + targetType: inline + pwsh: true + script: | + # Load used functions + . (Join-Path '$(System.DefaultWorkingDirectory)' 'utilities' 'tools' 'Set-GitHubReadMeModuleTable.ps1') + + $functionInput = @{ + ModulesPath = Join-Path '$(System.DefaultWorkingDirectory)' 'arm' + FilePath = Join-Path '$(System.DefaultWorkingDirectory)' 'arm/README.md' + Organization = ('$(Build.Repository.Name)').split('/')[0] + RepositoryName = ('$(Build.Repository.Name)').split('/')[1] + ColumnsInOrder = @('Name', 'ProviderNamespace','ResourceType') + } + + Write-Verbose "Invoke task with" -Verbose + Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose + + Set-GitHubReadMeModuleTable @functionInput -Verbose + - task: PowerShell@2 + displayName: 'Push changes' + inputs: + targetType: inline + pwsh: true + script: | + git config --global user.email '$(pipelinePrincipalGitUserEmail)' + git config --global user.name '$(pipelinePrincipalGitUserName)' + Write-Verbose '$(Build.SourceBranch)' -Verbose + git add . + git commit -m "Push updated Readme file(s)" + git push $(Build.Repository.Uri) HEAD:$(Build.SourceBranch) diff --git a/.azuredevops/platformPipelines/platform.wiki-sync.yml b/.azuredevops/platformPipelines/platform.wiki-sync.yml new file mode 100644 index 0000000000..bb5085e0f5 --- /dev/null +++ b/.azuredevops/platformPipelines/platform.wiki-sync.yml @@ -0,0 +1,58 @@ +# NOTE: +# This pipeline requires a secret 'PLATFORM_REPO_UPDATE_PAT' set up in a library named 'PLATFORM_VARIABLES'. +# The secret's value should be a PAT token with the permissions to push to the repository's main branch. + +name: '.Platform: Sync Docs/Wiki' + +trigger: + branches: + include: + - main + paths: + include: + - 'docs/wiki/**' + +variables: + - group: 'PLATFORM_VARIABLES' + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - name: pipelinePrincipalGitUserName + value: 'CARMLPipelinePrincipal' + - name: pipelinePrincipalGitUserEmail + value: 'CARML@noreply.github.com' + +jobs: + - job: Update_module_tables + pool: + ${{ if ne('$(vmImage)', '') }}: + vmImage: '$(vmImage)' + ${{ if ne('$(poolName)', '') }}: + name: '$(poolName)' + steps: + - checkout: self + displayName: Checkout Source Repo + persistCredentials: true + # Create a variable + - task: PowerShell@2 + displayName: 'Checkout Wiki Repo' + inputs: + targetType: inline + pwsh: true + script: | + git config --global user.email '$(pipelinePrincipalGitUserEmail)' + git config --global user.name '$(pipelinePrincipalGitUserName)' + $repositoryEndpoint= 'https://' + '$(PLATFORM_REPO_UPDATE_PAT)' + '@github.com/' + '$(Build.Repository.Name)' + '.wiki' + git clone $repositoryEndpoint + - task: PowerShell@2 + displayName: 'Sync docs/wiki Into Wiki Repo' + inputs: + targetType: inline + pwsh: true + script: | + $docsPath = Join-Path '$(System.DefaultWorkingDirectory)' 'docs' 'wiki' + $wikiPath = ('$(Build.Repository.Name)').split('/')[1] + '.wiki' + $wikiRepository = Join-Path '$(System.DefaultWorkingDirectory)' $wikiPath + rsync -avzr --delete --exclude='.git/' $docsPath $wikiRepository + cd $wikiRepository + git add . + git commit -m "Push updated Wiki" + git push diff --git a/.github/variables/variables.module.json b/.github/variables/global.variables.json similarity index 100% rename from .github/variables/variables.module.json rename to .github/variables/global.variables.json diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 1284dbd68c..52d7a8560e 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -26,4 +26,4 @@ jobs: if: ${{ github.event_name == 'pull_request' }} DEFAULT_BRANCH: ${{ github.base_ref }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - FILTER_REGEX_EXCLUDE: '[global.module.tests.ps1|Get\-ModulesAsMarkdownTable.ps1]' + FILTER_REGEX_EXCLUDE: '[global.module.tests.ps1|Get\-ModulesAsMarkdownTable.ps1|.*yml]' diff --git a/.github/workflows/ms.analysisservices.servers.yml b/.github/workflows/ms.analysisservices.servers.yml index bee0687628..6f79bc1ac4 100644 --- a/.github/workflows/ms.analysisservices.servers.yml +++ b/.github/workflows/ms.analysisservices.servers.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 85a77af98d..1e5b5c70b2 100644 --- a/.github/workflows/ms.apimanagement.service.yml +++ b/.github/workflows/ms.apimanagement.service.yml @@ -7,7 +7,7 @@ on: type: boolean description: 'Remove deployed module' required: false - default: 'false' # Soft-delete prevents re-deployment + default: 'true' versioningOption: type: choice description: 'The mode to handle the version increments [major|minor|patch]' @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 c5270881e1..d4c1a06e1a 100644 --- a/.github/workflows/ms.authorization.policyassignments.yml +++ b/.github/workflows/ms.authorization.policyassignments.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -99,7 +99,7 @@ jobs: uses: deep-mm/set-variables@v1.0 with: # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'global.variables' # Don't write .json here # ------------------- # ## Deploy & Remove ## # ------------------- # @@ -132,7 +132,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 19a19592ea..0ada4208ab 100644 --- a/.github/workflows/ms.authorization.policydefinitions.yml +++ b/.github/workflows/ms.authorization.policydefinitions.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -99,7 +99,7 @@ jobs: uses: deep-mm/set-variables@v1.0 with: # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'global.variables' # Don't write .json here # ------------------- # ## Deploy & Remove ## # ------------------- # @@ -132,7 +132,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 ea7073bf0e..b10c8eee25 100644 --- a/.github/workflows/ms.authorization.policyexemptions.yml +++ b/.github/workflows/ms.authorization.policyexemptions.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -99,7 +99,7 @@ jobs: uses: deep-mm/set-variables@v1.0 with: # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'global.variables' # Don't write .json here # ------------------- # ## Deploy & Remove ## # ------------------- # @@ -132,7 +132,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 b5c1c5ad02..fb5b20adc6 100644 --- a/.github/workflows/ms.authorization.policysetdefinitions.yml +++ b/.github/workflows/ms.authorization.policysetdefinitions.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -99,7 +99,7 @@ jobs: uses: deep-mm/set-variables@v1.0 with: # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'global.variables' # Don't write .json here # ------------------- # ## Deploy & Remove ## # ------------------- # @@ -132,7 +132,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 fd9654791d..c64739a3e2 100644 --- a/.github/workflows/ms.authorization.roleassignments.yml +++ b/.github/workflows/ms.authorization.roleassignments.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -99,7 +99,7 @@ jobs: uses: deep-mm/set-variables@v1.0 with: # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'global.variables' # Don't write .json here # ------------------- # ## Deploy & Remove ## # ------------------- # @@ -132,7 +132,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 2abd6f99e5..d1c58637b0 100644 --- a/.github/workflows/ms.authorization.roledefinitions.yml +++ b/.github/workflows/ms.authorization.roledefinitions.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -99,7 +99,7 @@ jobs: uses: deep-mm/set-variables@v1.0 with: # Name of variable file - variableFileName: 'variables.module' # Don't write .json here + variableFileName: 'global.variables' # Don't write .json here # ------------------- # ## Deploy & Remove ## # ------------------- # @@ -132,7 +132,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 6fbaf27538..e217e1e288 100644 --- a/.github/workflows/ms.automanage.accounts.yml +++ b/.github/workflows/ms.automanage.accounts.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 58205ab918..f775c2d98a 100644 --- a/.github/workflows/ms.automation.automationaccounts.yml +++ b/.github/workflows/ms.automation.automationaccounts.yml @@ -73,7 +73,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -99,7 +99,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -129,7 +129,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 66736243b9..41d9c96ddd 100644 --- a/.github/workflows/ms.batch.batchaccounts.yml +++ b/.github/workflows/ms.batch.batchaccounts.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 8c2d54ab9f..acba513bc9 100644 --- a/.github/workflows/ms.cognitiveservices.accounts.yml +++ b/.github/workflows/ms.cognitiveservices.accounts.yml @@ -7,7 +7,7 @@ on: type: boolean description: 'Remove deployed module' required: false - default: 'false' # Soft-delete prevents re-deployment + default: 'true' versioningOption: type: choice description: 'The mode to handle the version increments [major|minor|patch]' @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 231b340f99..d57ea6d310 100644 --- a/.github/workflows/ms.compute.availabilitysets.yml +++ b/.github/workflows/ms.compute.availabilitysets.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 4771a35eb7..308171c39c 100644 --- a/.github/workflows/ms.compute.diskencryptionsets.yml +++ b/.github/workflows/ms.compute.diskencryptionsets.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 86b3bb33c7..7bb742ffc8 100644 --- a/.github/workflows/ms.compute.galleries.yml +++ b/.github/workflows/ms.compute.galleries.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 00e0df08f4..178d2c1139 100644 --- a/.github/workflows/ms.compute.images.yml +++ b/.github/workflows/ms.compute.images.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 4689f5471e..0a92d36ee7 100644 --- a/.github/workflows/ms.compute.proximityplacementgroups.yml +++ b/.github/workflows/ms.compute.proximityplacementgroups.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 1f8d2f044e..7fd0197659 100644 --- a/.github/workflows/ms.compute.virtualmachines.yml +++ b/.github/workflows/ms.compute.virtualmachines.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -104,7 +104,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -134,7 +134,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 11c5af19a3..f38a3eca75 100644 --- a/.github/workflows/ms.compute.virtualmachinescalesets.yml +++ b/.github/workflows/ms.compute.virtualmachinescalesets.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -104,7 +104,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -134,7 +134,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 6228585477..cd7b3cee32 100644 --- a/.github/workflows/ms.consumption.budgets.yml +++ b/.github/workflows/ms.consumption.budgets.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 d0683e279c..d57fa5cbc7 100644 --- a/.github/workflows/ms.containerinstance.containergroups.yml +++ b/.github/workflows/ms.containerinstance.containergroups.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 10af487d7b..a88a177a0c 100644 --- a/.github/workflows/ms.containerregistry.registries.yml +++ b/.github/workflows/ms.containerregistry.registries.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 98ebeb55cf..f2ec3639c4 100644 --- a/.github/workflows/ms.containerservice.managedclusters.yml +++ b/.github/workflows/ms.containerservice.managedclusters.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 83df87103d..81bd8265b0 100644 --- a/.github/workflows/ms.databricks.workspaces.yml +++ b/.github/workflows/ms.databricks.workspaces.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 70aa042ad1..9a726ea05b 100644 --- a/.github/workflows/ms.datafactory.factories.yml +++ b/.github/workflows/ms.datafactory.factories.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 29b8626eab..141ad320ac 100644 --- a/.github/workflows/ms.desktopvirtualization.applicationgroups.yml +++ b/.github/workflows/ms.desktopvirtualization.applicationgroups.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 a58aff77f4..01aba38b21 100644 --- a/.github/workflows/ms.desktopvirtualization.hostpools.yml +++ b/.github/workflows/ms.desktopvirtualization.hostpools.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 f62152a2a8..13ceaf46df 100644 --- a/.github/workflows/ms.desktopvirtualization.workspaces.yml +++ b/.github/workflows/ms.desktopvirtualization.workspaces.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 d1f9cb0b1f..eb7ee7b209 100644 --- a/.github/workflows/ms.documentdb.databaseaccounts.yml +++ b/.github/workflows/ms.documentdb.databaseaccounts.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -103,7 +103,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -133,7 +133,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 37ca8a977a..a523590fa5 100644 --- a/.github/workflows/ms.eventgrid.topics.yml +++ b/.github/workflows/ms.eventgrid.topics.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 dedbf8217c..593164f377 100644 --- a/.github/workflows/ms.eventhub.namespaces.yml +++ b/.github/workflows/ms.eventhub.namespaces.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 8a78f7b515..0ab48c5053 100644 --- a/.github/workflows/ms.healthbot.healthbots.yml +++ b/.github/workflows/ms.healthbot.healthbots.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 d443d10f0a..026fbad4cd 100644 --- a/.github/workflows/ms.insights.actiongroups.yml +++ b/.github/workflows/ms.insights.actiongroups.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 5331fae6e5..4aeef57498 100644 --- a/.github/workflows/ms.insights.activitylogalerts.yml +++ b/.github/workflows/ms.insights.activitylogalerts.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 3540438126..84c251cfea 100644 --- a/.github/workflows/ms.insights.components.yml +++ b/.github/workflows/ms.insights.components.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 0b62e9abf8..477321678a 100644 --- a/.github/workflows/ms.insights.diagnosticsettings.yml +++ b/.github/workflows/ms.insights.diagnosticsettings.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 9c0a03876b..fd26bd4eef 100644 --- a/.github/workflows/ms.insights.metricalerts.yml +++ b/.github/workflows/ms.insights.metricalerts.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 e34021e026..867a0fff01 100644 --- a/.github/workflows/ms.insights.privatelinkscopes.yml +++ b/.github/workflows/ms.insights.privatelinkscopes.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 b4ab55a199..ac511dfc7b 100644 --- a/.github/workflows/ms.insights.scheduledqueryrules.yml +++ b/.github/workflows/ms.insights.scheduledqueryrules.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 ffc9c4c5a9..30b361f887 100644 --- a/.github/workflows/ms.keyvault.vaults.yml +++ b/.github/workflows/ms.keyvault.vaults.yml @@ -7,7 +7,7 @@ on: type: boolean description: 'Remove deployed module' required: false - default: 'false' # Soft-delete prevents re-deployment + default: 'true' versioningOption: type: choice description: 'The mode to handle the version increments [major|minor|patch]' @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 827fa879e1..ed00ecd551 100644 --- a/.github/workflows/ms.logic.workflows.yml +++ b/.github/workflows/ms.logic.workflows.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 c142d8891e..732bfe9a8e 100644 --- a/.github/workflows/ms.machinelearningservices.workspaces.yml +++ b/.github/workflows/ms.machinelearningservices.workspaces.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 a3288c14cb..542ee8721c 100644 --- a/.github/workflows/ms.managedidentity.userassignedidentities.yml +++ b/.github/workflows/ms.managedidentity.userassignedidentities.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 ae03958b31..e743d53023 100644 --- a/.github/workflows/ms.managedservices.registrationdefinitions.yml +++ b/.github/workflows/ms.managedservices.registrationdefinitions.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 d81181d788..fa1cc4ed57 100644 --- a/.github/workflows/ms.management.managementgroups.yml +++ b/.github/workflows/ms.management.managementgroups.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 a66667845f..9a29a45d66 100644 --- a/.github/workflows/ms.netapp.netappaccounts.yml +++ b/.github/workflows/ms.netapp.netappaccounts.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -103,7 +103,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -133,7 +133,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 190979350e..14e29f4f2e 100644 --- a/.github/workflows/ms.network.applicationgateways.yml +++ b/.github/workflows/ms.network.applicationgateways.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 b190553360..71fe9c8ad3 100644 --- a/.github/workflows/ms.network.applicationsecuritygroups.yml +++ b/.github/workflows/ms.network.applicationsecuritygroups.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 ab9784f1db..55cefaec50 100644 --- a/.github/workflows/ms.network.azurefirewalls.yml +++ b/.github/workflows/ms.network.azurefirewalls.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 305d032b34..16d1965f06 100644 --- a/.github/workflows/ms.network.bastionhosts.yml +++ b/.github/workflows/ms.network.bastionhosts.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 ceee159d7b..5ed5472db2 100644 --- a/.github/workflows/ms.network.connections.yml +++ b/.github/workflows/ms.network.connections.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 aeefd14496..a0a298915b 100644 --- a/.github/workflows/ms.network.ddosprotectionplans.yml +++ b/.github/workflows/ms.network.ddosprotectionplans.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 52bcd665d0..ad35cbf123 100644 --- a/.github/workflows/ms.network.expressroutecircuits.yml +++ b/.github/workflows/ms.network.expressroutecircuits.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 d5afeb5f68..b85fea5a49 100644 --- a/.github/workflows/ms.network.firewallpolicies.yml +++ b/.github/workflows/ms.network.firewallpolicies.yml @@ -61,19 +61,36 @@ jobs: versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }} customVersion: ${{ steps.get-workflow-param.outputs.customVersion }} - #################### - # Pester Tests # - #################### - job_module_pester_validation: + ################## + # UNIT TESTS # + ################## + # Global tests + # ------------ + job_tests_module_global: + runs-on: ubuntu-20.04 + name: 'Run global module tests' + steps: + - name: 'Checkout' + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: 'Test module' + uses: ./.github/actions/templates/validateModuleGeneral + with: + modulePath: '${{ env.modulePath }}' + + # Global API tests + # ---------------- + job_tests_module_global_api: runs-on: ubuntu-20.04 - name: 'Pester tests' + name: 'Run global API module tests' steps: - name: 'Checkout' uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' - uses: ./.github/actions/templates/validateModulePester + - name: 'Test module' + uses: ./.github/actions/templates/validateModuleApis with: modulePath: '${{ env.modulePath }}' @@ -82,10 +99,11 @@ jobs: #################### job_module_deploy_validation: runs-on: ubuntu-20.04 - name: 'Deployment tests' + name: 'Run deployment validation module tests' needs: - job_set_workflow_param - job_module_pester_validation + - job_tests_module_global_api strategy: fail-fast: false matrix: @@ -98,9 +116,26 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' - - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' - uses: ./.github/actions/templates/validateModuleDeployment + # Name of variable file + variableFileName: 'global.variables' # 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 with: templateFilePath: '${{ env.modulePath }}/deploy.bicep' parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}' @@ -128,7 +163,8 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + # Name of variable file + variableFileName: 'global.variables' # Don't write .json here - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/.github/workflows/ms.network.ipgroups.yml b/.github/workflows/ms.network.ipgroups.yml index 65926b438a..243c19a1f6 100644 --- a/.github/workflows/ms.network.ipgroups.yml +++ b/.github/workflows/ms.network.ipgroups.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 48551f5f9f..a8897860ca 100644 --- a/.github/workflows/ms.network.loadbalancers.yml +++ b/.github/workflows/ms.network.loadbalancers.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 ba94bf3f8b..cb12f7be99 100644 --- a/.github/workflows/ms.network.localnetworkgateways.yml +++ b/.github/workflows/ms.network.localnetworkgateways.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 7e3f4c0594..9ed705512e 100644 --- a/.github/workflows/ms.network.natgateways.yml +++ b/.github/workflows/ms.network.natgateways.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 5b6bd3c295..24f58fb069 100644 --- a/.github/workflows/ms.network.networksecuritygroups.yml +++ b/.github/workflows/ms.network.networksecuritygroups.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 ed6ef8f5e5..58513b4913 100644 --- a/.github/workflows/ms.network.networkwatchers.yml +++ b/.github/workflows/ms.network.networkwatchers.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 ce7746efba..c011de3c1b 100644 --- a/.github/workflows/ms.network.privatednszones.yml +++ b/.github/workflows/ms.network.privatednszones.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 881759e1f8..d5d44ac54c 100644 --- a/.github/workflows/ms.network.privateendpoints.yml +++ b/.github/workflows/ms.network.privateendpoints.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 44a12dfd79..b87589fad1 100644 --- a/.github/workflows/ms.network.publicipaddresses.yml +++ b/.github/workflows/ms.network.publicipaddresses.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 020a10e1c4..0ad0b6620f 100644 --- a/.github/workflows/ms.network.publicipprefixes.yml +++ b/.github/workflows/ms.network.publicipprefixes.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 1ffebaed41..dd0cb3ff5d 100644 --- a/.github/workflows/ms.network.routetables.yml +++ b/.github/workflows/ms.network.routetables.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 22744c2107..e2836f620c 100644 --- a/.github/workflows/ms.network.trafficmanagerprofiles.yml +++ b/.github/workflows/ms.network.trafficmanagerprofiles.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 f361e861f8..e05bcf5203 100644 --- a/.github/workflows/ms.network.virtualnetworkgateways.yml +++ b/.github/workflows/ms.network.virtualnetworkgateways.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -99,7 +99,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -129,7 +129,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 840bcd28d1..f99b3db08c 100644 --- a/.github/workflows/ms.network.virtualnetworks.yml +++ b/.github/workflows/ms.network.virtualnetworks.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 c44764ba18..c31a6d9865 100644 --- a/.github/workflows/ms.network.virtualwans.yml +++ b/.github/workflows/ms.network.virtualwans.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 3654d0062a..d2af0e11f3 100644 --- a/.github/workflows/ms.operationalinsights.workspaces.yml +++ b/.github/workflows/ms.operationalinsights.workspaces.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 62aafeb524..6fafa43901 100644 --- a/.github/workflows/ms.recoveryservices.vaults.yml +++ b/.github/workflows/ms.recoveryservices.vaults.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 d912fc257d..64c96f6c95 100644 --- a/.github/workflows/ms.resources.deploymentscripts.yml +++ b/.github/workflows/ms.resources.deploymentscripts.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 00bbeeffe9..29b2b9d2b1 100644 --- a/.github/workflows/ms.resources.resourcegroups.yml +++ b/.github/workflows/ms.resources.resourcegroups.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 0ee5541d0c..275c1ca3b8 100644 --- a/.github/workflows/ms.security.azuresecuritycenter.yml +++ b/.github/workflows/ms.security.azuresecuritycenter.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 545bc3689c..7c5dfeb493 100644 --- a/.github/workflows/ms.servicebus.namespaces.yml +++ b/.github/workflows/ms.servicebus.namespaces.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 6d78a4864d..7ec251e7c7 100644 --- a/.github/workflows/ms.sql.managedinstances.yml +++ b/.github/workflows/ms.sql.managedinstances.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 db2531423c..4ddd5f238f 100644 --- a/.github/workflows/ms.sql.servers.yml +++ b/.github/workflows/ms.sql.servers.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 630595baeb..a145d9c2ea 100644 --- a/.github/workflows/ms.storage.storageaccounts.yml +++ b/.github/workflows/ms.storage.storageaccounts.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -99,7 +99,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -129,7 +129,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 80210919d6..8d564724e6 100644 --- a/.github/workflows/ms.virtualmachineimages.imagetemplates.yml +++ b/.github/workflows/ms.virtualmachineimages.imagetemplates.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 337b1d0b75..e5877ab2ce 100644 --- a/.github/workflows/ms.web.connections.yml +++ b/.github/workflows/ms.web.connections.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 d33db89202..756c824ebe 100644 --- a/.github/workflows/ms.web.hostingenvironments.yml +++ b/.github/workflows/ms.web.hostingenvironments.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 d610126678..b029c4f04d 100644 --- a/.github/workflows/ms.web.serverfarms.yml +++ b/.github/workflows/ms.web.serverfarms.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -98,7 +98,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -128,7 +128,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - 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 25c0e45745..e15d5b36ce 100644 --- a/.github/workflows/ms.web.sites.yml +++ b/.github/workflows/ms.web.sites.yml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: 'Validate module with Pester' + - name: 'Run tests' uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ env.modulePath }}' @@ -104,7 +104,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Using parameter file [${{ matrix.parameterFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: @@ -134,7 +134,7 @@ jobs: - name: Set environment variables uses: deep-mm/set-variables@v1.0 with: - variableFileName: 'variables.module' + variableFileName: 'global.variables' - name: 'Publish module' uses: ./.github/actions/templates/publishModule with: diff --git a/arm/Microsoft.AnalysisServices/servers/readme.md b/arm/Microsoft.AnalysisServices/servers/readme.md index 95929c083c..5712fa2635 100644 --- a/arm/Microsoft.AnalysisServices/servers/readme.md +++ b/arm/Microsoft.AnalysisServices/servers/readme.md @@ -1,4 +1,6 @@ -# Analysis Services `[Microsoft.AnalysisServices/servers]` +# Analysis Services Server `[Microsoft.AnalysisServices/servers]` + +This module deploys an analysis service server. ## Resource Types diff --git a/docs/wiki/GettingStarted.md b/docs/wiki/GettingStarted.md index 36e3896863..f5905b8207 100644 --- a/docs/wiki/GettingStarted.md +++ b/docs/wiki/GettingStarted.md @@ -12,7 +12,7 @@ This section will give on an overview on how to get started using this repositor - [Fork the repository](#fork-the-repository) - [Service Names](#service-names) - [Dependencies](#dependencies) - - [GitHub-specific prerequisites](#github-specific-prerequisites) + - [Platform variables & secrets](#platform-variables--secrets) - [**Option 2:** Use it as a local reference to build bicep templates](#option-2-use-it-as-a-local-reference-to-build-bicep-templates) - [Clone / download the repository](#clone--download-the-repository) - [**Option 3:** Use it as remote reference to reference the bicep templates](#option-3-use-it-as-remote-reference-to-reference-the-bicep-templates) @@ -87,6 +87,7 @@ Depending on how you want to use this repositories content you may go down diffe - [**Option 1**: Use it as a basis to set up your own inner-source project](#option-1-use-it-as-a-basis-to-set-up-your-own-inner-source-project) - [**Option 2**: Use it as a local reference to build bicep templates](#option-2-use-it-as-a-local-reference-to-build-bicep-templates) - [**Option 3**: Use it as remote reference to reference the bicep templates](#option-3-use-it-as-remote-reference-to-reference-the-bicep-templates) +- [**Option 4:** Simple contribution](#option-4-simple-contribution) Also there are some general aspects to take note of - [Parameter File Tokens](#parameter-file-tokens) @@ -97,9 +98,15 @@ The repository is set up in a way that you can essentially create your own priva Depending on the pipelines you use (e.g. GitHub workflows vs. Azure DevOps pipelines) make sure you also account for the specific requirements outlined below. +- [Fork the repository](#fork-the-repository) +- [Service Names](#service-names) +- [Platform principal](#platform-principal) +- [Dependencies](#dependencies) +- [Platform variables & secrets](#platform-variables--secrets) + ### Fork the repository -If you want to have a linked clone of the source repository in your own GitHub account, you can fork the repository instead. Still is also the preferred method to contribute back to this repository. +If you want to have a linked clone of the source repository in your own GitHub account, you can fork the repository instead. This is also the preferred method if the intent is to contribute back to the CARML repository. To fork the repository you can simply click on the `Fork` button on the top right of the repository site. You can then select the Account you want to fork the repository to and are good to go. @@ -115,24 +122,24 @@ On of the most important actions you should take from the beginning is to update Please refer to [this list][AzureNames] to check which services have a global scope and must be updated. -### Dependencies +### Platform principal + +The platform principal is used to perform actions in Azure using a [service principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/app-objects-and-service-principals#service-principal-object). Depending on what you want to execute, different permissions will be required. For example: +- To test the **Management Group** module, your principal needs at least _[Contributor](https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#contributor)_ permissions on a management group +- To test **RBAC** with any of the modules you need at least _[User Access Administrator](https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#user-access-administrator)_ permissions on the _target scope_ +- To test **subscription-level deployments** you need at least _[Contributor](https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#contributor)_ permissions on the _target scope_ -As the modules we test often times have dependencies to other services, we created a pipeline to deploys several standard services like VirtualNetworks and KeyVaults (alongside dummy secrets) for the modules to use. This _dependency_ pipeline should be prepared and executed before you start running any pipelines on your own. In case you need to rename any services there (for example because a certain globally unique resource name was already taken) make sure to update any references to this name in the module parameter files. You can find further details about this pipeline [here](.\TestingDesign#Module-Dependencies). +> ***Note:*** By default, we're using this service principal's object ID (i.e. principal ID) as the value of the `deploymentSpId` [token](./ParameterFileTokens) to be used to test e.g. RBAC assignments. + +### Dependencies -### GitHub-specific prerequisites +As the modules we test oftentimes have dependencies to other services, we created a pipeline to deploys several standard services like VirtualNetworks and KeyVaults (alongside dummy secrets) for the modules to use. This _dependency_ pipeline should be prepared and executed before you start running any pipelines on your own. In case you need to rename any services there (for example because a certain globally unique resource name was already taken) make sure to update any references to this name in the module parameter files. You can find further details about this pipeline [here](./TestingDesign#Module-Dependencies). -In case you want to not only leverage the module templates but actually re-use the implemented pipelines & testing framework as well, you need to set up a few additional secrets in your GitHub environment: +> ***Note:*** If you want to contribute back to the _CARML_ repository, make sure to not include your local dependency-names in the PR. Instead, cherry-pick the changes you want to contribute (for example in a dedicated branch) and open a Pull Request for those. -| Secret Name | Example | Description | -| - | - | - | -| `ARM_MGMTGROUP_ID` | `de33a0e7-64d9-4a94-8fe9-b018cedf1e05` | The group ID of the management group to test deploy modules of that level in. | -| `ARM_SUBSCRIPTION_ID` | `d0312b25-9160-4550-914f-8738d9b5caf5` | The subscription ID of the subscription to test deploy modules of that level in. | -| `ARM_TENANT_ID` | `9734cec9-4384-445b-bbb6-767e7be6e5ec` | The tenant ID of the tenant to test deploy modules of that level in. | -| `AZURE_CREDENTIALS` | `{"clientId": "4ce8ce4c-cac0-48eb-b815-65e5763e2929", "clientSecret": "", "subscriptionId": "d0312b25-9160-4550-914f-8738d9b5caf5", "tenantId": "9734cec9-4384-445b-bbb6-767e7be6e5ec" }` | The login credentials to use to log into the target Azure environment to test in. | -| `PLATFORM_REPO_UPDATE_PAT` | `` | A PAT with enough permissions assigned to it to push into the main branch. This PAT is leveraged by pipelines that automatically generate ReadMe files to keep them up to date | -| `DEPLOYMENT_SP_ID` | `de33a0e7-64d9-4a94-8fe9-b018cedf1e05` | This is the Principal (Object ID) for the Service Principal used as the `AZURE_CREDENTIALS`. It is used for Default Role Assignments when Modules are being deployed into Azure | +### Platform variables & secrets -The permissions that the principal needs differ between modules. Required permissions are in some cases documented in the modules readme. See [Azure/login](https://github.com/Azure/login) for more info about the secret creation. +Several fundamental variables are shared among all pipelines and are stored in a pipeline variable file. In case you want to not only leverage the module templates but actually re-use the implemented pipelines & testing framework as well, you need to set up several [variables](./PipelinesDesign#pipeline-variables) & [secrets](./PipelinesDesign#pipeline-secrets) in your environment. ## **Option 2:** Use it as a local reference to build bicep templates @@ -211,7 +218,7 @@ Note: There are default tokens that can be enabled on any resource that leverage - `<>`: Will point to the Service Principal ID used for deployments. - `<>`: Will point to the Azure Resource Group where the resources are being deployed to. (This isn't defined in the secrets section but is injected at runtime) -Review [Parameter File Tokens Design](./ParameterFileTokens.md) for more details. +Review [Parameter File Tokens Design](./ParameterFileTokens) for more details. --- diff --git a/docs/wiki/PipelinesDesign.md b/docs/wiki/PipelinesDesign.md index 9f339ee46e..617d437f5a 100644 --- a/docs/wiki/PipelinesDesign.md +++ b/docs/wiki/PipelinesDesign.md @@ -12,29 +12,30 @@ This section gives you an overview of the design principals the pipelines follow - [Module pipeline inputs](#module-pipeline-inputs) - [Pipeline phases](#pipeline-phases) - [Validate](#validate) - - [Static module validation](#static-module-validation) - - [Simulated deployment validation](#simulated-deployment-validation) - [Test deploy](#test-deploy) - - [Removal](#removal) + - [Removal](#removal) - [Publish](#publish) - [Shared concepts](#shared-concepts) - - [Pipeline variables](#pipeline-variables) - - [***General***](#general) - - [***Template-specs specific (publishing)***](#template-specs-specific-publishing) - - [***Private bicep registry specific (publishing)***](#private-bicep-registry-specific-publishing) - [Prerequisites](#prerequisites) + - [Pipeline secrets](#pipeline-secrets) + - [Pipeline variables](#pipeline-variables) - [Tokens Replacement](#tokens-replacement) - [Platform pipelines](#platform-pipelines) - [Dependencies pipeline](#dependencies-pipeline) - - [Dependencies pipeline inputs](#dependencies-pipeline-inputs) - [ReadMe pipeline](#readme-pipeline) - [Wiki pipeline](#wiki-pipeline) - [DevOps-Tool-specific considerations](#devops-tool-specific-considerations) - [GitHub Workflows](#github-workflows) - - [**Component:** Variable file(s)](#component-variable-files) - - [**Component:** Composite Actions**](#component-composite-actions) - - [**Component:** Workflows](#component-workflows) - + - [Component: GitHub secret](#github-component-github-secrets) + - [Component: Variable file](#github-component-variable-file) + - [Component: Composite actions](#github-component-composite-actions) + - [Component: Workflows](#github-component-workflows) + - [Azure DevOps Pipelines](#azure-devops-pipelines) + - [Component: Service connection](#azure-devops-component-service-connection) + - [Component: Variable group](#azure-devops-component-variable-group) + - [Component: Variable file](#azure-devops-component-variable-file) + - [Component: Pipeline templates](#azure-devops-component-pipeline-templates) + - [Component: Pipelines](#azure-devops-component-pipelines) --- # Module Pipelines @@ -92,7 +93,7 @@ The parameter files used in this stage should ideally cover as many scenarios as Note that, for the deployments we have to account for certain [prerequisites](#prerequisites) and also consider the [tokens replacement](#tokens-replacement) logic we leverage on this platform. -### Removal +#### Removal The removal phase is strongly coupled with the previous deployment phase. Fundamentally, we want to remove any test-deployed resource after its test concluded. If we would not, we would generate unnecessary costs and may temper with any subsequent test. Some resources may require a dedicated logic to be removed. This logic should be stored alongside the generally utilized removal script in the `.utilities/pipelines/resourceRemoval` folder and be referenced by the `Remove-DeployedModule.ps1` script that orchestrates the removal. @@ -116,13 +117,33 @@ By the time of this writing, the publishing experience works as follows: ## Shared concepts There are several concepts that are shared among the phases. Most notably -- [Pipeline variables](#pipeline-variables) - [Prerequisites](#prerequisites) +- [Pipeline secrets](#pipeline-serets) +- [Pipeline variables](#pipeline-variables) - [Tokens Replacement](#tokens-replacement) +### Prerequisites + +For both the [simulated deployment validation](#simulated-deployment-validation) as well as the [test deployment](#test-deployment) we should account for the following prerequisites: +- A _"Sandbox"_ or _"Engineering"_ **validation subscription** (in Azure) has to be used to test if the modules (or other components) are deployable. This subscription must not have connectivity to any on-premises or other Azure networks. +- An Azure Active Directory [service principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/app-objects-and-service-principals#service-principal-object) (AAD SPN) to authenticate to the validation subscription and run the test deployments of the modules. + +### Pipeline secrets + +To use the platform pipelines you need several secrets set up in your DevOps platform. Contrary to the pipeline variables we describe in the [subsequent section](#pipeline-variables) these following variables are considered sensitive. + +| Secret Name | Example | Description | +| - | - | - | +| `ARM_MGMTGROUP_ID` | `de33a0e7-64d9-4a94-8fe9-b018cedf1e05` | The group ID of the management group to test deploy modules of that level in. | +| `ARM_SUBSCRIPTION_ID` | `d0312b25-9160-4550-914f-8738d9b5caf5` | The subscription ID of the subscription to test deploy modules of that level in. | +| `ARM_TENANT_ID` | `9734cec9-4384-445b-bbb6-767e7be6e5ec` | The tenant ID of the tenant to test deploy modules of that level in. | +| `DEPLOYMENT_SP_ID` | `de33a0e7-64d9-4a94-8fe9-b018cedf1e05` | This is the Principal (Object ID) for the Service Principal used as the Azure service connection. It is used for Default Role Assignments when Modules are being deployed into Azure | + +The location where to set these secrets up depends on the DevOps platform you use. Also, there may be additional platform-specific secrets to set up. For further information please refer to [this section](#devops-tool-specific-considerations). + ### Pipeline variables -The primary pipeline variable file hosts the fundamental pipeline configuration. In here you will find and can configure information such as: +The primary pipeline variable file hosts the fundamental pipeline configuration and is stored in a different location, based on the [DevOps platform](#devops-tool-specific-considerations). In here you will find and can configure information such as: #### ***General*** | Variable Name | Example Value | Description | @@ -145,12 +166,6 @@ The primary pipeline variable file hosts the fundamental pipeline configuration. | `bicepRegistryRGName` | "artifacts-rg" | The resource group of the container registry to publish bicep templates to. Is used to create a new container registry if not yet existing | | `bicepRegistryDoPublish` | "true" | A central switch to enable/disable publishing to the private bicep registry | -### Prerequisites - -For both the [simulated deployment validation](#simulated-deployment-validation) as well as the [test deployment](#test-deployment) we should account for the following prerequisites: -- A _"Sandbox"_ or _"Engineering"_ **validation subscription** (in Azure) has to be used to test if the modules (or other components) are deployable. This subscription must not have connectivity to any on-premises or other Azure networks. -- An Azure Active Directory Service Principal (AAD SPN) to authenticate to the validation subscription and run the test deployments of the modules. - ### Tokens Replacement The validation or deploy actions/templates includes a step that replaces certain strings in a parameter file with values that are provided from the module workflow. This helps achieve the following: @@ -200,47 +215,59 @@ The purpose of this pipeline is to sync any files from the `docs/wiki` folder to Depending on what DevOps tool you want to use to host the platform you will find the corresponding code in different locations. This section will give you an overview of these locations and what they are used for. - [GitHub Workflows](#github-workflows) +- [Azure DevOps Pipelines](#azure-devops-pipelines) ## GitHub Workflows -GitHub actions & workflows are the CI/CD solution provided by GitHub. To get the platform going, we use the following three elements: -- **Variable Files:** These file(s) contain the configuration for all module pipelines in this repository. -- **Composite Actions:** Composite actions bundle a set of actions for a specific purpose together. They are referenced by module pipelines. -- **Workflows:** GitHub workflows make up all our pipelines and leverage the _composite actions_. We have one workflow per module, plus several platform pipelines. +[GitHub actions & workflows](https://docs.github.com/en/actions) are the CI/CD solution provided by GitHub. To get the platform going, we use the following elements: +- **[GitHub secrets:](#github-component-github-secrets)** We leverage GitHub repository secrets to store central and potentially sensitive information we need to perform deployments and other platform specific actions +- **[Variable file:](#github-component-variable-file)** This file contains the configuration for all module pipelines in this repository. +- **[Composite actions:](#github-component-composite-actions)** Composite actions bundle a set of actions for a specific purpose together. They are referenced by module pipelines. +- **[Workflows:](#github-component-workflows)** GitHub workflows make up all our pipelines and leverage the _composite actions_. We have one workflow per module, plus several platform pipelines. In the following sub-sections we will take a deeper look into each element. -### **Component:** Variable file(s) +### **GitHub Component:** GitHub secrets + +The GitHub repository secrets can be set up in the repositories _'Settings'_ as described [here](https://docs.github.com/en/actions/security-guides/encrypted-secret). + +For _GitHub_ in particular we need the following secrets in addition to those described in the shared [pipeline secrets](#pipeline-secrets) section: -The [pipeline configuration file](#pipeline-variables) can be found at `.github/variables/variables.module.json`. +| Secret Name | Example | Description | +| - | - | - | +| `AZURE_CREDENTIALS` | `{"clientId": "4ce8ce4c-cac0-48eb-b815-65e5763e2929", "clientSecret": "", "subscriptionId": "d0312b25-9160-4550-914f-8738d9b5caf5", "tenantId": "9734cec9-4384-445b-bbb6-767e7be6e5ec" }` | The login credentials of the [deployment principal](./GettingStarted#platform-principal) to use to log into the target Azure environment to test in. The format is described [here](https://github.com/Azure/login#configure-deployment-credentials). | +| `PLATFORM_REPO_UPDATE_PAT` | `` | A PAT with enough permissions assigned to it to push into the main branch. This PAT is leveraged by pipelines that automatically generate ReadMe files to keep them up to date | + +### **GitHub Component:** Variable file -### **Component:** Composite Actions** +The [pipeline configuration file](#pipeline-variables) can be found at `.github/variables/global.variables.json`. + +### **GitHub Component:** Composite Actions** We use several composite actions to perform various tasks shared by our module workflows: -- **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:**

- This action implements allows us to fetch workflow input values from the module's workflow file, even if the pipeline was not triggered via a `workflow_dispatch` action. Without it we would not be able to process the contained information and would need to duplicate the configuration as workflow variables. - -### **Component:** Workflows - -These are the individual end-to-end workflows we have for each module. Leveraging the [composite actions](#component-composite-actions) described before, they orchestrate the testing & publishing of their module. - -Comparing multiple workflows you'll notice they are almost identically, yet differ in a few important areas: - -- The ***path filters*** of the workflow trigger: - - 1 for the composite actions - - 1 of the path filters should be the relative path to the workflow itself - - 1 should be the relative path to the module folder - - 1 should exclude the readme +| Composite Action | Description | +| - | - | +| **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:

  • A [simulated deployment](#simulated-deployment-validation) using a provided parameter file.
  • An [actual deployment](#test-deploy) to Azure using a provided parameter file.
  • 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](#github-component-variable-file). | +| **getWorkflowInput:** | This action allows us to fetch workflow input values from the module's workflow file, even if the pipeline was not triggered via a `workflow_dispatch` action. Without it we would not be able to process the contained information and would need to duplicate the configuration as workflow variables. Such input values are for example the removal switch `removeDeployment`. | + +### **GitHub Component:** Workflows + +These are the individual end-to-end workflows we have for each module. Leveraging the [composite actions](#github-component-composite-actions) described before, they orchestrate the testing & publishing of their module. + +Comparing multiple workflows you'll notice they are almost identical, yet differ in a few important areas: + +- The ***[path filters](https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions)*** of the workflow trigger: + | Purpose | Example | + | - | - | + | Include the composite actions | `- '.github/actions/templates/**'` | + | Include the relative path to the workflow itself | `- '.github/workflows/ms.network.virtualwans.yml'` | + | Include the relative path to the module folder | `- 'arm/Microsoft.Network/virtualWans/**'` | + | Exclude any ReadMe | `- '!*/**/readme.md'` | + + Full example ```yaml push: branches: @@ -253,22 +280,116 @@ Comparing multiple workflows you'll notice they are almost identically, yet diff ``` - The ***environment variables*** The environment variables are leveraged by the workflow to fundamentally process the module. We need: - - 1 variable with the module name - - 1 variable with the relative path to the module folder - - 1 variable with the relative path to the workflow itself + | Variable | Description | Example | + | - | - | - | + | `modulePath` | Relative path to the module folder | `modulePath: 'arm/Microsoft.Network/virtualWans'` | + | `workflowPath` | Relative path to the workflow itself | `workflowPath: '.github/workflows/ms.network.virtualwans.yml'` | + + Full example ```yaml env: - moduleName: 'virtualWans' modulePath: 'arm/Microsoft.Network/virtualWans' workflowPath: '.github/workflows/ms.network.virtualwans.yml' ``` -- (optionally) The relative path to a ***removal script*** - As described [previously](#removal), some scripts may require custom logic to be removed. This logic should be stored in a script and be referenced by the corresponding module's workflow. To reference this script you can use the `relativePathOfRemovalScript` parameter of the `removeModule` composite action as shown below. + +## Azure DevOps Pipelines + +[Azure DevOps pipelines](https://docs.microsoft.com/en-us/azure/devops/pipelines/get-started/what-is-azure-pipelines?view=azure-devops) are the CI/CD solution provided by Azure DevOps. To enable the CARML platform to function, we use the following components in Azure DevOps: + +- **[Service connection:](#azure-devops-component-service-connection)** The [service connection](https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml) is a wrapper for the [deployment principal](./GettingStarted#platform-principal) that performs all actions in the target SBX/DEV/TEST subscription +- **[Variable group:](#azure-devops-component-variable-group)** [Variable groups](https://docs.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups?view=azure-devops&tabs=yaml) allow us to store both sensitive as well configuration data securely in Azure DevOps. +- **[Variable file:](#azure-devops-component-variable-file)** The [variable file](https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=example%2Cparameter-schema#variable-templates) is a version controlled variable file that hosts pipeline configuration data such as the agent pool to use. +- **[Pipeline templates:](#azure-devops-component-pipeline-templates)** [Pipeline templates](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops) allow us to re-use pipeline logic across multiple referencing pipelines +- **[Pipelines:](#azure-devops-component-pipelines)** The [pipelines](https://docs.microsoft.com/en-us/azure/devops/pipelines/?view=azure-devops) contain all logic we execute as part of our platform and leverage the _pipeline templates_. + +### **Azure DevOps Component:** Service Connection + +The service connection must be set up in the project's settings under _Pipelines: Service connections_ (a step by step guide can be found [here](https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml)). + +It's name must match the one configured as `serviceConnection` in the [variable file](#azure-devops-component-variable-file). + +### **Azure DevOps Component:** Variable group + +The variable group can be set up under _Pipelines: Library_ as described [here](https://docs.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups?view=azure-devops&tabs=classic#create-a-variable-group). Make sure you set up all secrets described [here](#pipeline-secrets) and that its name matches the `group` reference used in the [module pipelines](#azure-devops-component-pipelines). For example + +```yaml +variables: + - group: 'PLATFORM_VARIABLES' +``` + +### **Azure DevOps Component:** Variable file + +The variable file is a source controlled configuration file to control the behavior of the pipeline. The file is stored in path `.azuredevops/pipelineVariables/global.variables.yml`. + +This file is divided into multiple categories of variables used in the pipelines: + +| Section | Description | +| - | - | +| **Agent settings** | Contains information of the agent and service connection to use | +| **Source** | Contains information about the Azure DevOps instance itself, including some important folder paths | +| **Validation deployment settings** | Contains the default deployment information to use in the pipeline. For example, the default location to deploy resources to | +| **Publish: Template-Spec settings** | Contains the required information to publish to template-specs, including a switch to toggle the publishing to template specs on or off | +| **Publish: Universal packages settings** | Contains the required information to publish to universal packages, including a switch to toggle the publishing to universal packages on or off | +| **Publish: Private Bicep Registry settings** | Contains the required information to publish to the private bicep registry, including a switch to toggle the publishing to the private bicep registry on or off | +| **Azure PowerShell Version** | Contains information about the default PowerShell version to use in the pipeline | + +More information about the contained variables can be found in the linked file itself. + +### **Azure DevOps Component:** Pipeline templates + +To keep the amount of pipeline code at a minimum we make heavy use of pipeline templates. Following you can find an overview of the ones we use and what they are used for: + +| Template Name | Description | +| - | - | +| **module.jobs.validate.yml** | This template perform all [static tests](#static-module-validation) for a module using Pester. | +| **module.jobs.deploy.yml** | This template performs a [test deployment](#simulated-deployment-validation) followed by an [actual deployment](#test-deploy) to Azure using a provided parameter file. Once a deployment completed it [removes](#removal) the resource | +| **module.jobs.publish.yml** | This template is capable of [publishing](#publish) the given template to a location specified in the pipeline [variable file](#azure-devops-component-variable-file) | + +Each file can be found in path `.azuredevops/pipelineTemplates`. + +### **Azure DevOps Component:** Pipelines + +These are the individual end-to-end pipelines we have for each module. Leveraging the [templates](#azure-devops-component-pipeline-templates) described before, they orchestrate the testing & publishing of their module. + +While they look very similar they have specific areas in which they differ: + +- The ***path filters*** of the pipeline trigger: + Purpose | Example | + | - | - | + | Include the templates | `- '/.azuredevops/pipelineTemplates/module.*.yml'` | + | Include the relative path to the pipeline itself | `- '/.azuredevops/modulePipelines/ms.analysisservices.servers.yml' ` | + | Include the relative path to the module folder | `- '/arm/Microsoft.AnalysisServices/servers/*'` | + | Exclude any readme | `- '/**/*.md'` | + + Full example: + ```yaml + trigger: + batch: true + branches: + include: + - main + paths: + include: + - '/.azuredevops/modulePipelines/ms.analysisservices.servers.yml' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '/arm/Microsoft.AnalysisServices/servers/*' + exclude: + - '/**/*.md' + ``` + > ***Note:*** By the time of this writing, wildcards are temporarily not supported by Azure DevOps +- The ***variables*** + The variables are leveraged by the pipelines to fundamentally process the module. We need: + | Variable | Description | Example | + | - | - | - | + | `template: (...)` | Reference to the [shared variable file](#azure-devops-component-variable-file) | `- template: '/.azuredevops/pipelineVariables/global.variables.yml'` | + | `group: (...)` | Reference to the [variable group](#azure-devops-component-variable-group) with the platform secrets | `- group: PLATFORM_VARIABLES` | + | `modulePath` | Relative path to the module folder | - name: modulePath

      value: '/arm/Microsoft.AnalysisServices/servers' | + + Full example: ```yaml - - name: 'Remove module' - uses: ./.github/actions/templates/removeModule - with: - moduleName: '${{ env.moduleName }}' - resourceGroupName: '${{ env.resourceGroupName }}' - relativePathOfRemovalScript: 'utilities/pipelines/resourceRemoval/Remove-vWan.ps1' + variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/arm/Microsoft.AnalysisServices/servers' ``` diff --git a/docs/wiki/PipelinesUsage.md b/docs/wiki/PipelinesUsage.md index 45e652c650..fbc9192352 100644 --- a/docs/wiki/PipelinesUsage.md +++ b/docs/wiki/PipelinesUsage.md @@ -11,7 +11,8 @@ This section gives you an overview of how to interact with the platform pipeline - [Operate the module pipelines](#operate-the-module-pipelines) - [Operate the dependency pipelines](#operate-the-dependency-pipeline) - [DevOps-Tool-specific](#devops-tool-specific-guidance) - - [GitHub Workflows](#github-workflows) + - [GitHub workflows](#github-workflows) + - [Azure DevOps pipelines](#azure-devops-pipelines) --- @@ -71,13 +72,13 @@ To add a new module pipeline we recommend to create a copy of a currently existi This section will give you guidance on how to operate the pipelines on a specific DevOps platform (for example GitHub or Azure DevOps). -## GitHub Workflows +## GitHub workflows -This section focuses on GitHub Actions & Workflows. +This section focuses on _GitHub_ Actions & Workflows. ### Trigger a pipeline -To trigger a pipeline in GitHub, first navigate to the 'Actions' tab in your repository. +To trigger a pipeline in _GitHub_, first navigate to the 'Actions' tab in your repository. Actions tab @@ -85,9 +86,59 @@ then select the pipeline of your choice from the list on the left, followed by ' Run workflow -Depending on the pipeline you selected you may have additional input parameters you can provide aside from the branch: -- [Module pipeline](./TestingDesign#module-pipeline-inputs) inputs +Depending on the pipeline you selected you may have additional input parameters you can provide aside from the branch. An outline can be found [here](./PipelinesDesign#module-pipeline-inputs). ### Register a pipeline -To register a pipeline in GitHub you have to create the workflow file (`.yml`) and store it inside the folder `.github/workflows`. Once merged to [main\|master], GitHub will automatically list the new workflow in the 'Actions' tab. +To register a workflow in _GitHub_ you have to create the workflow file (`.yml`) and store it inside the folder `.github/workflows`. +> ***Note:*** Once merged to [main\|master], GitHub will automatically list the new workflow in the 'Actions' tab. + +## Azure DevOps pipelines + +This sections focuses on _Azure DevOps_ pipelines. + +### Trigger a pipeline + +To trigger a pipeline in _Azure DevOps_, first navigate to the 'Pipelines' section (blue rocket) and select the pipeline you want to trigger. + +Pipeline start step 1 + +Once selected, click on the 'Run pipeline' button on the top right. + +Pipeline start step 2 + +Now you can trigger the pipeline by selecting the 'Run' button on the bottom right. + +Pipeline start step 3 + +Depending on the pipeline you selected you may have additional input parameters you can provide aside from the branch. An outline can be found [here](./PipelinesDesign#module-pipeline-inputs). + +### Register a YAML pipeline + +To register a pipeline in _Azure DevOps_ you first have to create a workflow file (.yml) and upload it to a repository of your choice (e.g. in _Azure DevOps_ or _GitHub_). + +Then, navigate to the 'Pipelines' section (blue rocket) and select the 'New pipeline' button on the top right. + +Register new pipeline step 1 + +Next, select the repository-type you stored your template in. _Azure DevOps_ will then try to fetch all repositories you have access to. + +Register new pipeline step 2 + +Now we have to select the particular repository to get the pipeline file from. + +Register new pipeline step 3 + +Following, choose 'Existing Azure Pipelines YAML file' on the bottom of the list. + +Register new pipeline step 4 + +The previous action will open a new blade that asks you for the branch you stored the pipeline file in (e.g. `master`) and then asks for the relative path (from root of the repository) of the pipeline file. + +Register new pipeline step 5 + +Finally, _Azure DevOps_ should show you the pipeline file you created. The last thing you have to do is to either select 'Run' on the top right (which will save & run the pipeline), or click the little arrow next to it and just save the pipeline. + +Once saved you can also re-name / move the pipeline in the same view. However, this only works once you saved the pipeline at least once. + +Register new pipeline step 6 diff --git a/docs/wiki/media/pipelineNew.png b/docs/wiki/media/pipelineNew.png new file mode 100644 index 0000000000..0dd5deba5a Binary files /dev/null and b/docs/wiki/media/pipelineNew.png differ diff --git a/docs/wiki/media/pipelineNew2.png b/docs/wiki/media/pipelineNew2.png new file mode 100644 index 0000000000..bce70e999a Binary files /dev/null and b/docs/wiki/media/pipelineNew2.png differ diff --git a/docs/wiki/media/pipelineNew3.png b/docs/wiki/media/pipelineNew3.png new file mode 100644 index 0000000000..b8fc8945a2 Binary files /dev/null and b/docs/wiki/media/pipelineNew3.png differ diff --git a/docs/wiki/media/pipelineNew4.png b/docs/wiki/media/pipelineNew4.png new file mode 100644 index 0000000000..ad431f1be0 Binary files /dev/null and b/docs/wiki/media/pipelineNew4.png differ diff --git a/docs/wiki/media/pipelineNew5.png b/docs/wiki/media/pipelineNew5.png new file mode 100644 index 0000000000..c90dc6814c Binary files /dev/null and b/docs/wiki/media/pipelineNew5.png differ diff --git a/docs/wiki/media/pipelineNew6.png b/docs/wiki/media/pipelineNew6.png new file mode 100644 index 0000000000..38563b24fb Binary files /dev/null and b/docs/wiki/media/pipelineNew6.png differ diff --git a/docs/wiki/media/pipelineStart.png b/docs/wiki/media/pipelineStart.png new file mode 100644 index 0000000000..a720bf9214 Binary files /dev/null and b/docs/wiki/media/pipelineStart.png differ diff --git a/docs/wiki/media/pipelineStart2.png b/docs/wiki/media/pipelineStart2.png new file mode 100644 index 0000000000..91dd023867 Binary files /dev/null and b/docs/wiki/media/pipelineStart2.png differ diff --git a/docs/wiki/media/pipelineStart3.png b/docs/wiki/media/pipelineStart3.png new file mode 100644 index 0000000000..eb5e03f27f Binary files /dev/null and b/docs/wiki/media/pipelineStart3.png differ diff --git a/utilities/tools/AzureDevOps/Set-DevOpsPipelineFiles.ps1 b/utilities/tools/AzureDevOps/Set-DevOpsPipelineFiles.ps1 new file mode 100644 index 0000000000..7c59ed44ad --- /dev/null +++ b/utilities/tools/AzureDevOps/Set-DevOpsPipelineFiles.ps1 @@ -0,0 +1,179 @@ + +<# +.SYNOPSIS +Generate all module pipeline files for Azure DevOps based on the ones currently implement for GitHub workflows + +.DESCRIPTION +Generate all module pipeline files for Azure DevOps based on the ones currently implement for GitHub workflows +Note: The parameter file refernces are fetched from the actual module folder. Hence the list may diviate from what is specified in the corrsponding GitHub workflow. + +.PARAMETER DevOpsPipelineFolderPath +Optional. The path where the Azure DevOps pipelines should be stored +Defaults to: '.azuredevops/modulePipelines' + +.PARAMETER DevOpsPipelineTemplatePath +Optional. The path to the Azure DevOps pipeline template file. +Defaults to: './devOpsPipelineTemplate.yml' + +Should contain the tokens (<...>) to be replaced. +Currently supported are: +- pipelineName +- removeFlag +- versionFlag +- pipelineFileName +- relativeModuleFolderPath +- pipelineParamterPaths (should be set behind the 'deploymentBlocks: <...>') +- relativePathOfRemovalScript (should bet set right under the removal template) + +.PARAMETER GitHubWorkflowFolderPath +Optional. The path to the GitHub workflows folder to crawl from +Defaults to: '.github/workflows' + +.EXAMPLE +Set-DevOpsPipelineFiles + +Generate all Azure DevOps pipeline files in the default DevOps pipeline folder based on the workflows files in the default workflows folder based on the provided default template +#> +function Set-DevOpsPipelineFiles { + + + [CmdletBinding(SupportsShouldProcess)] + param ( + [Parameter(Mandatory = $false)] + [string] $DevOpsPipelineFolderPath = (Join-Path (Split-Path (Split-Path (Split-Path $PSScriptRoot))) '.azuredevops' 'modulePipelines'), + + [Parameter(Mandatory = $false)] + [string] $DevOpsPipelineTemplatePath = (Join-Path $PSScriptRoot 'src' 'devOpsPipelineTemplate.yml'), + + [Parameter(Mandatory = $false)] + [string] $GitHubWorkflowFolderPath = (Join-Path (Split-Path (Split-Path (Split-Path $PSScriptRoot))) '.github' 'workflows') + ) + + ####################### + ## General details ## + ####################### + $repoRoot = Split-Path (Split-Path $GitHubWorkflowFolderPath) + + ###################################### + ## Fetch details for all workflows # + ###################################### + $foundDetails = [System.Collections.ArrayList]@() + $moduleWorkflows = Get-ChildItem -Path $GitHubWorkflowFolderPath -Filter 'ms.*' + foreach ($workflowPath in $moduleWorkflows.FullName) { + + $workFlowContent = Get-Content $workflowPath + + ## Fetch Pipeline Name + ## =================== + $PipelineName = $workFlowContent[0].Split('name: ')[1].Replace("'", '').Replace(': ', ' - ') + + ## Fetch Remove Deployment Flag + ## ============================ + $removeParamIndex = 0 + for ($removeParamIndex = 0; $removeParamIndex -lt $workFlowContent.Count; $removeParamIndex++) { + if ($workFlowContent[$removeParamIndex] -match 'removeDeployment:') { + break + } + } + $removeFlag = $workFlowContent[$removeParamIndex + 4].Split(':')[1].Replace("'", '').Trim() + + ## Fetch Version Flag + ## ================== + $versionParamIndex = 0 + for ($versionParamIndex = 0; $versionParamIndex -lt $workFlowContent.Count; $versionParamIndex++) { + if ($workFlowContent[$versionParamIndex] -match 'customVersion:') { + break + } + } + $versionFlag = $workFlowContent[$versionParamIndex + 3].Split(':')[1].Replace("'", '').Trim() + + ## Fetch Pipeline File Name + ## ======================== + $PipelineFileName = Split-Path $workflowPath -Leaf + + ## Fetch Relative Module Folder Path + ## ================================= + $relativePathVarIndex = 0 + for ($relativePathVarIndex = 0; $relativePathVarIndex -lt $workFlowContent.Count; $relativePathVarIndex++) { + if ($workFlowContent[$relativePathVarIndex] -match 'modulePath: ') { + break + } + } + $RelativeModuleFolderPath = $workFlowContent[$relativePathVarIndex].Split(':')[1].Replace("'", '').Trim() + + ## Fetch Pipeline Parameter Paths + ## ============================== + $moduleParameterFiles = Get-ChildItem (Join-Path $repoRoot $RelativeModuleFolderPath '.parameters') + $PipelineParamterFileNames = $moduleParameterFiles | Split-Path -Leaf + + ## Fetch optional removal script path + ## ================================== + $relativePathRemovalIndex = 0 + for ($relativePathRemovalIndex = 0; $relativePathRemovalIndex -lt $workFlowContent.Count; $relativePathRemovalIndex++) { + if ($workFlowContent[$relativePathRemovalIndex] -match 'relativePathOfRemovalScript: ') { + break + } + } + if ($relativePathRemovalIndex -ne $workFlowContent.Count) { + $relativePathOfRemovalScript = $workFlowContent[$relativePathRemovalIndex].Split(':')[1].Trim() + } else { + $relativePathOfRemovalScript = '' + } + + ## Build Result Set + ## ================ + $foundDetails += @{ + PipelineName = $PipelineName + removeFlag = $removeFlag + versionFlag = $versionFlag + PipelineFileName = $PipelineFileName + RelativeModuleFolderPath = $RelativeModuleFolderPath + PipelineParamterFileNames = $PipelineParamterFileNames + relativePathOfRemovalScript = $relativePathOfRemovalScript + } + } + ############### + ## PRINT ## + ############### + Write-Verbose ($foundDetails | ConvertTo-Json | ConvertFrom-Json | Format-Table | Out-String) + + ############################ + ## Create Dev Ops Files ## + ############################ + foreach ($tokenSet in $foundDetails) { + $newFilePath = Join-Path $DevOpsPipelineFolderPath $tokenSet.PipelineFileName + + if (-not (Test-Path $newFilePath)) { + if ($PSCmdlet.ShouldProcess("New file in path [$newFilePath]", 'Create')) { + $null = New-Item -Path $newFilePath -ItemType 'File' + } + } + + $newFileContent = Get-Content -Path $DevOpsPipelineTemplatePath -Raw + + foreach ($key in $tokenSet.Keys) { + switch ($key) { + 'PipelineParamterFileNames' { + $formattedParamFiles = $tokenSet[$key] | ForEach-Object { ' - path: $(modulePath)/.parameters/{0}' -f $_ } + $targetString = "`n{0}" -f ($formattedParamFiles -join "`n") + $newFileContent = $newFileContent.Replace('', $targetString) + } + 'relativePathOfRemovalScript' { + if (-not [String]::IsNullOrEmpty($tokenSet[$key])) { + $formattedRemovelParameter = "parameters:`n relativePathOfRemovalScript: {0}" -f $tokenSet[$key] + $newFileContent = $newFileContent.Replace('', $formattedRemovelParameter) + } else { + $newFileContent = $newFileContent.Replace('', '') + } + } + Default { + $newFileContent = $newFileContent.Replace("<$key>", $tokenSet[$key]) + } + } + } + + if ($PSCmdlet.ShouldProcess("Content in file [$newFilePath]", 'Set')) { + $null = Set-Content -Path $newFilePath -Value $newFileContent.TrimEnd() -Force + } + } +} diff --git a/utilities/tools/AzureDevOps/src/devOpsPipelineTemplate.yml b/utilities/tools/AzureDevOps/src/devOpsPipelineTemplate.yml new file mode 100644 index 0000000000..a30669e22b --- /dev/null +++ b/utilities/tools/AzureDevOps/src/devOpsPipelineTemplate.yml @@ -0,0 +1,61 @@ +name: '' + +parameters: + - name: removeDeployment + displayName: Remove deployed module + type: boolean + default: + - 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: '' + +trigger: + batch: true + branches: + include: + - main + paths: + include: + - '/.azuredevops/modulePipelines/' + - '/.azuredevops/pipelineTemplates/module.*.yml' + - '//*' + exclude: + - '/**/*.md' + +variables: + - template: '/.azuredevops/pipelineVariables/global.variables.yml' + - group: 'PLATFORM_VARIABLES' + - name: modulePath + value: '/' + +stages: + - stage: Validation + displayName: Pester tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml + + - stage: Deployment + displayName: Deployment tests + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml + parameters: + removeDeployment: '${{ parameters.removeDeployment }}' + deploymentBlocks: + + - stage: Publishing + displayName: Publish module + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml + parameters: + versioningOption: '${{ parameters.versioningOption }}' + customVersion: '${{ parameters.customVersion }}' diff --git a/utilities/tools/Register-AzureDevOpsPipelines.ps1 b/utilities/tools/Register-AzureDevOpsPipelines.ps1 new file mode 100644 index 0000000000..bee6cb2411 --- /dev/null +++ b/utilities/tools/Register-AzureDevOpsPipelines.ps1 @@ -0,0 +1,215 @@ +<# +.SYNOPSIS +Register or update all specified DevOps pipelines in a target DevOps Project + +.DESCRIPTION +Register or update all specified DevOps pipelines in a target DevOps Project +If this scripts is run within an Azure pipeline the environment variable AZURE_DEVOPS_EXT_PAT needs to be set with $(System.AccessToken) within your pipeline. +Since tty is not supported within a pipelune run, az devops login is using the token which is set via AZURE_DEVOPS_EXT_PAT. + +.REQUIREMENTS +- Azure CLI 2.13.0 +- Azure CLI extension devops 0.18.0 +- Repository for which the pipeline needs to be configured. +- The '' Build Service needs 'Edit build pipeline' permissions +Reference: https://docs.microsoft.com/en-us/azure/devops/pipelines/policies/permissions?view=azure-devops#pipeline-permissions + +The script can be run as often as you want without breaking anything. Pipelines that already exist will be skipped. + +.PARAMETER OrganizationName +Required. The name of the Azure DevOps organization. + +.PARAMETER ProjectName +Required. The name of the Azure DevOps project. + +.PARAMETER SourceRepository +Optional. The name of the source repository. +Defaults to 'Azure/ResourceModules' + +.PARAMETER SourceRepositoryType +Optional. The type of source repository. Either 'GitHub' or 'tfsgit' (for Azure DevOps). +Defaults to 'GitHub'. + +.PARAMETER GitHubServiceConnectionName +Optional. The pre-created service connection to the GitHub source repository if the pipeline files are in GitHub. +It is recommended to create the service connection using oAuth. + +.PARAMETER AzureDevOpsPAT +Required. The access token whith appropirate permissions to create Azure Pipelines. +Usually the System.AccessToken from an Azure Pipeline instance run has sufficent permissions as well. +Reference: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/access-tokens?view=azure-devops&tabs=yaml#how-do-i-determine-the-job-authorization-scope-of-my-yaml-pipeline +Needs at least the permissions: +- Release: Read, write, execute & manage + +.PARAMETER BranchName +Optional. Branch name for which the pipelines will be configured. +Default to 'main'. + +.PARAMETER PipelineTargetPath +Optional. Folder path in which the pipelines are created. +Defaults to 'Modules' + +.PARAMETER RelativePipelinePath +Optional. The relative local path to the folder with the pipeline YAML files. Make sure your workspace is opened in the repository root. +Defaults to '.azuredevops/modulePipelines'. + +.PARAMETER CreateBuildValidation +Optional. Create an additional pull request build validation rule for the pipelines. + +.EXAMPLE +$inputObject = @{ + OrganizationName = 'Contoso' + ProjectName = 'CICD' + SourceRepository = 'Azure/ResourceModules' + GitHubPAT = '' + AzureDevOpsPAT = '' +} +Register-AzureDevOpsPipelines @inputObject + +Registers all pipelines in the default path in the DevOps project [Contoso/CICD] by leveraging the given AzureDevOpsPAT and creating a service connection to GitHub using the provided GitHubPAT + +.NOTES +You'll need the 'azure-devops' extension to run this function: `az extension add --upgrade -n azure-devops` + +The steps you'd want to follow are +- (if pipelines are in GitHub) Create a service connection to the target GitHub repository using e.g. oAuth +- Create a PAT token for the Azure DevOps environment in which you want to register the pipelines in +- Run this script with the corresponding input parameters +- Create any required element required to execute the pipelines. For example: + - Library group(s) used in the pipeline(s) + - Service connection(s) used in the pipeline(s) + - Agent pool(s) used in the pipeline(s) if not using the default available agents +#> +function Register-AzureDevOpsPipelines { + + [CmdletBinding(SupportsShouldProcess)] + param ( + [Parameter(Mandatory = $true)] + [string] $OrganizationName, + + [Parameter(Mandatory = $true)] + [string] $ProjectName, + + [Parameter(Mandatory = $true)] + [string] $AzureDevOpsPAT, + + [Parameter(Mandatory = $false)] + [string] $SourceRepository = 'Azure/ResourceModules', + + [Parameter(Mandatory = $false)] + [ValidateSet('gitHub', 'tfsgit')] + [string] $SourceRepositoryType = 'gitHub', + + [Parameter(Mandatory = $false)] + [string] $GitHubPAT, + + [Parameter(Mandatory = $false)] + [string] $GitHubServiceConnectionName = $SourceRepository, + + [Parameter(Mandatory = $false)] + [string] $BranchName = 'main', + + [Parameter(Mandatory = $false)] + [string] $PipelineTargetPath = 'Modules', + + [Parameter(Mandatory = $false)] + [string] $RelativePipelinePath = '.azuredevops/modulePipelines', + + [Parameter(Mandatory = $false)] + [bool] $CreateBuildValidation = $false + ) + + Write-Verbose '##############' + Write-Verbose '# Local Data #' + Write-Verbose '##############' + Write-Verbose 'Identify relevant Azure Pipelines to be updated' + + $localPipelinePaths = (Get-ChildItem -Path $RelativePipelinePath -Recurse -Filter '*.yml').FullName + Write-Verbose ('Found [{0}] local Pipeline(s) in folder path [{1}]' -f $localPipelinePaths.Count, $RelativePipelinePath) + + $pipelinesArray = @() + foreach ($localPipelinePath in $localPipelinePaths) { + $pipelineName = (Get-Content -Path $localPipelinePath)[0].Split('name:')[1].Replace("'", '').Trim() + $pipelinesArray += @{ + ProjectName = $ProjectName + SourceRepository = $SourceRepository + BranchName = $BranchName + FolderPath = $PipelineTargetPath + ymlPath = Join-Path $relativePipelinePath (Split-Path $localPipelinePath -Leaf) + pipelineName = $pipelineName + } + } + + Write-Verbose '###############' + Write-Verbose '# Remote Data #' + Write-Verbose '###############' + Write-Verbose "Trying to login to Azure DevOps project $OrganizationName/$ProjectName with a PAT" + $orgUrl = "https://dev.azure.com/$OrganizationName/" + $AzureDevOpsPAT | az devops login + + Write-Verbose "Set default Azure DevOps configuration to $OrganizationName and $ProjectName" + az devops configure --defaults organization=$orgUrl project=$ProjectName --use-git-aliases $true + + Write-Verbose "Get and list all Azure Pipelines in $PipelineTargetPath" + $azurePipelines = az pipelines list --organization $orgUrl --project $ProjectName --folder-path $PipelineTargetPath | ConvertFrom-Json | Sort-Object name + Write-Verbose ('Found [{0}] Azure Pipeline(s) in project [{1}]' -f $azurePipelines.Count, $ProjectName) + + Write-Verbose '############' + Write-Verbose '# Evaluate #' + Write-Verbose '############' + [array] $pipelinesToBeSkipped = $pipelinesArray | Where-Object { $_.pipelineName -in $azurePipelines.name } + Write-Verbose ('[{0}] Pipeline(s) will be skipped' -f $pipelinesToBeSkipped.Count) + + [array] $pipelinesToBeUpdated = $pipelinesArray | Where-Object { $_.pipelineName -notin $azurePipelines.name } + Write-Verbose ('[{0}] Pipeline(s) have been identified to be updated' -f $pipelinesToBeUpdated.Count) + + Write-Verbose '##############' + Write-Verbose '# Processing #' + Write-Verbose '##############' + if ($SourceRepositoryType -eq 'GitHub') { + $azureDevOpsToGitHubConnection = az devops service-endpoint list -o 'Json' | ConvertFrom-Json | Where-Object { $_.Name -eq $GitHubServiceConnectionName } + } + + Write-Verbose '----------------------------------' + foreach ($pipeline in $pipelinesToBeUpdated) { + Write-Verbose ('Create Azure pipeline [{0}]' -f $pipeline.pipelineName) + + $inputObject = @( + '--repository', $pipeline.SourceRepository, + '--repository-type', $SourceRepositoryType, + '--branch', $pipeline.BranchName, + '--folder-path', $pipeline.FolderPath, + '--name', $pipeline.pipelineName, + '--yml-path', $pipeline.ymlPath.Replace('\', '/'), + '--skip-run' + ) + if ($SourceRepositoryType -eq 'GitHub') { + $inputObject += @('--service-connection', $azureDevOpsToGitHubConnection.id) + } + + if ($PSCmdlet.ShouldProcess(('Azure DevOps pipeline [{0}]' -f $pipeline.pipelineName), 'Create')) { + $pipelineresult = az pipelines create @inputObject + $pipelineobject = $pipelineresult | ConvertFrom-Json + } + + if ($createBuildValidation) { + $AzureDevOpsPAThFilter = $pipeline.ymlpath -replace 'pipeline.yml', '*' + Write-Verbose ('Configuring build validation rule for pipeline [{0}]' -f $pipeline.pipelineName) + $inputObject = @( + '--blocking', $true, + '--branch', $BranchName, + '--build-definition-id', $pipelineobject.id, + '--display-name', 'Check {0}' -f $pipeline.pipelineName, + '--manual-queue-only', $true, + '--queue-on-source-update-only', $true, + '--valid-duration', 1440, + '--path-filter', $AzureDevOpsPAThFilter, + '--repository-id', $pipelineobject.repository.id, + '--enabled', $true + ) + if ($PSCmdlet.ShouldProcess(('Mandatory repository build policy [Check {0}] for pipeline [{0}]' -f $pipeline.pipelineName), 'Create')) { + az repos policy build create @inputObject + } + } + } +}