Pipeline integration (packaging in pipelines)
What it is
Pipeline integration is how packaging and dependency consumption plug into Azure Pipelines (and other CI/CD): pipelines restore dependencies from feeds during the build, publish newly built packages to feeds, and consume packages downstream. This is the automation layer that makes a dependency-management strategy actually run continuously.
Why it exists
Dependency management is only useful if the CI/CD pipeline actually uses it. Manually publishing packages or pointing builds at public registries defeats reproducibility. Pipeline integration automates: restore → build → test → package → publish, so every commit can flow through the same governed, versioned feed.
Key ideas
- Restore — pipeline tasks (
NuGet restore,npm install,pip,Maven) authenticate to the feed and pull dependencies; feed upstream sources supply cached external packages. - Publish — build steps produce packages and push them to a feed using the Azure Artifacts task or CLI; versioning often derived from SemVer (GitVersion,
${{ build.buildId }}, etc.). - Service connection / credentials — the Azure Artifacts service connection gives pipeline agents read/write access to feeds without hardcoding tokens.
- Conditional publishing — typically only main/
release/*branches publish to a feed; feature branches may publish to a prerelease view. - Downstream consumption — release pipelines pull the published package from the feed rather than copying build artifacts directly.
How it fits
Exam notes
- Use the Azure Artifacts service connection for feed auth in pipelines, not checked-in credentials.
- Publish from main/release branches only and use views (
@Release) for promotion; feed package versions are immutable. - Lock files (
package-lock.json,packages.lock.json) should be committed so restore is reproducible. - Enabling upstream sources in the feed means the pipeline needs no direct internet for common packages.
Related
dependency-management · azure-artifacts · package-feed · upstream-sources · build-artifact · azure-pipelines · dependency-graph
📘 Source: Microsoft Learn — Pipeline Integration