Principle:Apache Kafka Source Artifact Building
| Knowledge Sources | |
|---|---|
| Domains | Release_Engineering, Build_Systems |
| Last Updated | 2026-02-09 12:00 GMT |
Overview
A build process that produces distributable source and binary archives from a version-controlled codebase.
Description
Source Artifact Building creates the official distribution archives for a release. For Apache projects, this includes a source tarball (created directly from the git repository) and binary distribution tarballs (built via the project's build system). The source tarball is produced using git archive to ensure it contains exactly the committed code without build artifacts. The binary distribution is built from a clean clone to verify reproducibility.
Usage
Use this principle after the release branch and version files have been prepared. The resulting artifacts are the primary deliverables that will be signed, checksummed, and uploaded to the distribution infrastructure.
Theoretical Basis
The build follows a clean-room approach:
- Source Archive: Use git archive to create a tarball from a specific revision, ensuring only tracked files are included.
- Clean Clone: Clone the repository to a temporary directory to ensure the build environment is pristine.
- Binary Build: Execute the project's build system (Gradle) on the clean clone to produce binary distributions.
This ensures artifacts are reproducible and free from local development artifacts.