Reputation: 41
I have published an artifact which is a zip file in a pipeline build. Now I want to push this in azure artifact? How can I modify my pipeline to store in artifact feed
Upvotes: 0
Views: 927
Reputation: 1
Universal Packages are only available for Azure Services and not for Azure Server versions.
Upvotes: 0
Reputation: 13944
You can publish the ZIP file as a universal package in Azure Artifacts feed using the UniversalPackages task.
variables:
package_version: 1.0.0
steps:
. . .
- task: UniversalPackages@0
displayName: 'Publish Universal Package'
inputs:
command: publish
publishDirectory: 'path/to/file.zip' # Path to the ZIP file.
vstsFeedPublish: '{feed name}' # Specifies the FeedName for an organization-scoped feed, projectName/FeedName or ProjectID/FeedID for a project-scoped feed.
vstsFeedPackagePublish: '{package name}' # The name cannot contains uppercase.
versionOption: custom
versionPublish: '$(package_version)' # Specify the version number of the universal package.
packagePublishDescription: 'My Universal package.'
Normally, you can publish almost any type files as universal packages in Azure Artifacts.
EDIT:
When publishing packages to Azure Artifacts feed in pipeline, you also need to go to the Feed Settings > Permissions page to check and ensure the following build identities has been assigned with the Contributor
role at least:
For more details, you can reference the documentation "Job access tokens".
Upvotes: 1