From e5947f57293045c60a7f44c5557bbc022be2f9e7 Mon Sep 17 00:00:00 2001 From: Yi Zhang Date: Thu, 25 Apr 2024 10:15:40 +0800 Subject: [PATCH] Two improvements in pipelines (#20449) ### Description 1. Update the image name to avoid docker image wouldn't be overwrite. there was an mistake that variables.CUDA_VERSION_MAJOR is always empty https://github.com/microsoft/onnxruntime/blob/14fcf0a52d61e6015f288cf70025ad62dec7ac85/tools/ci_build/github/azure-pipelines/stages/nuget-linux-cuda-packaging-stage.yml#L120 3. set one artifact name as variable to make the job rerunnable ### Motivation and Context --- .../github/azure-pipelines/bigmodels-ci-pipeline.yml | 6 ++++-- .../stages/nuget-linux-cuda-packaging-stage.yml | 9 +++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/bigmodels-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/bigmodels-ci-pipeline.yml index 859e003466ea5..8037d1209b87f 100644 --- a/tools/ci_build/github/azure-pipelines/bigmodels-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/bigmodels-ci-pipeline.yml @@ -224,10 +224,12 @@ stages: workingDirectory: $(Build.SourcesDirectory) # For verification we will check the generated image looks . + # Because the artifact isn't used by other jobs, we set the artifact name to a varabile value. + # So the job can be rerun without the exception that artifact has been published. - task: PublishPipelineArtifact@0 - displayName: 'Publish code coverage report' + displayName: 'Publish Generated Image Artifact' inputs: - artifactName: "Generated-Image" + artifactName: Generated-Image-$(System.JobAttempt) targetPath: '$(GenerateImage_DIR)' - task: Cache@2 diff --git a/tools/ci_build/github/azure-pipelines/stages/nuget-linux-cuda-packaging-stage.yml b/tools/ci_build/github/azure-pipelines/stages/nuget-linux-cuda-packaging-stage.yml index db9bcacbf0754..221da14ee56ba 100644 --- a/tools/ci_build/github/azure-pipelines/stages/nuget-linux-cuda-packaging-stage.yml +++ b/tools/ci_build/github/azure-pipelines/stages/nuget-linux-cuda-packaging-stage.yml @@ -88,7 +88,12 @@ stages: workspace: clean: all pool: 'Onnxruntime-Linux-GPU' - + variables: + - name: CUDA_VERSION_MAJOR + ${{ if eq(parameters.CudaVersion, '11.8') }}: + value: '11' + ${{ if eq(parameters.CudaVersion, '12.2') }}: + value: '12' steps: - checkout: self # due to checkout multiple repos, the root directory is $(Build.SourcesDirectory)/onnxruntime submodules: false @@ -180,4 +185,4 @@ stages: artifactName: 'onnxruntime-linux-x64-gpu' - template: ../templates/component-governance-component-detection-steps.yml parameters: - condition: 'succeeded' \ No newline at end of file + condition: 'succeeded'