Azure Artifacts Tutorial
Introduction to Azure Artifacts
Azure Artifacts is a service within Azure DevOps that allows you to create, host, and share packages with your team. It supports multiple package types such as NuGet, npm, Maven, Python, and Universal Packages. This tutorial will guide you through the process of using Azure Artifacts from start to finish.
Prerequisites
Before you start using Azure Artifacts, ensure you have the following:
- An Azure DevOps organization
- Basic knowledge of package management
- Installed Azure CLI (for some operations)
Creating a Feed
A feed is a container for your packages. Follow these steps to create a feed in Azure Artifacts:
- Navigate to your Azure DevOps organization.
- Click on "Artifacts" in the left-hand menu.
- Click the "+ New feed" button.
- Provide a name and description for your feed.
- Set the visibility and scope as needed.
- Click "Create".
Example:
Publishing Packages
Once you have a feed, you can publish packages to it. The process varies depending on the package type. Here, we'll go through an example of publishing a npm package:
- Configure npm to use your Azure Artifacts feed:
- Login to your Azure Artifacts feed:
- Publish your package:
Example:
Consuming Packages
To consume packages from your Azure Artifacts feed, you'll need to configure your package manager to use the feed. Here’s an example for npm:
- Configure npm to use your Azure Artifacts feed:
- Install the package:
Example:
Managing Permissions
You can control who has access to your feed and what they can do. Follow these steps to manage permissions:
- Navigate to your feed in Azure Artifacts.
- Click on "Permissions".
- Add users or groups and set their permissions.
- Click "Save".
Cleaning Up
Over time, your feed may accumulate old or unused packages. Azure Artifacts offers tools to help you clean up:
- Navigate to your feed in Azure Artifacts.
- Click on "Recycle Bin".
- Select the packages you want to delete permanently.
- Click "Delete".
Conclusion
Azure Artifacts is a powerful tool for managing and sharing packages within your team. By following this tutorial, you should now be able to create feeds, publish and consume packages, manage permissions, and clean up old packages. Happy coding!