PUBLIC BETA OFFER

Save 50% off on an Eligible Learning PlanValid for 1-month plan, 3-month plan, 12-month plan · Code LPXBETA50 · Ends Dec 6, 2026

Design and implement a package management strategy

Resolve dependencies and promote identifiable immutable artifacts

Select registries, feeds, upstreams and views around actual producer and consumer permissions. Interpret version ranges and lockfiles without assuming compatibility, promote verified immutable bytes, and retain artifact identities and recovery evidence before cleanup.

Knowledge domain
Design and implement build and release pipelines (35–40%)
Topics & tags
Published
Author
LearningPathX Editorial TeamContent version 1.0
Resources

Design and implement a package management strategy

Learning objectives

  • Select a package registry from ecosystem, ownership and consumption requirements.
  • Configure feed/upstream/view access for the actual producer and consumer identities.
  • Apply version and lockfile rules without confusing resolution with compatibility.
  • Preserve immutable artifact provenance and plan its retention.

Choose the storage boundary

A package registry manages named versions consumed through an ecosystem client. Azure Artifacts supports NuGet, npm, Python, Maven, Cargo and Universal packages, with feeds, upstreams and views. GitHub Packages uses registry-specific ownership and access: Maven/Gradle packages inherit repository scope, while registries supporting granular permissions can manage package access separately. A repository transfer therefore does not guarantee identical package-link and permission behavior across registries.

Choose according to package format, owner, visibility, trust boundary, publication identity, consumer identity and retention. Use a feed when dependency resolution and controlled promotion matter; use a supported GitHub registry when its ecosystem and ownership fit. Public container images can be pulled anonymously, unlike most other GitHub package consumption. Publishing still requires appropriate authentication. A scoped workflow GITHUB_TOKEN and a classic PAT for another client are different credentials; repository access alone does not establish every package permission.

A pipeline artifact is output of a run, not automatically a registry package version. A page or link can contain artifact metadata without hosting its bytes. Do not infer unsupported registry/OS combinations from undecoded feature-table icons; validate the selected restore and publish route in the intended environment.

Resolve through a deliberately configured feed

A feed establishes the resolution boundary. A view exposes a selected set of versions within that feed. In Azure Artifacts, resolution checks directly published versions, then previously saved upstream versions, then configured upstreams in order.

Feed role Relevant operation
Reader Restore versions already available or saved
Feed and Upstream Reader, or Collaborator Save an upstream version on first use as well as read it
Contributor/Publisher Publish packages and promote versions
Owner Manage settings/upstreams and deletion

If a Reader can restore a saved version but cannot introduce a new upstream version, inspect permission to save upstream content. Saved versions remain after removing their upstream. An unavailable upstream can still disrupt metadata refresh for unsaved content; these are different failure cases.

Create the feed through Artifacts → Create Feed. Choose Name, Visibility and Project or Organization Scope, and deliberately choose whether to include common public upstream sources. Organization-scoped feeds cannot simply be converted to project-scoped feeds. For an existing feed, use Feed settings → Upstream sources → Add Upstream. For a public source, select it, Add and Save. For a feed in the same organization, also select its view and package types. Another-organization upstream requires the feed locator/view, package types and documented target-view sharing across organizations associated with the same Entra tenant.

Under Feed settings → Permissions → Add users/groups, assign the actual pipeline identity. This can be [Project name] Build Service ([Organization name]) or Project Collection Build Service ([Organization name]), depending on the effective job scope. A grant to the interactive author does not authorize the runtime identity. Choose the operation-appropriate role and Save.

Cross-project use needs both project access and feed rights. The adopted sources disagree about the minimum project permission: one names Edit project-level information, while another points to Readers. This lesson preserves that conflict. Have the administrator validate the narrowly authorized project/feed combination against the actual service rather than broadening rights to hide the disagreement or declaring one universal minimum.

Promote verified versions and review view sharing

Publish to the base feed, represented by @Local, then promote a verified immutable version into a view such as @Release. Promotion adds membership and cannot be reversed as a demotion. Consumers should use the exact verified version rather than different bytes republished under the same identifier.

