From c0d396d1769c968bad52fc3f4afb56488a1dbebc Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Wed, 10 Aug 2022 03:25:29 -0700 Subject: [PATCH] Restrict "Component Detection" task to Lotus project only (#12536) It is related to PR #12426 --- ...ent-governance-component-detection-steps.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/templates/component-governance-component-detection-steps.yml b/tools/ci_build/github/azure-pipelines/templates/component-governance-component-detection-steps.yml index d433abdac4..daea4998ea 100644 --- a/tools/ci_build/github/azure-pipelines/templates/component-governance-component-detection-steps.yml +++ b/tools/ci_build/github/azure-pipelines/templates/component-governance-component-detection-steps.yml @@ -5,13 +5,14 @@ parameters: default: 'succeeded' # could be 'ci_only', 'always', 'succeeded' steps: -- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 - displayName: 'Component Detection' - condition: - or(or(and(eq('${{parameters.condition}}', 'ci_only'), and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'Scheduled'))), +- ${{ if eq(variables['System.TeamProject'], 'Lotus') }}: + - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 + displayName: 'Component Detection' + condition: + or(or(and(eq('${{parameters.condition}}', 'ci_only'), and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'Scheduled'))), and(eq('${{parameters.condition}}', 'always'), always())), and(eq('${{parameters.condition}}', 'succeeded'), succeeded())) - inputs: - # ignore dmlc-core tracker for its CI, which is not used in onnxruntime build - # ignore unit tests in emscripten. emscripten unit tests are not used in onnxruntime build - ignoreDirectories: '$(Build.SourcesDirectory)/cmake/external/tvm/3rdparty/dmlc-core/tracker,$(Build.SourcesDirectory)/cmake/external/emsdk/upstream/emscripten/tests' + inputs: + # ignore dmlc-core tracker for its CI, which is not used in onnxruntime build + # ignore unit tests in emscripten. emscripten unit tests are not used in onnxruntime build + ignoreDirectories: '$(Build.SourcesDirectory)/cmake/external/emsdk/upstream/emscripten/tests'