CI Environment

Apache Cassandra provides a set of build and test scripts in the .build/ directory that support both local development and CI pipelines.

Build Helper Scripts

All scripts are located under .build/ in the Cassandra repository and accept -h for help. See the .build/README.md for full documentation.

Code Checks

# With Docker
.build/docker/check-code.sh

# Without Docker
.build/check-code.sh

# With a specific JDK
.build/docker/check-code.sh 11

Use the Docker form for final verification and CI parity. Use the non-Docker form when you want a faster local iteration loop on a machine that already has the required build tools installed.

Building Artifacts

# Tarball and Maven artifacts
.build/docker/build-artifacts.sh

# Debian and RedHat packages (Docker only)
.build/docker/build-debian.sh
.build/docker/build-redhat.sh

Parallel Builds

Use a custom build directory to run parallel builds from the same source:

build_dir=/tmp/cass_build1 .build/docker/check-code.sh

Test Execution

See Testing for the full guide on running tests, including all test types and Docker options.

SonarQube Analysis

Static analysis can be run with SonarQube:

ant sonar

This requires a SonarQube server. To start one locally in Docker:

ant sonar-create-server   # Creates and starts a local SonarQube container
ant sonar                 # Run analysis
# Results at http://localhost:9000 (admin/password)
ant sonar-stop-server     # Stop (but keep container for later)

For an external server, set the environment variables SONAR_HOST_URL, SONAR_CASSANDRA_TOKEN, and SONAR_PROJECT_KEY.

Historical CI was provided by a DataStax-hosted Jenkins instance (cassci.datastax.com), which is no longer available. Current CI practices use the .build/ scripts and CircleCI configuration in the repository.