Skip to content

Commit

Permalink
Enable CG detection in the job templates (dotnet#8376) (dotnet#8403)
Browse files Browse the repository at this point in the history
* Enable CG detection in the job templates (dotnet#8376)

Remove the explicit injection in the arcade pipeline

* Continue on error for CG
  • Loading branch information
mmitche committed Feb 4, 2022
1 parent e5953f2 commit c7c45b5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
5 changes: 5 additions & 0 deletions eng/common/templates/job/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ parameters:
enablePublishTestResults: false
enablePublishUsingPipelines: false
useBuildManifest: false
disableComponentGovernance: false
mergeTestResults: false
testRunTitle: ''
name: ''
Expand Down Expand Up @@ -136,6 +137,10 @@ jobs:
richNavLogOutputDirectory: $(Build.SourcesDirectory)/artifacts/bin
continueOnError: true

- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), ne(parameters.disableComponentGovernance, 'true')) }}:
- task: ComponentGovernanceComponentDetection@0
continueOnError: true

- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- task: MicroBuildCleanup@1
Expand Down
4 changes: 0 additions & 4 deletions eng/common/templates/job/publish-build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ jobs:
- name: _BuildConfig
value: ${{ parameters.configuration }}
- group: Publish-Build-Assets
# Skip component governance and codesign validation for SDL. These jobs
# create no content.
- name: skipComponentGovernanceDetection
value: true
- name: runCodesignValidationInjection
value: false

Expand Down
6 changes: 5 additions & 1 deletion eng/common/templates/jobs/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ parameters:

# Optional: Enable publishing using release pipelines
enablePublishUsingPipelines: false


# Optional: Disable component governance detection. In general, component governance
# should be on for all jobs. Use only in the event of issues.
disableComponentGovernance: false

graphFileGeneration:
# Optional: Enable generating the graph files at the end of the build
enabled: false
Expand Down
4 changes: 0 additions & 4 deletions eng/common/templates/post-build/common-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,5 @@ variables:
- name: InternalInstallersBlobFeedKey
value: $(dotnetclimsrc-access-key)

# Skip component governance and codesign validation for SDL. These jobs
# create no content.
- name: skipComponentGovernanceDetection
value: true
- name: runCodesignValidationInjection
value: false

0 comments on commit c7c45b5

Please sign in to comment.