Manage sharing through Feed settings → Views → selected view ellipsis → Edit → Visibility, then Save. A view can expose versions without broad parent-feed access, so review both surfaces. “Specific people” with an empty users/groups list falls back to parent-feed permissions; it is not a deny-all rule.

An illustrative project-scoped NuGet client can use:

<configuration>
  <packageSources>
    <clear />
    <add key="approved" value="https://pkgs.dev.azure.com/ORG/PROJECT/_packaging/FEED/nuget/v3/index.json" />
  </packageSources>
</configuration>

Replace ORG, PROJECT and FEED with verified values and authenticate the client for the intended actor. <clear /> removes inherited package sources before adding the approved feed. The expected diagnostic result is a restore resolved through that feed and its approved upstreams. An unrelated fallback source should not conceal a feed-permission error. Inspect exact version and origin, not merely request success. These are configuration examples, not executed restores.

Choose an honest version contract

Semantic Versioning expresses compatibility against a declared public API: incompatible changes increment major, compatible functionality increments minor, and compatible fixes increment patch. Released contents are immutable. Prereleases sort before the corresponding normal release, while build metadata does not change precedence. A version label communicates intent; tests must still substantiate behavior.

Calendar Versioning expresses a declared calendar scheme. Specify year/month/week/day fields and padding, and do not mix current short-field and older doubled-letter notation without identifying the scheme. A date label does not communicate API compatibility by itself. Document compatibility separately when CalVer is selected.

For the adopted npm range rules:

Declaration Boundary
^1.2.3 Below 2.0.0
^0.2.3 Below 0.3.0
^0.0.3 Below 0.0.4
~1.2.3 Later patches below 1.3.0

Caret follows the leftmost nonzero boundary, not always the next major. Prerelease selection has resolver restrictions; a normal range does not opt into every prerelease. Distinguish the declared range from the exact dependency graph recorded by the lockfile.

Commit manifest and lockfile changes together. npm ci requires a lockfile, rejects manifest/lock mismatch without rewriting it, removes existing node_modules and installs the whole project while preserving manifests. Use the dependency-tree-affecting flags that generated the lock. Review the resolved graph, run relevant compatibility tests and publish a new immutable version. Reproducible resolution under those inputs does not prove application correctness.

Preserve the identity of tested bytes

Keep source SHA, immutable run ID, artifact name/identity, digest and package version as separate fields. Azure Pipelines BuildId identifies a run; formatted names and Rev counters are presentation/evaluation mechanisms. A mutable “latest” lookup cannot replace permanent provenance. Promote the same tested bytes into later environments.

Modern GitHub upload-artifact behavior makes artifacts immutable. Independently uploading matrix jobs need distinct names; repeated uploads to one name are not appends. overwrite replaces/deletes an artifact and creates another identity. Capture artifact-id, artifact-url and artifact-digest from the pinned action contract. Hidden files are omitted by default in the adopted behavior; include only intentionally reviewed content, never credential files for directory completeness.

Cross-run downloads need the originating run and an authorized token. Compare returned provenance/digest to the accepted artifact. The adopted mismatch behavior warns; a warning is not an enforced release-integrity rejection. Add an explicit rejecting validation if that is the release requirement. Use the pinned output name artifact-digest rather than combining incompatible narrative snippets.

Deleting a run removes its associated pipeline artifacts. Feed cleanup differs, and promotion to a view can exempt packages from automatic cleanup. Preserve original release evidence and recovery needs before deletion. A recycle window does not authorize publishing changed bytes under the same immutable package version. Also verify that filenames and paths work on the consuming platform.

Summary

Choose registry, feed, upstream and permissions around real producer/consumer operations. Promote immutable verified versions, preserve unresolved permission boundaries, and make declared ranges and resolved graphs explicit. Carry the tested artifact's identities and digest forward, then retain the evidence needed for release recovery before cleanup.

PUBLIC BETA OFFER

Save 50% off on an Eligible Learning Plan

Valid for 1-month plan, 3-month plan, 12-month plan · Code LPXBETA50 · Ends Dec 6, 2026