Skip to content

Commit

Permalink
Enable CG detection in the job templates (dotnet#8376)
Browse files Browse the repository at this point in the history
Remove the explicit injection in the arcade pipeline
  • Loading branch information
mmitche committed Jan 27, 2022
1 parent bf4eab8 commit ddf5768
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions eng/common/templates/job/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ parameters:
# Optional: enable sending telemetry
enableTelemetry: false

# Options: Don't run CG
disableComponentGovernance: false

# Optional: define the helix repo for telemetry (example: 'dotnet/arcade')
helixRepo: ''

Expand Down Expand Up @@ -157,6 +160,9 @@ jobs:
- ${{ each step in parameters.steps }}:
- ${{ step }}

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

- ${{ 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
6 changes: 5 additions & 1 deletion eng/common/templates/jobs/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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

0 comments on commit ddf5768

Please sign in to comment.