Build, test and artifact promotion
From a commit to a release
CI (continuous integration) builds and tests changes frequently. Continuous delivery keeps a tested release ready for deployment; continuous deployment automatically releases changes that satisfy the gates. An artifact is a concrete build output, such as a ZIP or container image. For a small bookstore API, build commit A once, record the ZIP hash, test that ZIP in staging, then promote the same bytes to production after approval. Rebuilding the same commit can produce different bytes because dependencies or build tools may change.
Trace an artifact
Suppose staging tested release R1 with digest H1. Production approval must refer to H1, the source commit and the test evidence. A new build R2 with digest H2 needs its own review, even if its file name is unchanged. Record the builder identity, dependency lock, source revision, digest and test result. A digest checks byte identity, not whether software is trustworthy; authenticated provenance and signatures help establish origin, and security review remains necessary.
Keep the stores separate
A Git repository stores source history. CodeArtifact stores versioned software packages used by tools such as pip and npm; it is not the container registry (ECR). CodePipeline commonly transfers action artifacts through an S3 artifact store. Protect each store with scoped access and retention rules. Lock dependencies, review upstream package sources and restrict publishing rights; a cached package is not automatically safe.
Practice: a failed gate
The test suite fails after packaging. Should you deploy because a ZIP exists? No: require a successful test result linked to the exact digest and approval. Use the offline lab to compare a permitted promotion with a changed artifact, a missing approval and a failing test. Review ECR and CloudFormation lessons for image identity and infrastructure change gates.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Build, test and artifact promotion — knowledge check
Reason about a safe delivery pipeline using synthetic scenarios.
Staging tested digest H1. What should production receive?
Which service stores versioned pip packages?
What does a SHA-256 digest establish when checked against a trusted expected digest?
Tests fail but the ZIP exists. What should happen?
Which evidence best links an artifact to its origin?