This directory contains GitHub Actions workflows for Apache Cloudberry CI/CD.
| Workflow | Purpose | Trigger |
|---|---|---|
build-cloudberry.yml | Main CI: build, test, create RPMs | Push, PR, Manual |
build-dbg-cloudberry.yml | Debug build with assertions enabled | Push, PR, Manual |
apache-rat-audit.yml | License header compliance check | Push, PR |
coverity.yml | Static code analysis with Coverity | Weekly, Manual |
sonarqube.yml | Code quality analysis with SonarQube | Push to main |
docker-cbdb-build-containers.yml | Build Docker images for CI | Manual |
docker-cbdb-test-containers.yml | Build test Docker images | Manual |
Many workflows support manual triggering via workflow_dispatch, allowing developers to run CI jobs on-demand.
build-cloudberry.yml - Main CI| Parameter | Description | Default | Example |
|---|---|---|---|
test_selection | Comma-separated list of tests to run, or “all” | all | ic-good-opt-off,ic-contrib |
reuse_artifacts_from_run_id | Run ID to reuse build artifacts from (see below) | (empty) | 12345678901 |
Available test selections:
all - Run all test suitesic-good-opt-off - Installcheck with optimizer offic-good-opt-on - Installcheck with optimizer onic-contrib - Contrib extension testsic-resgroup - Resource group testsic-resgroup-v2 - Resource group v2 testsic-resgroup-v2-memory-accounting - Resource group memory testsic-singlenode - Single-node mode testsmake-installcheck-world - Full test suiteWhen debugging test failures, rebuilding Cloudberry (~50-70 minutes) on every iteration is inefficient. The artifact reuse feature allows you to reuse build artifacts from a previous successful run.
After a successful build (even if tests failed), get the run ID:
Option A: From GitHub Actions UI
https://github.com/apache/cloudberry/actions/runs/1234567890112345678901Option B: From GitHub API
# List recent workflow runs gh run list --workflow=build-cloudberry.yml --limit 5 # Get run ID from specific branch gh run list --workflow=build-cloudberry.yml --branch=my-feature --limit 1
Via GitHub UI:
Via GitHub CLI:
# Reuse artifacts from run 12345678901, run only specific tests gh workflow run build-cloudberry.yml \ --field reuse_artifacts_from_run_id=12345678901 \ --field test_selection=ic-good-opt-off
Debugging a specific test failure:
# Run 1: Full build + all tests (finds test failure in ic-good-opt-off) gh workflow run build-cloudberry.yml # Get the run ID from output RUN_ID=$(gh run list --workflow=build-cloudberry.yml --limit 1 --json databaseId --jq '.[0].databaseId') # Run 2: Reuse artifacts, run only failing test gh workflow run build-cloudberry.yml \ --field reuse_artifacts_from_run_id=$RUN_ID \ --field test_selection=ic-good-opt-off
Testing different configurations:
# Test with optimizer off, then on, using same build gh workflow run build-cloudberry.yml \ --field reuse_artifacts_from_run_id=$RUN_ID \ --field test_selection=ic-good-opt-off gh workflow run build-cloudberry.yml \ --field reuse_artifacts_from_run_id=$RUN_ID \ --field test_selection=ic-good-opt-on
GitHub Actions workflows are enabled in forks, allowing you to validate changes before submitting a Pull Request.
Fork the repository to your GitHub account
Enable GitHub Actions in your fork:
Secrets Configuration:
No manual secret configuration is required for the main build and test workflows.
GITHUB_TOKEN is automatically provided by GitHub and used when downloading artifacts from previous runs (artifact reuse feature)DOCKERHUB_USER, DOCKERHUB_TOKEN) are only required for building custom container images (advanced/maintainer use case, not needed for typical development)workflow_dispatch is fully functional# 1. Create feature branch in fork git checkout -b fix-test-failure # 2. Make changes and push to fork git commit -am "Fix test failure" git push origin fix-test-failure # 3. CI runs automatically on push # 4. If tests fail, iterate using artifact reuse # Get run ID from your fork's Actions tab gh workflow run build-cloudberry.yml \ --field reuse_artifacts_from_run_id=12345678901 \ --field test_selection=ic-good-opt-off # 5. Once tests pass, open PR to upstream gh pr create --web
Cause: Artifacts from specified run ID not found or expired
Solution:
Cause: GitHub Actions not enabled in fork
Solution:
Cause: Workflow trying to access artifacts from different repository
Solution: