Artifact immutability is a guarantee about the relationship between a published artifact and its identity. Once a package, container image, or deployment archive is published under an immutable identity, that identity must never resolve to different content. Even an emergency fix needs a new artifact identity, though it may go through a different approval process. Release notes, approval status, and other metadata outside the artifact can change without changing the artifact itself.
A pipeline versioning strategy should distinguish release labels from content identifiers. A package version such as 2.4.1 communicates release information, but it is immutable only if the repository prevents that package version from being replaced or reused. A container image digest identifies specific content, while a tag such as stable may point to different images over time. A source commit ID alone does not identify the build output: two builds from the same commit can produce different bytes if dependencies, base images, or tools change. Give each publishable build candidate a unique version or build identifier, and record its source revision and output digest or checksum. If a publish attempt is retried, verify that any existing artifact has the expected checksum before treating the retry as successful.
Build once and promote the same output across environments. For example, a pipeline can publish a container image, run integration tests against its digest, and deploy that digest to staging and production after approval. Pass environment-specific configuration at deployment or runtime where possible so promotion does not require a rebuild. If promotion copies an artifact to a different repository, verify that the destination serves the expected content before deploying it. Use moving labels for discovery or release status, but record and deploy the resolved identity rather than resolving the label again after testing.
Enforce the guarantee at the repository boundary rather than relying only on naming conventions. Check whether the repository blocks overwrites, whether a deleted identifier can be reused, and who can change those settings. For example, enabling versioning in object storage allows multiple versions under one object key; it does not stop an unversioned read from returning a newer archive. Pin the specific object version and verify its checksum when consuming that archive.
Immutability does not require retaining every build. Retention is a separate decision: keep deployed artifacts and rollback candidates for the required recovery window, and expire unused candidates according to storage and audit requirements. Rollback means redeploying a previously approved identity, not uploading its bytes under the current release version. Immutability also does not establish who built an artifact or whether it is safe. Verify signatures and provenance where publisher trust matters, and block compromised identities from future deployments rather than replacing their contents.