From 09f41041bef9acd2f1704ea7fb09c658c38372b8 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Sat, 13 Jan 2024 01:30:43 -0500 Subject: [PATCH] Fixing issue where unzip package froim 'onnxruntime-win-x64-gpu' was also uploaded. (#19096) ### Description Fixing issue where unzip package froim 'onnxruntime-win-x64-gpu' was also uploaded. For example, https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=396440&view=artifacts&pathAsName=false&type=publishedArtifacts --- .../c-api-noopenmp-packaging-pipelines.yml | 4 +++- .../stages/nuget-win-cuda-packaging-stage.yml | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/c-api-noopenmp-packaging-pipelines.yml b/tools/ci_build/github/azure-pipelines/c-api-noopenmp-packaging-pipelines.yml index 024fc1116954f..93d3b7f37008b 100644 --- a/tools/ci_build/github/azure-pipelines/c-api-noopenmp-packaging-pipelines.yml +++ b/tools/ci_build/github/azure-pipelines/c-api-noopenmp-packaging-pipelines.yml @@ -718,7 +718,9 @@ stages: displayName: 'Publish Pipeline Combined GPU Package Artifact' inputs: artifactName: 'onnxruntime-win-x64-gpu' - targetPath: '$(Build.ArtifactStagingDirectory)' + targetPath: '$(Build.ArtifactStagingDirectory)/onnxruntime-win-x64-gpu-$(OnnxRuntimeVersion).zip' + + - template: templates/component-governance-component-detection-steps.yml parameters : condition : 'succeeded' diff --git a/tools/ci_build/github/azure-pipelines/stages/nuget-win-cuda-packaging-stage.yml b/tools/ci_build/github/azure-pipelines/stages/nuget-win-cuda-packaging-stage.yml index 3fb653c6b4405..66b6bc4ab3591 100644 --- a/tools/ci_build/github/azure-pipelines/stages/nuget-win-cuda-packaging-stage.yml +++ b/tools/ci_build/github/azure-pipelines/stages/nuget-win-cuda-packaging-stage.yml @@ -139,9 +139,24 @@ stages: filename: $(Build.SourcesDirectory)\onnxruntime-inference-examples\c_cxx\squeezenet\run_capi_application.bat arguments: $(Build.SourcesDirectory)\onnxruntime $(Build.ArtifactStagingDirectory)\onnxruntime-win-x64-gpu-$(OnnxRuntimeVersion).zip $(Build.SourcesDirectory)\onnxruntime-inference-examples\c_cxx\squeezenet workingFolder: '$(Build.ArtifactStagingDirectory)' + - script: | + dir + workingDirectory: '$(Build.ArtifactStagingDirectory)' + displayName: 'List ArtifactStagingDirectory before delete' + + - task: DeleteFiles@1 + displayName: 'Clean up none zip files from ArtifactStagingDirectory' + inputs: + SourceFolder: $(Build.ArtifactStagingDirectory) + Contents: '*/' + + - script: | + dir + workingDirectory: '$(Build.ArtifactStagingDirectory)' + displayName: 'List ArtifactStagingDirectory after delete' - task: PublishPipelineArtifact@0 displayName: 'Publish Pipeline Combined GPU Package Artifact' inputs: artifactName: 'onnxruntime-win-x64-gpu' - targetPath: '$(Build.ArtifactStagingDirectory)' \ No newline at end of file + targetPath: '$(Build.ArtifactStagingDirectory)/onnxruntime-win-x64-gpu-$(OnnxRuntimeVersion).zip' \ No newline at end of file