Adding a new pipeline for pubilshing cuda 12 nuget packages (#18713)

### Description
<!-- Describe your changes. -->



### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
This commit is contained in:
Jian Chen 2023-12-11 21:07:05 +00:00 committed by GitHub
parent 16df8377d3
commit bfa5eb4591
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 83 additions and 0 deletions

View file

@ -0,0 +1,24 @@
parameters:
- name: nightly
type: string
default: '1'
- name: build_id
type: string
default: 'latest'
- name: project
type: string
default: 'Lotus'
- name: pipeline
type: string
default: 'Nuget-CUDA-Packaging-Pipeline'
stages:
- template: stages/nuget-cuda-publishing-stage.yml
parameters:
build_id: ${{ parameters.build_id }}
project: ${{ parameters.project }}
pipeline: ${{ parameters.pipeline }}
${{ if ne(parameters.nightly, '1') }}:
artifact_feed: onnxruntime-cuda-12
${{ else }}:
artifact_feed: ort-cuda-12-nightly

View file

@ -0,0 +1,59 @@
parameters:
- name: build_id
type: string
- name: project
type: string
- name: pipeline
type: string
- name: artifact_feed
type: string
default: 'onnxruntime-cuda-12'
- name: dependencies
type: string
default: 'none'
stages:
- stage: NuGet_Publishing_GPU
${{ if ne(parameters.dependencies, 'none') }}:
dependsOn:
${{ if eq(parameters.dependencies, 'none') }}:
dependsOn: []
jobs:
- job:
pool: 'onnxruntime-Win-CPU-2022'
steps:
- checkout: none
- script: |
echo "Project: ${{ parameters.project }}"
echo "Build ID: ${{ parameters.build_id }}"
echo "Pipeline: ${{ parameters.pipeline }}"
echo "Artifact Feed: ${{ parameters.artifact_feed }}"
displayName: 'Print Parameters'
- task: DownloadPipelineArtifact@2
displayName: 'Download NuGet artifact drop-signed-nuget-GPU'
inputs:
artifact: drop-signed-nuget-GPU
targetPath: $(Build.BinariesDirectory)/nuget-artifact/final-package
${{ if ne(parameters.build_id, 'latest') }}:
buildType: 'specific'
project: '${{ parameters.project }}'
pipeline: '${{ parameters.pipeline }}'
buildVersionToDownload: 'specific'
buildId: '${{ parameters.build_id }}'
- script: |
ls $(Build.BinariesDirectory)/nuget-artifact/final-package
displayName: List Downloaded Package
- template: ../nuget/templates/get-nuget-package-version-as-variable.yml
parameters:
packageFolder: '$(Build.BinariesDirectory)/nuget-artifact/final-package'
#This task must be run on a Windows machine
- task: NuGetCommand@2
displayName: 'NuGet push ${{ parameters.artifact_feed }}'
inputs:
command: push
packagesToPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/*.nupkg'
publishVstsFeed: '2692857e-05ef-43b4-ba9c-ccf1c22c437c/d3daa2b0-aa56-45ac-8145-2c3dc0661c87'
allowPackageConflicts: true