Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
49e897f
Add integration tests for App Services and Function Apps with policy …
taoyangcloud Apr 3, 2026
b69ce6c
Update policy definitions and effects for PostgreSQL and resource res…
taoyangcloud Apr 3, 2026
3055ff1
Add policy integration test scripts and AES key generation
taoyangcloud Apr 3, 2026
3e50ebc
Add debug input option to workflow dispatch for policy files
taoyangcloud Apr 3, 2026
616dc04
Upgrade actions/upload-artifact from v4 to v7 in multiple workflow te…
taoyangcloud Apr 3, 2026
996ed6e
Upgrade azure/login action from v2 to v3 in Bicep deployment and vali…
taoyangcloud Apr 3, 2026
6fd4c0c
Remove obsolete policy exemption files and add new exemptions for LZ-…
taoyangcloud Apr 3, 2026
d9a940a
Upgrade actions/download-artifact from v4 to v8 in validation workflow
taoyangcloud Apr 4, 2026
738d4e3
Upgrade actions/download-artifact from v7 to v8 in Bicep deployment a…
taoyangcloud Apr 4, 2026
521e1a6
Add debug logging input to PR Policy Assignment Environment Consisten…
taoyangcloud Apr 4, 2026
7db26e7
Update EH-002_Effect to Deny in both dev and prod policy assignments
taoyangcloud Apr 4, 2026
d3d4669
Refactor integration test workflows and scripts for improved clarity …
taoyangcloud Apr 4, 2026
6228cde
Add concurrency settings and update linter configurations for policy …
taoyangcloud Apr 4, 2026
2a0f043
Refactor policy integration test workflows to use environment variabl…
taoyangcloud Apr 4, 2026
ce3ec37
Fix variable interpolation in wait script for initial policy evaluation
taoyangcloud Apr 4, 2026
914a0ef
Add .prettierignore to policy integration test configuration
taoyangcloud Apr 4, 2026
80b58ff
Refactor policy integration test workflows for improved clarity and f…
taoyangcloud Apr 4, 2026
f688c7d
Refactor included directory handling in policy integration tests for …
taoyangcloud Apr 4, 2026
afff89b
Refactor PowerShell script calls in action YAML files for improved re…
taoyangcloud Apr 4, 2026
74eff7d
Add restriction for 'Microsoft.DBforPostgreSQL/servers' resource type…
taoyangcloud Apr 4, 2026
9933137
Remove duplicate email domain from MON-001_allowedEmailDomains parame…
taoyangcloud Apr 4, 2026
f7bc0ba
Add maxRetry parameter to ARM API functions for improved reliability
taoyangcloud Apr 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)

trigger: none

parameters:
- name: removeTestResource
displayName: Remove Test Resources
type: boolean
default: true

- name: testToRun
displayName: "Tests To Run (separate with commas ',')"
type: string
default: " "

variables:
- template: ../../../settings.yml

stages:
# dev integration test stage
- template: ../../templates/template-stage-policy-integration-tests.yml
parameters:
vmImage: "${{ variables['defaultAgentPoolName'] }}"
azureServiceConnection: "${{ variables['ado-devPolicyServiceConnection'] }}"
azureLocation: "${{ variables['default-region'] }}"
environment: "${{ variables['devEnv'] }}"
#bicepModuleSubscriptionId: "${{ variables['vmlTemplateSpecsSubscriptionId'] }}"
deploymentMaxRetry: ${{ variables['policyIntegrationTestDeploymentMaxRetry'] }}
removeDeployment: ${{ parameters.removeTestResource }}
#preferredAzurePowerShellVersion: "${{ variables['preferredAzurePowerShellVersion'] }}"
preferredBicepCliVersion: "${{ variables['preferredBicepCliVersion'] }}"
testDirectory: "${{ variables['policyIntegrationTestsDirectory'] }}"
testIgnoreFileName: "${{ variables['policyIntegrationTestIgnoreFileName'] }}"
testToRun: "${{ parameters.testToRun }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
parameters:
- name: testConfigFilePath
displayName: "Test Global Config File Path"
type: string

