Reputation: 1341
I have an artifact called onnxruntime.dll which are downloaded from pipeline and its folder structure is like this MyProject_x64_windows/bin/Nodes/onnxruntime.dll . I would like this artifact to be downloaded at one level up i.e. MyProject_x64_windows/bin/onnxruntime.dll
I am not sure how it is getting downloaded at that level and how can I fix this. I cant copy the complete YAML but am providing the one which I think is required:
variables:
IppRoot: $(Build.SourcesDirectory)/packages/IPP
ONNXXRoot: $(Build.SourcesDirectory)/packages/ONNXRuntime
- stage: MyProject
jobs:
- job: MyProject_Build
strategy:
matrix:
win:
imageName: 'windows-2019'
OrzRootSuffix: 'x64-windows-staticlib'
osSuffix: 'windows'
LibFT4222Suffix: 'windows'
matlabVersion: '9.6.0-2'
extraCmakeOptions: '-D MyProject_ONNX_SUPPORT=On
-D ONNX_RUNTIME_ROOT:PATH=$(ONNXRoot)'
pool:
vmImage: $(imageName)
steps:
- checkout: self
lfs: true
- task: UniversalPackages@0
displayName: 'Download pre-build ONXX Runtime headers and libraries'
inputs:
command: 'download'
vstsFeed: 'MyProjectPackages'
vstsFeedPackage: 'microsoft.ml.onxxruntime'
vstsPackageVersion: '*' # use the latest
downloadDirectory: '$(ONNXRoot)'
- download: SCMockPipeline
displayName: Download SCMock
artifact: scmock
condition: eq(variables['Agent.OS'], 'Windows_NT')
- script: python -m pip install jinja2
displayName: Install python jinja2 template engine
- task: CMake@1
displayName: CMake configure
inputs:
workingDirectory: '$(Build.BinariesDirectory)'
cmakeArgs: '-G Ninja
$(extraCmakeOptions)
-DLibFT4222_ROOT=$(LibFT4222Root)
-DIPP_ROOT=$(IppRoot)
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory)
$(Build.SourcesDirectory)'
- task: CMake@1
displayName: CMake build
inputs:
workingDirectory: '$(Build.BinariesDirectory)'
cmakeArgs: '--build . --target install'
- task: PublishPipelineArtifact@1
displayName: 'Publish MyProject'
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifactName: 'MyProject_x64-$(osSuffix)'
- task: DownloadPipelineArtifact@2
displayName: Download MyProject artifact
inputs:
artifact: 'MyProject_x64-$(osSuffix)'
path: '$(Build.SourcesDirectory)/MyProject_x64-$(osSuffix)'
Upvotes: 0
Views: 554
Reputation: 19361
You can try to set the destination directory in the DownloadPipelineArtifact
task to download the artifact to the bin
folder.
- task: PublishPipelineArtifact@1
displayName: 'Publish MyProject'
inputs:
targetPath: $(Build.ArtifactStagingDirectory)/bin/Nodes/onnxruntime.dll
artifactName: 'MyProject_x64-$(osSuffix)'
- task: DownloadPipelineArtifact@2
displayName: Download MyProject artifact
inputs:
artifact: 'MyProject_x64-$(osSuffix)'
path: '$(Build.SourcesDirectory)/MyProject_x64-$(osSuffix)/bin'
Upvotes: 1