This is an automated email from the ASF dual-hosted git repository.
FrankChen021 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new 0a0196c51b4 ci: reduce CI duration from 1h15m to 43m (#20270)
0a0196c51b4 is described below
commit 0a0196c51b4322e35e84d0faf8bc71155965f5bb
Author: Frank Chen <[email protected]>
AuthorDate: Tue Sep 8 09:57:48 2026 +0800
ci: reduce CI duration from 1h15m to 43m (#20270)
* ci: optimize Docker test pipeline
* ci: limit Docker build context
---
.dockerignore | 6 ++++++
.github/scripts/{validate-dist => build-dist} | 2 +-
.github/scripts/run_docker-tests | 2 +-
.github/workflows/ci.yml | 6 ------
.github/workflows/codeql.yml | 10 ++++++++--
.github/workflows/docker-tests.yml | 23 ++++++++--------------
.../unit-and-integration-tests-unified.yml | 1 -
7 files changed, 24 insertions(+), 26 deletions(-)
diff --git a/.dockerignore b/.dockerignore
index d7ae5a9cf59..5fa96a3a184 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -35,3 +35,9 @@ target
*.DS_Store
_site
dependency-reduced-pom.xml
+
+# Allow the host-built distribution to pass its binary tarball into
+# the Docker build while continuing to exclude all other build output.
+!distribution/target/
+distribution/target/*
+!distribution/target/apache-druid-*-bin.tar.gz
diff --git a/.github/scripts/validate-dist b/.github/scripts/build-dist
similarity index 87%
rename from .github/scripts/validate-dist
rename to .github/scripts/build-dist
index 4265aeeb4c8..fb77bb1b484 100755
--- a/.github/scripts/validate-dist
+++ b/.github/scripts/build-dist
@@ -18,4 +18,4 @@
set -e
set -x
-mvn -B clean install -Papache-release,dist,rat -DskipTests
-Ddependency-check.skip -Dgpg.skip
+mvn -B -T1C clean install -Papache-release,dist,rat,bundle-contrib-exts
-DskipTests -Ddependency-check.skip -Dgpg.skip
diff --git a/.github/scripts/run_docker-tests b/.github/scripts/run_docker-tests
index 17bf110c031..02bce778792 100755
--- a/.github/scripts/run_docker-tests
+++ b/.github/scripts/run_docker-tests
@@ -35,4 +35,4 @@ fi
# No snapshot updates
OPTS+=" -nsu"
-mvn -B $OPTS verify -Pdocker-tests,skip-static-checks -DskipUTs
-D$DRUID_IMAGE_SYS_PROPERTY=$DRUID_IMAGE_NAME
"-DjfrProfilerArgLine=$JFR_PROFILER_ARG_LINE" "$@"
+mvn -B -pl embedded-tests -am $OPTS verify -Pdocker-tests,skip-static-checks
-DskipUTs -D$DRUID_IMAGE_SYS_PROPERTY=$DRUID_IMAGE_NAME
"-DjfrProfilerArgLine=$JFR_PROFILER_ARG_LINE" "$@"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 333f6b6fe85..c8b04b55259 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -34,12 +34,6 @@ jobs:
key: "test-jdk${{ matrix.jdk }}-[${{ matrix.pattern }}]"
execute: ${{ matrix.jdk == '25' || github.event_name == 'push' ||
contains(github.event.pull_request.labels.*.name, 'test-jdk21') }}
- validate-dist:
- uses: ./.github/workflows/worker.yml
- with:
- script: .github/scripts/validate-dist
- key: "validate-dist"
-
reporting-jacoco-coverage-failures:
name: "coverage-jacoco"
needs: [run-unit-tests, run-separated-tests]
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index fbd99333956..52d36374fa1 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -41,7 +41,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6
- - uses: actions/setup-java@v5
+ # JavaScript/TypeScript and Python are analyzed directly from source and do
+ # not need a Java runtime or Maven build.
+ - name: Set up Java
+ if: ${{ matrix.language == 'java' }}
+ uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '25'
@@ -60,7 +64,9 @@ jobs:
# Details on CodeQL's query packs refer to :
https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
queries: +security-and-quality
- - run: |
+ - name: Build Java sources
+ if: ${{ matrix.language == 'java' }}
+ run: |
echo "Building using custom commands"
mvn clean package -f "pom.xml" -B -V -e -Dfindbugs.skip
-Dcheckstyle.skip -Dpmd.skip=true -Denforcer.skip -Dmaven.javadoc.skip
-DskipTests -Dmaven.test.skip.exec -Dlicense.skip=true -Dweb.console.skip=true
-Dcyclonedx.skip=true
diff --git a/.github/workflows/docker-tests.yml
b/.github/workflows/docker-tests.yml
index 52fac44f1a2..5e4186b557e 100644
--- a/.github/workflows/docker-tests.yml
+++ b/.github/workflows/docker-tests.yml
@@ -25,27 +25,20 @@ jobs:
- uses: actions/checkout@v6
- name: Set Docker image env var
run: echo "DRUID_DIST_IMAGE_NAME=apache/druid:docker-tests" >>
$GITHUB_ENV
- - name: Build the Docker image
- run: DOCKER_BUILDKIT=1 docker build -t $DRUID_DIST_IMAGE_NAME -f
distribution/docker/Dockerfile .
- - name: Save Docker image to archive
- run: |
- echo "Saving image $DRUID_DIST_IMAGE_NAME in archive
druid-dist-container.tar.gz"
- docker save "$DRUID_DIST_IMAGE_NAME" | gzip >
druid-dist-container.tar.gz
- - name: Stop and remove Druid Docker containers
- run: |
- echo "Force stopping all Druid containers and pruning"
- docker ps -aq --filter "ancestor=apache/druid" | xargs -r docker rm
-f
- docker system prune -af --volumes
- - name: Load Docker image
- run: |
- docker load --input druid-dist-container.tar.gz
- docker images
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 25
cache: 'maven'
+ - name: Build the Druid distribution
+ run: .github/scripts/build-dist
+ - name: Build the Docker image
+ run: |
+ DOCKER_BUILDKIT=1 docker build \
+ --build-arg BUILD_FROM_SOURCE=false \
+ -t "$DRUID_DIST_IMAGE_NAME" \
+ -f distribution/docker/Dockerfile .
- name: Run Docker tests
id: run-it
run: .github/scripts/run_docker-tests
diff --git a/.github/workflows/unit-and-integration-tests-unified.yml
b/.github/workflows/unit-and-integration-tests-unified.yml
index e960493dba3..1f95c8c8a8c 100644
--- a/.github/workflows/unit-and-integration-tests-unified.yml
+++ b/.github/workflows/unit-and-integration-tests-unified.yml
@@ -56,7 +56,6 @@ jobs:
uses: ./.github/workflows/ci.yml
docker-tests:
- needs: [unit-tests]
uses: ./.github/workflows/docker-tests.yml
actions-timeline:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]