Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add selective component governance step #22150

Merged
merged 2 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
5 changes: 5 additions & 0 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,17 @@ stages:
Codeql.Enabled: true
Codeql.BuildIdentifier: ${{ parameters.ServiceDirectory }}
Codeql.SkipTaskAutoInjection: false
skipComponentGovernanceDetection: true
benbp marked this conversation as resolved.
Show resolved Hide resolved
pool:
name: azsdk-pool-mms-ubuntu-2004-general

steps:
- template: /eng/common/pipelines/templates/steps/check-spelling.yml

- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: "Component Detection"
condition: and(succeededOrFailed(), ne(variables['Build.Reason'],'PullRequest'))

- task: GoTool@0
inputs:
version: '1.21.0'
Expand Down
5 changes: 4 additions & 1 deletion eng/pipelines/templates/variables/globals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ variables:
# https://docs.opensource.microsoft.com/tools/cg/index.html
# https://github.com/microsoft/component-detection/blob/main/src/Microsoft.ComponentDetection.Detectors/go/GoComponentDetector.cs
EnableGoCliScan: true

# Disable CodeQL injections except for where we specifically enable it
Codeql.SkipTaskAutoInjection: true

# Set the default value so that 'Build Performance Tests' step can resolve it
UseAzcoreFromMain: $[eq(variables['Use.AzcoreFromMain'], 'true')]

# We enable this selectively to avoid overloading CG scanning/reporting on PR pipelines
skipComponentGovernanceDetection: true