Skip to content

Commit 5f5ab59

Browse files
authored
Handle when no "direct" packages are changed (#37599)
* ensure the default isn't "scan the entire repo"
1 parent a61273f commit 5f5ab59

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

eng/pipelines/templates/jobs/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ jobs:
138138
parameters:
139139
BuildTargetingString: ${{ parameters.BuildTargetingString }}
140140
PackagePropertiesFolder: $(Build.ArtifactStagingDirectory)/PackageInfo
141-
IncludeIndirect: true
141+
IncludeIndirect: false
142142

143143
- template: /eng/pipelines/templates/steps/build-extended-artifacts.yml
144144
parameters:
@@ -170,7 +170,7 @@ jobs:
170170
parameters:
171171
BuildTargetingString: ${{ parameters.BuildTargetingString }}
172172
PackagePropertiesFolder: $(Build.ArtifactStagingDirectory)/PackageInfo
173-
IncludeIndirect: true
173+
IncludeIndirect: false
174174

175175
- template: ../steps/build-extended-artifacts.yml
176176
parameters:

eng/pipelines/templates/steps/resolve-package-targeting.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ steps:
3333
}
3434
3535
$setting = $packageProperties -join ","
36+
37+
# in case we don't expect any packages, we should set the variable to null, which will match NO packages and cause whatever the check
38+
# is to skip with exit 0 (which is what we want!)
39+
if (-not $setting) {
40+
$setting = "null"
41+
}
3642
}
3743
}
3844

0 commit comments

Comments
 (0)