AZ-400: Designing and Implementing Microsoft DevOps Solutions

Design and Implement a Package Management Strategy

Summary

In modern software development and CI/CD pipelines, effective package management is essential for handling libraries, dependencies, and artifacts in a consistent, maintainable manner. By standardizing how packages are stored, versioned, and consumed, teams can:

  • Ensure build consistency across environments
  • Reduce dependency conflicts and drift
  • Accelerate development and deployment cycles

The image is a slide titled "Discovering Package Management Tools," featuring three sections: definition of package management, its importance in software development and CI/CD, and an overview of tools like Azure Artifacts, GitHub Packages, NuGet, and npm.

Key Package Management Tools

ToolDescriptionLink
Azure ArtifactsUniversal hosting for NuGet, npm, Maven, Python, and more—manage public & private feeds in one portal.Azure Artifacts
GitHub PackagesIntegrated package registry on GitHub, providing version control and artifact hosting.GitHub Packages
NuGetOfficial .NET package manager simplifying third-party library integration into .NET applications.NuGet.org
npmJavaScript package manager for Node.js, essential for web and server-side dependency management.npmjs.com

Deep Dive: Azure Artifacts

Azure Artifacts provides a rich set of features for hosting and managing package feeds across multiple formats.

Functionality & Integration

  • Feed Creation
    az artifacts feed create \
      --name MyProjectFeed \
      --organization https://dev.azure.com/MyOrg \
      --project MyProject
    
  • Publishing Packages
    • .NET (NuGet):
      dotnet nuget push \
        --source "MyProjectFeed" \
        bin/Release/MyLibrary.1.0.0.nupkg
      
    • npm:
      npm publish \
        --registry https://pkgs.dev.azure.com/MyOrg/_packaging/MyProjectFeed/npm/registry
      
  • Connecting Feeds to Pipelines
    • Add a feed resource in your YAML pipeline:
      resources:
        containers:
          - container: artifactsFeed
            connection: MyArtifactoryServiceConnection
      
    • Reference packages directly in your build and release stages.

Note

You can scope feeds to teams or projects to isolate dependencies and improve security.

Key Features

  • Universal support for NuGet, npm, Maven, Python, and more
  • Fine-grained permissions at user, group, or token levels
  • Seamless integration with Azure Pipelines for automated CI/CD workflows

CI/CD Best Practices

PracticeDescription
Semantic VersioningAdopt MAJOR.MINOR.PATCH guidelines to signal breaking changes, enhancements, and fixes.
Scoped Feeds & ViewsOrganize packages by project, environment, or team to simplify discovery and access control.
Retention PoliciesAutomatically clean up old or unused packages to manage storage costs.

Warning

Misconfigured retention policies can inadvertently delete packages in use. Always verify your cleanup rules before applying.

References & Resources

Watch Video

Watch video content

Previous
Versioning Strategies Semantic Versioning Date Based Versioning