I'm trying to create Azure DevOps Pipeline template as to download wheel file from Azure Artifacts. This method is working successfully when we are trying to give version like version: 'latest'
if we give specific version like version: '1.0.0'
then it failed with error. As per Microsoft Documentation for DownloadPackage@1 I have given everything as expected. But not sure what is happening internally.
Could anyone help me out what is happening here
- task: DownloadPackage@1
displayName: "[DOWNLOAD] - ${{ parameters.packageName }}-${{ parameters.packageVersion }}"
inputs:
packageType: pypi
feed: "${{ parameters.feedName }}"
view: ${{ parameters.viewName }}
definition: ${{ parameters.packageName }}
version: ${{ parameters.packageVersion }}
downloadPath: $(System.ArtifactsDirectory)
Error:
##[error]Fetching package metadata using url https://feeds.dev.azure.com/OrganizationName/_apis/Packaging/Feeds/FeedName%40View/Packages/PackageID/Versions/1.0.0 failed with error Error: 404: null
at D:\a_tasks\DownloadPackage_randomId\1.216.0\package.js:67:31
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Actually It turns to be version parameter does not accept tailing zeros, if we give version manually.
i.e: for the version 1.0.0 we should be giving 1 instead 1.0.0 then it is working as expected.