mirror of https://github.com/apache/druid.git
run some integration tests with Java 21 (#15104)
* use setup-java everywhere for consistency * add Java 21 to integration test matrix * simplify docker build containers script + add Java 21 * fix for Java versions reporting 21-ea
This commit is contained in:
parent
5752a1a383
commit
352702bb25
|
@ -34,8 +34,11 @@ jobs:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup java
|
- name: setup java
|
||||||
run: export JAVA_HOME=$JAVA_HOME_8_X64
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: '8'
|
||||||
|
distribution: 'zulu'
|
||||||
|
|
||||||
- name: Cache Maven m2 repository
|
- name: Cache Maven m2 repository
|
||||||
id: maven
|
id: maven
|
||||||
|
|
|
@ -77,9 +77,11 @@ jobs:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup java
|
- name: setup java
|
||||||
run: |
|
uses: actions/setup-java@v3
|
||||||
echo "JAVA_HOME=$JAVA_HOME_${{ inputs.build_jdk }}_X64" >> $GITHUB_ENV
|
with:
|
||||||
|
java-version: ${{ inputs.build_jdk }}
|
||||||
|
distribution: 'zulu'
|
||||||
|
|
||||||
- name: Restore Maven repository
|
- name: Restore Maven repository
|
||||||
id: maven-restore
|
id: maven-restore
|
||||||
|
|
|
@ -62,9 +62,11 @@ jobs:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup java
|
- name: setup java
|
||||||
run: |
|
uses: actions/setup-java@v3
|
||||||
echo "JAVA_HOME=$JAVA_HOME_${{ inputs.runtime_jdk }}_X64" >> $GITHUB_ENV
|
with:
|
||||||
|
java-version: ${{ inputs.runtime_jdk }}
|
||||||
|
distribution: 'zulu'
|
||||||
|
|
||||||
- name: Restore Maven repository
|
- name: Restore Maven repository
|
||||||
id: maven-restore
|
id: maven-restore
|
||||||
|
|
|
@ -93,7 +93,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
jdk: [8, 17]
|
jdk: [8, 17, 21]
|
||||||
uses: ./.github/workflows/reusable-standard-its.yml
|
uses: ./.github/workflows/reusable-standard-its.yml
|
||||||
if: ${{ needs.changes.outputs.core == 'true' || needs.changes.outputs.common-extensions == 'true' }}
|
if: ${{ needs.changes.outputs.core == 'true' || needs.changes.outputs.common-extensions == 'true' }}
|
||||||
with:
|
with:
|
||||||
|
@ -150,8 +150,11 @@ jobs:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup java
|
- name: setup java
|
||||||
run: export JAVA_HOME=$JAVA_HOME_8_X64
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: '8'
|
||||||
|
distribution: 'zulu'
|
||||||
|
|
||||||
# the build step produces SNAPSHOT artifacts into the local maven repository,
|
# the build step produces SNAPSHOT artifacts into the local maven repository,
|
||||||
# we include github.sha in the cache key to make it specific to that build/jdk
|
# we include github.sha in the cache key to make it specific to that build/jdk
|
||||||
|
|
|
@ -24,7 +24,7 @@ if [ -z "$JAVA_BIN" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
JAVA_MAJOR="$("$JAVA_BIN" -version 2>&1 | sed -n -E 's/.* version "([^."]*).*/\1/p')"
|
JAVA_MAJOR="$("$JAVA_BIN" -version 2>&1 | sed -n -E 's/.* version "([^."-]*).*/\1/p')"
|
||||||
|
|
||||||
if [ "$JAVA_MAJOR" != "" ] && [ "$JAVA_MAJOR" -ge "11" ]
|
if [ "$JAVA_MAJOR" != "" ] && [ "$JAVA_MAJOR" -ge "11" ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -26,21 +26,18 @@ then
|
||||||
else
|
else
|
||||||
echo "\$DRUID_INTEGRATION_TEST_JVM_RUNTIME is set with value ${DRUID_INTEGRATION_TEST_JVM_RUNTIME}"
|
echo "\$DRUID_INTEGRATION_TEST_JVM_RUNTIME is set with value ${DRUID_INTEGRATION_TEST_JVM_RUNTIME}"
|
||||||
case "${DRUID_INTEGRATION_TEST_JVM_RUNTIME}" in
|
case "${DRUID_INTEGRATION_TEST_JVM_RUNTIME}" in
|
||||||
8)
|
8 | 11 | 17 | 21)
|
||||||
echo "Build druid-cluster with Java 8"
|
echo "Build druid-cluster with Java $DRUID_INTEGRATION_TEST_JVM_RUNTIME"
|
||||||
docker build -t druid/cluster --build-arg JDK_VERSION=8-slim-buster --build-arg ZK_VERSION --build-arg KAFKA_VERSION --build-arg CONFLUENT_VERSION --build-arg MYSQL_VERSION --build-arg MARIA_VERSION --build-arg MYSQL_DRIVER_CLASSNAME --build-arg APACHE_ARCHIVE_MIRROR_HOST $SHARED_DIR/docker
|
docker build -t druid/cluster \
|
||||||
;;
|
--build-arg JDK_VERSION=$DRUID_INTEGRATION_TEST_JVM_RUNTIME-slim-buster \
|
||||||
11)
|
--build-arg ZK_VERSION \
|
||||||
echo "Build druid-cluster with Java 11"
|
--build-arg KAFKA_VERSION \
|
||||||
docker build -t druid/cluster --build-arg JDK_VERSION=11-slim-buster --build-arg ZK_VERSION --build-arg KAFKA_VERSION --build-arg CONFLUENT_VERSION --build-arg MYSQL_VERSION --build-arg MARIA_VERSION --build-arg MYSQL_DRIVER_CLASSNAME --build-arg APACHE_ARCHIVE_MIRROR_HOST $SHARED_DIR/docker
|
--build-arg CONFLUENT_VERSION \
|
||||||
;;
|
--build-arg MYSQL_VERSION \
|
||||||
15)
|
--build-arg MARIA_VERSION \
|
||||||
echo "Build druid-cluster with Java 15"
|
--build-arg MYSQL_DRIVER_CLASSNAME \
|
||||||
docker build -t druid/cluster --build-arg JDK_VERSION=15-slim-buster --build-arg ZK_VERSION --build-arg KAFKA_VERSION --build-arg CONFLUENT_VERSION --build-arg MYSQL_VERSION --build-arg MARIA_VERSION --build-arg MYSQL_DRIVER_CLASSNAME --build-arg APACHE_ARCHIVE_MIRROR_HOST $SHARED_DIR/docker
|
--build-arg APACHE_ARCHIVE_MIRROR_HOST \
|
||||||
;;
|
$SHARED_DIR/docker
|
||||||
17)
|
|
||||||
echo "Build druid-cluster with Java 17"
|
|
||||||
docker build -t druid/cluster --build-arg JDK_VERSION=17-slim-buster --build-arg ZK_VERSION --build-arg KAFKA_VERSION --build-arg CONFLUENT_VERSION --build-arg MYSQL_VERSION --build-arg MARIA_VERSION --build-arg MYSQL_DRIVER_CLASSNAME --build-arg APACHE_ARCHIVE_MIRROR_HOST $SHARED_DIR/docker
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid JVM Runtime given. Stopping"
|
echo "Invalid JVM Runtime given. Stopping"
|
||||||
|
|
Loading…
Reference in New Issue