Skip to content

Commit 69340eb

Browse files
authored
Fix ComponentGovernance running on public PR/CI jobs (#99898)
This seems to be a side-effect of #99179 Arcade checks whether `disableComponentGovernance` is the empty string to apply the default skipping logic: https://github.com/dotnet/arcade/blob/ace00d8719b8d1fdfd0cc05f71bb9af216338d27/eng/common/templates/job/job.yml#L168-L174 Changed our templates to make sure we pass that correctly.
1 parent 1d2b1ae commit 69340eb

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

eng/pipelines/common/global-build-job.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ parameters:
3232
preBuildSteps: []
3333
enableRichCodeNavigation: false
3434
richCodeNavigationLanguage: 'csharp'
35-
disableComponentGovernance: false
35+
disableComponentGovernance: ''
3636

3737
jobs:
3838
- template: /eng/common/templates/job/job.yml

eng/pipelines/common/templates/runtimes/xplat-job.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ parameters:
1919
timeoutInMinutes: ''
2020
enableMicrobuild: ''
2121
gatherAssetManifests: false
22-
disableComponentGovernance: false
22+
disableComponentGovernance: ''
2323

2424
variables: {} ## any extra variables to add to the defaults defined below
2525

@@ -64,9 +64,11 @@ jobs:
6464
${{ if eq(parameters.osGroup, 'windows') }}:
6565
agentOs: windows
6666

67-
# Disable component governance if requested or on musl machines where it does not work well
68-
${{ if or(eq(parameters.disableComponentGovernance, true), eq(parameters.osSubGroup, '_musl')) }}:
67+
# Component governance does not work on musl machines
68+
${{ if eq(parameters.osSubGroup, '_musl') }}:
6969
disableComponentGovernance: true
70+
${{ else }}:
71+
disableComponentGovernance: ${{ parameters.disableComponentGovernance }}
7072

7173
# Setting this results in the arcade job template including a step
7274
# that gathers asset manifests and publishes them to pipeline

eng/pipelines/libraries/run-test-job.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ jobs:
5050
# To run the tests we just send to helix and wait, use ubuntu hosted pools for faster providing and to not back up our build pools
5151
pool: ${{ parameters.pool }}
5252

53-
# Disable component governance if requested or on musl machines where it does not work well
54-
${{ if or(eq(parameters.disableComponentGovernance, true), eq(parameters.osSubGroup, '_musl')) }}:
53+
# Component governance does not work on musl machines
54+
${{ if eq(parameters.osSubGroup, '_musl') }}:
5555
disableComponentGovernance: true
5656

5757
dependsOn:

0 commit comments

Comments
 (0)