Course contentsShow
← Cloud and Infrastructure
Lesson 1672 of 2,98934. CI/CD FoundationsFree lesson

Artifact Lifecycle

Understand artifact progression through development, testing, staging, and production environments with versioning.

Artifact Lifecycle

You'll learn: How artifacts progress through multiple environments from build to production with proper versioning controls.

The Journey of an Artifact

Think of an artifact like a parcel moving through a shipping system. Just as a package gets scanned at each checkpoint, your build artifacts pass through distinct stages—each validating the artifact is ready for the next destination.

Progression Through Environments

Once created (covered in "What are Build Artifacts?"), an artifact follows a structured path:

  1. Development Environment - The artifact is first deployed where developers verify basic functionality
  2. Testing Environment - Automated tests run against the artifact to catch bugs early
  3. Staging Environment - A production-like environment where final validation occurs
  4. Production Environment - The artifact serves real users

The same immutable artifact moves through each stage. You never rebuild between environments—this ensures what you tested is exactly what you deploy.

Versioning Through the Lifecycle

Each artifact carries a version identifier (like myapp-1.2.3-build456.jar). As it progresses:

  • Development: 1.2.3-SNAPSHOT or 1.2.3-alpha
  • Testing: 1.2.3-rc1 (release candidate)
  • Staging: 1.2.3 (final version)
  • Production: 1.2.3 (same artifact, promoted)

The version stays with the artifact, allowing you to track which build is in which environment and roll back if needed.

Promotion vs Rebuilding

Promotion means moving the artifact forward without modification. Your pipeline marks the artifact as approved for the next stage, but the binary remains unchanged. This eliminates "works on my machine" problems because there's only one machine output—the artifact itself.

Key Takeaway: An artifact lifecycle manages the immutable progression of a single build through development, testing, staging, and production environments, using versioning to track its journey and ensure deployment consistency.