Skip to content

Commit

Permalink
Adding a new pipeline for pubilshing cuda 12 nuget packages (#18713)
Browse files Browse the repository at this point in the history
### 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. -->
  • Loading branch information
jchen351 authored Dec 11, 2023
1 parent 16df837 commit bfa5eb4
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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



0 comments on commit bfa5eb4

Please sign in to comment.