From 4df9d16f98cd5ac60e1c6151207dfbf9f5a165a4 Mon Sep 17 00:00:00 2001 From: Yi Zhang Date: Thu, 28 Mar 2024 03:20:57 +0800 Subject: [PATCH] [Fix] TSAUpload task must be in building stage (#20098) ### Description In #20085, TSAUpload was in testing stage so main branch failed. --- .../github/azure-pipelines/templates/py-win-gpu.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/ci_build/github/azure-pipelines/templates/py-win-gpu.yml b/tools/ci_build/github/azure-pipelines/templates/py-win-gpu.yml index e200fb9e93bee..59387a0de4cd1 100644 --- a/tools/ci_build/github/azure-pipelines/templates/py-win-gpu.yml +++ b/tools/ci_build/github/azure-pipelines/templates/py-win-gpu.yml @@ -204,6 +204,17 @@ stages: inputs: AnalyzeTargetGlob: '+:file|$(Build.ArtifactStagingDirectory)\**\*.dll;-:file|$(Build.ArtifactStagingDirectory)\**\DirectML.dll' + - task: TSAUpload@2 + displayName: 'TSA upload' + condition: and (succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + inputs: + GdnPublishTsaOnboard: false + GdnPublishTsaConfigFile: '$(Build.sourcesDirectory)\.gdn\.gdntsa' + + - template: component-governance-component-detection-steps.yml + parameters: + condition: 'succeeded' + - stage: Win_py_${{ parameters.EP_NAME }}_Wheels_${{ replace(parameters.PYTHON_VERSION,'.','_') }}_Tests dependsOn: Win_py_${{ parameters.EP_NAME }}_Wheels_${{ replace(parameters.PYTHON_VERSION,'.','_') }}_Build jobs: