Packages and versioning

AZ-400 DevOps EngineerBuild and release pipelinesAbout 20 minutesBy Cloud Hands On

GitHub Packages and Azure Artifacts, feeds, upstream sources and views, SemVer and CalVer, and versioning pipeline artifacts.

In this lesson you'll learn

1. Package management tools

Why use packages?

A package is a versioned bundle of code (a library, a tool) that other projects install by name and version. Publishing shared code as packages means teams can upgrade on their own schedule, instead of copying files between repositories.

  • GitHub Packages: hosts npm, NuGet, Maven, Gradle, RubyGems and container images (in the GitHub Container Registry), with permissions tied to the repository or organisation. Natural if code and workflows live in GitHub.
  • Azure Artifacts: feeds for NuGet, npm, Maven, Python, Cargo and universal packages (any files), with upstream sources and views. Natural with Azure Pipelines.

Container images usually go to Azure Container Registry or the GitHub Container Registry.

2. Feeds, upstream sources and views

A feed holds packages. It can be scoped to a project or the organisation, and has its own permissions (Feed Reader, Contributor, Owner).

Upstream sources let one feed pull packages from public registries (nuget.org, npmjs.com, PyPI, Maven Central) or other feeds. The first time a package is requested, the feed saves a copy, so builds keep working if the public registry is down or a package is removed, and developers need only one source.

Views filter a feed. Every feed has @Local, @Prerelease and @Release. You promote a tested version to @Release, and consumers who should only get stable versions point at that view.

3. Versioning

Semantic versioning (SemVer) uses MAJOR.MINOR.PATCH: increase MAJOR for breaking changes, MINOR for new backwards-compatible features, PATCH for fixes. Pre-release labels such as 2.1.0-beta.3 sort before the release. Calendar versioning (CalVer), such as 2026.11.2, suits products released on a schedule, where dates tell users more than compatibility does.

Dependents should pin or range versions deliberately: a lock file (package-lock.json, packages.lock.json) makes builds repeatable.

Pipeline artifacts need versions too. Use the build number (for example name: $(Date:yyyyMMdd)$(Rev:.r) in Azure Pipelines), the commit SHA, or a SemVer value calculated from tags (tools such as GitVersion). Build an artifact once and promote the same artifact through environments.

Example

Fernhill Cloud's shared logging library is published to an Azure Artifacts feed with an upstream to nuget.org. Every CI build publishes 3.2.0-ci.N to @Prerelease; after the integration tests pass, the release pipeline promotes 3.2.0 to @Release, which is the only view product teams consume.

Exam traps to remember

  • Upstream sources cache public packages and give one source for everything.
  • Views (@Prerelease, @Release) are how you promote packages, not separate feeds.
  • A breaking change means a new MAJOR version in SemVer.

Test yourself: 3 check questions and exam-style practice questions on this topic are in the AZ-400 DevOps Engineer app.

Practise in the app

Keep going