Fix spurious component detection warning (#2857)

Fix spurious component detection warning
Use component detection template for all pipelines
This commit is contained in:
KeDengMS 2020-01-18 20:10:35 -08:00 committed by GitHub
parent 25d7ad187f
commit f9f25ec047
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 109 additions and 98 deletions

View file

@ -62,8 +62,7 @@ jobs:
inputs:
ArtifactName: onnxruntime
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
- template: templates/component-governance-component-detection-steps.yml
- template: templates/clean-agent-build-directory-step.yml
@ -130,8 +129,7 @@ jobs:
inputs:
ArtifactName: onnxruntime_gpu
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
- template: templates/component-governance-component-detection-steps.yml
- template: templates/clean-agent-build-directory-step.yml
@ -205,9 +203,9 @@ jobs:
inputs:
ArtifactName: onnxruntime
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: succeeded()
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- template: templates/clean-agent-build-directory-step.yml
@ -274,8 +272,7 @@ jobs:
inputs:
ArtifactName: onnxruntime_gpu
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
- template: templates/component-governance-component-detection-steps.yml
- template: templates/clean-agent-build-directory-step.yml
@ -318,5 +315,4 @@ jobs:
inputs:
ArtifactName: onnxruntime
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
- template: templates/component-governance-component-detection-steps.yml

View file

@ -24,8 +24,8 @@ jobs:
displayName: 'Command Line Script'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'ci_only'
- template: templates/clean-agent-build-directory-step.yml

View file

@ -34,8 +34,8 @@ jobs:
- script: 'tools/ci_build/github/linux/run_dockerbuild.sh -o ubuntu16.04 -d ngraph -r $(Build.BinariesDirectory) -x "--use_ngraph --build_wheel"'
displayName: 'Command Line Script'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'ci_only'
- template: templates/clean-agent-build-directory-step.yml

View file

@ -38,8 +38,8 @@ jobs:
- script: 'tools/ci_build/github/linux/run_dockerbuild.sh -o ubuntu16.04 -d cpu -r $(Build.BinariesDirectory) -x "--disable_contrib_ops"'
displayName: 'Command Line Script'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'ci_only'
- template: templates/clean-agent-build-directory-step.yml

View file

@ -34,8 +34,8 @@ jobs:
- script: 'tools/ci_build/github/linux/run_dockerbuild.sh -o ubuntu16.04 -d openvino -r $(Build.BinariesDirectory) -x "--use_openvino CPU_FP32 --build_wheel"'
displayName: 'Command Line Script'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'ci_only'
- template: templates/clean-agent-build-directory-step.yml

View file

@ -24,8 +24,8 @@ jobs:
- script: 'tools/ci_build/github/linux/run_dockerbuild.sh -o ubuntu16.04 -d openvino -r $(Build.BinariesDirectory) -x "--use_openvino GPU_FP32 --build_wheel"'
displayName: 'Command Line Script'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'ci_only'
- template: templates/clean-agent-build-directory-step.yml

View file

@ -42,8 +42,8 @@ jobs:
script: docker run --rm --volume $(Build.SourcesDirectory)/server:/onnxruntime_src --volume $(Build.BinariesDirectory):/build onnxruntime-server-ubuntu16.04 /bin/bash /onnxruntime_src/ci/run.sh
workingDirectory: $(Build.SourcesDirectory)/tools/ci_build/github/linux/docker
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'ci_only'
- template: templates/clean-agent-build-directory-step.yml

View file

@ -36,8 +36,8 @@ jobs:
- script: 'tools/ci_build/github/linux/upload_ortsrv_binaries.sh -a $(Build.BinariesDirectory) -r $(Build.BinariesDirectory)/RelWithDebInfo -i $(Build.BuildNumber) -c $(Build.SourceVersion) -b "$(blob.binary_upload_url)" -p "--config RelWithDebInfo --build_server --use_openmp --use_full_protobuf --enable_server_model_tests --cmake_extra_defines onnxruntime_SERVER_VERSION=$(cat ./VERSION_NUMBER)-$(Build.BuildNumber) onnxruntime_LATEST_COMMIT_ID=$(Build.SourceVersion)"'
displayName: 'Upload binary to blob storage'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'ci_only'
- template: templates/clean-agent-build-directory-step.yml

View file

@ -39,8 +39,8 @@ jobs:
- script: 'tools/ci_build/github/linux/run_dockerbuild.sh -o ubuntu16.04 -d cpu -r $(Build.BinariesDirectory) -a x86 -x "--x86 --disable_contrib_ops"'
displayName: 'Command Line Script'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'ci_only'
- template: templates/clean-agent-build-directory-step.yml

View file

@ -62,9 +62,9 @@ jobs:
inputs:
artifactName: 'drop-linux'
targetPath: '$(Build.ArtifactStagingDirectory)'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: succeeded()
- template: ../../templates/component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- template: ../../templates/clean-agent-build-directory-step.yml
- template: ../../templates/mac-ci.yml

View file

@ -102,9 +102,9 @@ jobs:
inputs:
artifactName: 'drop-linux'
targetPath: '$(Build.ArtifactStagingDirectory)'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: succeeded()
- template: ../../templates/component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- template: ../../templates/clean-agent-build-directory-step.yml
- template: ../../templates/mac-ci.yml

View file

@ -83,9 +83,9 @@ jobs:
inputs:
artifactName: 'drop-linux'
targetPath: '$(Build.ArtifactStagingDirectory)'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: succeeded()
- template: ../../templates/component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- template: ../../templates/clean-agent-build-directory-step.yml
- template: ../../templates/mac-ci.yml

View file

@ -59,9 +59,9 @@ jobs:
inputs:
artifactName: 'drop-linux'
targetPath: '$(Build.ArtifactStagingDirectory)'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: succeeded()
- template: ../../templates/component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- template: ../../templates/clean-agent-build-directory-step.yml
- job: NuGet_Packaging

View file

@ -58,8 +58,8 @@ jobs:
env:
OnnxRuntimeBuildDirectory: $(Build.BinariesDirectory)
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: always()
- template: ../../templates/component-governance-component-detection-steps.yml
parameters :
condition : 'always'
- template: ../../templates/clean-agent-build-directory-step.yml

View file

@ -52,8 +52,8 @@ jobs:
DisableContribOps: $(DisableContribOps)
IsReleaseBuild: $(IsReleaseBuild)
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: always()
- template: ../../templates/component-governance-component-detection-steps.yml
parameters :
condition : 'always'
- template: ../../templates/clean-agent-build-directory-step.yml

View file

@ -99,8 +99,8 @@ jobs:
displayName: 'Run End to End Test (C++ API) '
timeoutInMinutes: 30
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: always()
- template: ../../templates/component-governance-component-detection-steps.yml
parameters :
condition : 'always'
- template: ../../templates/clean-agent-build-directory-step.yml

View file

@ -0,0 +1,15 @@
# component detection for component governance checks
parameters:
- name: condition
type: string
default: '' # 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'))),
and(eq('${{parameters.condition}}', 'always'), always())),
and(eq('${{parameters.condition}}', 'succeeded'), succeeded()))
inputs:
ignoreDirectories: '$(Build.SourcesDirectory)/cmake/external/tvm/3rdparty/dmlc-core/tracker' # ignore dmlc-core tracker for its CI, which is not used in onnxruntime build