- name: targetGitBranch
displayName: "Target Git Branch"
type: string
default: "main"

- name: testCaseDir
displayName: "Test Case Directory"
type: string
default: "tests/policy-integration-tests"

- name: displayName
displayName: "Job Display Name"
type: string
default: "Detect Policy Integration Test Cases"

- name: poolName
displayName: "Self Hosted Agent Pool Name"
type: string
default: ""

- name: vmImage
displayName: "MS Hosted Agent VM Image Name"
type: string
default: ""

- name: dependsOn
displayName: "Depends on"
type: object
default: []

- name: condition
displayName: "Custom Job Conditions"
type: string
default: "succeeded()"

jobs:
- job: mapTestCases
displayName: ${{ parameters.displayName }}
condition: ${{ parameters.condition }}
dependsOn: ${{parameters.dependsOn}}
variables:
- name: mapTestCasesScriptPath
value: "scripts/pipelines/policy-integration-tests/pipeline-map-policy-integration-test-cases.ps1"
workspace:
clean: all
pool:
${{ if ne(parameters.vmImage, '') }}:
vmImage: ${{ parameters.vmImage }}
${{ if ne(parameters.poolName, '') }}:
name: ${{ parameters.poolName }}
steps:
- checkout: self
fetchDepth: 0
- task: PowerShell@2
name: mapTestCasesTask
displayName: "Map Git File Changes to Test Cases"
inputs:
targetType: "filePath"
pwsh: true
filePath: $(mapTestCasesScriptPath)
arguments:
-testConfigFilePath "${{parameters.testConfigFilePath}}" `
-targetGitBranch "${{parameters.targetGitBranch}}" `
-testCaseDir "${{parameters.testCaseDir}}"
83 changes: 83 additions & 0 deletions .azuredevops/templates/template-job-get-sub-directories.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
parameters:
- name: directory
displayName: "Parent Directory"
type: string

- name: ignoreFileName
displayName: "Ignore File Name"
type: string
default: " "

- name: includedDirectory
displayName: "Included Directory"
type: string
default: " "

- name: skip
displayName: "Skip and return an empty list"
type: string
default: 'true'

- name: displayName
displayName: "Job Display Name"
type: string
default: "Get Sub Directories"

- name: jobName
displayName: "Job Name"
type: string
default: "getSubDirs"

- name: poolName
displayName: "Self Hosted Agent Pool Name"
type: string
default: ""

- name: vmImage
displayName: "MS Hosted Agent VM Image Name"
type: string
default: ""

- name: dependsOn
displayName: "Depends on"
type: object
default: []

- name: condition
displayName: "Custom Job Conditions"
type: string
default: "succeeded()"

jobs:
- job: ${{ parameters.jobName }}
displayName: ${{ parameters.displayName }}
condition: ${{ parameters.condition }}
dependsOn: ${{parameters.dependsOn}}
variables:
- name: getSubDirScriptPath
value: "scripts/pipelines/policy-integration-tests/pipeline-get-sub-directories.ps1"
- name: skip
value: ${{ parameters.skip }}
- name: includedDirectory
value: ${{ parameters.includedDirectory }}
workspace:
clean: all
pool:
${{ if ne(parameters.vmImage, '') }}:
vmImage: ${{ parameters.vmImage }}
${{ if ne(parameters.poolName, '') }}:
name: ${{ parameters.poolName }}
steps:
- checkout: self
- task: PowerShell@2
name: getSubDirsTask
displayName: "Get Sub Dirs"
inputs:
targetType: "filePath"
pwsh: true
filePath: $(getSubDirScriptPath)
arguments:
-directory "${{parameters.directory}}" `
-ignoreFileName "${{parameters.ignoreFileName}}" `
-includedDirectory "$(includedDirectory)" `
-skip $(skip)
Loading