Skip to content

Commit

Permalink
Publish nuget package to azure blob store (#1525)
Browse files Browse the repository at this point in the history
Publish daily build NuGet package to Azure blob store for sharing among internal partners
  • Loading branch information
shahasad authored Jul 31, 2019
1 parent 0b0e329 commit fb5d0fc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
16 changes: 15 additions & 1 deletion tools/ci_build/github/azure-pipelines/nuget/templates/cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,14 @@ jobs:
- job: Publish_NuGet_Package_And_Report
variables:
- group: Dashboard_MySQL_Secret
condition: ${{ parameters.DoEsrp }}
pool:
name: Hosted Windows 2019 with VS2019
# AzureFileCopy@3 task has some bug that it depends on a particular version of azure power shell,
# which is not available in OnnxRuntime build VMs, but available in the latest hosted agents.
# So, all the copy/publish jobs are being run on hosted agent
# TODO: install the desired azureps on our VMs or use later bugfixed version of AzureFileCopy
demands: azureps
condition: and (${{ parameters.DoEsrp }}, eq(variables['Build.SourceBranch'], 'refs/heads/master'))
dependsOn:
- NuGet_Test_Win
- NuGet_Test_Linux
Expand All @@ -171,6 +175,16 @@ jobs:
- template: ../../templates/set-version-number-variables-step.yml
- template: upload-binary-sizes-from-nuget-package.yml
parameters:
downloadPath: $(Build.BinariesDirectory)/nuget-artifact/final-package
gitCommitHash: $(OnnxRuntimeGitCommitHashShort)

- task: AzureFileCopy@3
displayName: 'Copy Signed NuGet Package to Blob Store'
condition: ne(variables['IsReleaseBuild'], 'true') # rlease build has a different package naming scheme
inputs:
sourcePath: '$(Build.BinariesDirectory)/nuget-artifact/final-package/Microsoft.ML.OnnxRuntime.$(OnnxRuntimeVersion)-dev-$(OnnxRuntimeGitCommitHashShort).nupkg'
azureSubscription: 'AIInfraBuildOnnxRuntimeOSS'
destination: azureBlob
storage: ortpackages
containerName: ortpackages

Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
parameters:
gitCommitHash: ''
downloadPath: $(Build.BinariesDirectory)/nuget-artifact/final-package

steps:
- task: DownloadPipelineArtifact@0
displayName: 'Download Pipeline Artifact - Signed NuGet Package'
inputs:
artifactName: 'drop-signed-nuget'
targetPath: '$(Build.BinariesDirectory)/nuget-artifact/final-package'
targetPath: '${{ parameters.downloadPath }}'

- task: UsePythonVersion@0
inputs:
Expand All @@ -26,7 +27,7 @@ steps:
inputs:
script: |
echo changing directory to artifact download path
pushd $(Build.BinariesDirectory)\nuget-artifact\final-package
pushd "${{ parameters.downloadPath }}"
echo processing nupkg
FOR /R %%i IN (*.nupkg) do (
echo processing %%~ni.nupkg
Expand Down

0 comments on commit fb5d0fc

Please sign in to comment.