Publish nuget package to azure blob store (#1525)

Publish daily build NuGet package to Azure blob store for sharing among internal partners
This commit is contained in:
shahasad 2019-07-31 14:17:54 -07:00 committed by GitHub
parent 0b0e32909a
commit fb5d0fc538
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 3 deletions

View file

@ -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
@ -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

View file

@ -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:
@ -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