File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed
Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ The script checks for changes to:
15153 . ** Public Commands** : Commands that are actually used by DSC resources or classes (dynamically discovered)
16164 . ** Private Functions** : Functions used by the monitored public commands or class-based DSC resources
17175 . ** Integration Tests** : DSC resource integration test files under ` tests/Integration/Resources/ `
18- 6 . ** Pipeline Configuration** : Azure Pipelines configuration and build scripts
1918
2019## Usage
2120
Original file line number Diff line number Diff line change @@ -492,10 +492,10 @@ if ($MyInvocation.InvocationName -ne '.')
492492 Write-Host " RESULT: DSC resource integration tests will be SKIPPED"
493493 }
494494
495- # Set Azure DevOps output variable for pipeline conditions
496- Write-Host " ##vso[task.setvariable variable=ShouldRunDscResourceIntegrationTests;isOutput=true]$shouldRun "
497-
498- # Also output as regular output for local testing
495+ # Output the result for the calling script to capture
499496 Write-Output - InputObject " "
500497 Write-Output - InputObject " ShouldRunDscResourceIntegrationTests: $shouldRun "
498+
499+ # Return the boolean value for pipeline script to use
500+ return $shouldRun
501501}
Original file line number Diff line number Diff line change @@ -96,12 +96,15 @@ stages:
9696 if (-not $env:SYSTEM_PULLREQUEST_TARGETBRANCH) {
9797 $targetBranch = "origin/main"
9898 }
99-
99+
100100 Write-Output "Target branch: $targetBranch"
101101 Write-Output "Current branch: HEAD"
102-
102+
103103 # Run the script to determine if DSC resource integration tests should run
104- ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $targetBranch -CurrentBranch HEAD
104+ $shouldRun = ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $targetBranch -CurrentBranch HEAD
105+
106+ # Set Azure DevOps output variable for pipeline conditions
107+ Write-Host "##vso[task.setvariable variable=ShouldRunDscResourceIntegrationTests;isOutput=true]$shouldRun"
105108 pwsh : true
106109
107110 - job : Test_HQRM
You can’t perform that action at this time.
0 commit comments