View file

@ -26,7 +26,7 @@ jobs:
inputs:
artifactName: ${{ parameters.ArtifactName }}
targetPath: '$(Build.ArtifactStagingDirectory)'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: succeeded()
- template: component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- template: clean-agent-build-directory-step.yml

View file

@ -33,7 +33,7 @@ jobs:
inputs:
artifactName: 'drop-osx'
targetPath: '$(Build.ArtifactStagingDirectory)'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: succeeded()
- template: component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- template: clean-agent-build-directory-step.yml

View file

@ -186,8 +186,8 @@ jobs:
- ${{ if eq(parameters['DoCompliance'], 'true') }}:
- template: compliance.yml
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: succeeded()
- template: component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- template: clean-agent-build-directory-step.yml

View file

@ -97,9 +97,9 @@ jobs:
artifactName: ${{ parameters.ArtifactName }}
targetPath: '$(Build.ArtifactStagingDirectory)'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: succeeded()
- template: component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- template: clean-agent-build-directory-step.yml

View file

@ -213,8 +213,8 @@ jobs:
- ${{ if eq(parameters['DoCompliance'], 'true') }}:
- template: compliance.yml
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: succeeded()
- template: component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- template: clean-agent-build-directory-step.yml

View file

@ -42,7 +42,7 @@ jobs:
filename: '$(Build.BinariesDirectory)\packages\python\python.exe'
arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Release --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --arm'
workingDirectory: "$(Build.BinariesDirectory)"
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'ci_only'
- template: templates/clean-agent-build-directory-step.yml

View file

@ -42,7 +42,7 @@ jobs:
filename: '$(Build.BinariesDirectory)\packages\python\python.exe'
arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Release --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --arm64'
workingDirectory: "$(Build.BinariesDirectory)"
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'ci_only'
- template: templates/clean-agent-build-directory-step.yml

View file

@ -122,9 +122,9 @@ jobs:
displayName: 'Run tests'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: succeeded()
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- template: templates/clean-agent-build-directory-step.yml

View file

@ -122,9 +122,9 @@ jobs:
displayName: 'Run tests'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: succeeded()
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'

View file

@ -100,7 +100,7 @@ jobs:
displayName: 'Run tests'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: succeeded()
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'

View file

@ -49,8 +49,8 @@ jobs:
arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Release --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --use_openmp --use_ngraph --use_full_protobuf --build_shared_lib --enable_onnx_tests --test'
workingFolder: "$(Build.BinariesDirectory)"
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'ci_only'
- template: templates/clean-agent-build-directory-step.yml

View file

@ -112,9 +112,9 @@ jobs:
displayName: 'Run tests'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: succeeded()
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- template: templates/clean-agent-build-directory-step.yml

View file

@ -120,9 +120,9 @@ jobs:
workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)\$(BuildConfig)'
displayName: 'Run tests'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: succeeded()
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- template: templates/clean-agent-build-directory-step.yml

View file

@ -110,9 +110,9 @@ jobs:
workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)\$(BuildConfig)'
displayName: 'Run tests'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: succeeded()
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- template: templates/clean-agent-build-directory-step.yml