This is an automated email from the ASF dual-hosted git repository. rnewson pushed a commit to branch adoptium in repository https://gitbox.apache.org/repos/asf/couchdb-ci.git
commit b2463540eb4a5da6cb778b8c6548f2ab1a457e7d Author: Robert Newson <[email protected]> AuthorDate: Mon Sep 29 19:03:48 2025 +0100 switch to Adoptium packages for Java --- bin/apt-dependencies.sh | 6 ++++++ bin/install-dependencies.sh | 8 ++++++++ dockerfiles/debian-bookworm | 9 +-------- dockerfiles/debian-bullseye | 9 +-------- dockerfiles/debian-trixie | 9 +-------- dockerfiles/ubuntu-jammy | 9 +-------- dockerfiles/ubuntu-noble | 9 +-------- 7 files changed, 19 insertions(+), 40 deletions(-) diff --git a/bin/apt-dependencies.sh b/bin/apt-dependencies.sh index 40dfc6e..a0358cf 100755 --- a/bin/apt-dependencies.sh +++ b/bin/apt-dependencies.sh @@ -177,6 +177,12 @@ else apt-get install --no-install-recommends -y libffi-dev pkg-kde-tools autotools-dev fi +# Configure Adoptium for Java +apt-get update || true +apt install -y wget apt-transport-https gpg +wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null +echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list > /dev/null + # Erlang is installed by apt-erlang.sh # clean up diff --git a/bin/install-dependencies.sh b/bin/install-dependencies.sh index 9811d7e..fac1aab 100755 --- a/bin/install-dependencies.sh +++ b/bin/install-dependencies.sh @@ -33,6 +33,9 @@ NODEVERSION=${NODEVERSION:-20} ERLANGVERSION=${ERLANGVERSION:-26.2.5.15} ELIXIRVERSION=${ELIXIRVERSION:-v1.18.4} +# Java JDKs needed +CLOUSEAU_JDK_VERSION="8" +NOUVEAU_JDK_VERSION="21" # This works if we're not called through a symlink # otherwise, see https://stackoverflow.com/questions/59895/ @@ -102,6 +105,11 @@ case "${OSTYPE}" in ERLANGVERSION=${ERLANGVERSION} ${SCRIPTPATH}/apt-erlang.sh ELIXIRVERSION=${ELIXIRVERSION} ${SCRIPTPATH}/install-elixir.sh fi + # Install JDKs + apt update + apt install -y temurin-${CLOUSEAU_JDK_VERSION}-jdk temurin-${NOUVEAU_JDK_VERSION}-jdk + export JAVA_HOME=$(update-java-alternatives -l | grep "-${NOUVEAU_JDK_VERSION}-" | awk '{print $3}') + export CLOUSEAU_JAVA_HOME=$(update-java-alternatives -l | grep "-${CLOUSEAU_JDK_VERSION}-" | awk '{print $3}') run_scripts ${EXTRA_SCRIPTS_DIR} 'apt-' else echo "Sorry, we don't support this Linux (${ID}) yet." diff --git a/dockerfiles/debian-bookworm b/dockerfiles/debian-bookworm index 89e67b8..3210c84 100644 --- a/dockerfiles/debian-bookworm +++ b/dockerfiles/debian-bookworm @@ -21,14 +21,7 @@ ARG repository=debian FROM $repository:bookworm -# Install Java -ENV JAVA_HOME=/opt/java/openjdk -COPY --from=eclipse-temurin:21 $JAVA_HOME $JAVA_HOME -ENV PATH="${JAVA_HOME}/bin:${PATH}" - -# These are needed for the Clouseau integration -ENV CLOUSEAU_JAVA_HOME=/opt/java/openjdk8 -COPY --from=ibm-semeru-runtimes:open-8-jre /opt/java/openjdk $CLOUSEAU_JAVA_HOME +# This is needed for the Clouseau integration ENV PATH=/usr/local/lib/erlang/bin:"${PATH}" # Choose whether to install SpiderMonkey 1.8.5, default yes diff --git a/dockerfiles/debian-bullseye b/dockerfiles/debian-bullseye index eff092b..a726b7d 100644 --- a/dockerfiles/debian-bullseye +++ b/dockerfiles/debian-bullseye @@ -21,14 +21,7 @@ ARG repository=debian FROM $repository:bullseye -# Install Java -ENV JAVA_HOME=/opt/java/openjdk -COPY --from=eclipse-temurin:21 $JAVA_HOME $JAVA_HOME -ENV PATH="${JAVA_HOME}/bin:${PATH}" - -# These are needed for the Clouseau integration -ENV CLOUSEAU_JAVA_HOME=/opt/java/openjdk8 -COPY --from=ibm-semeru-runtimes:open-8-jre /opt/java/openjdk $CLOUSEAU_JAVA_HOME +# This is needed for the Clouseau integration ENV PATH=/usr/local/lib/erlang/bin:"${PATH}" # Choose whether to install SpiderMonkey 1.8.5, default yes diff --git a/dockerfiles/debian-trixie b/dockerfiles/debian-trixie index a8288e8..79ded2e 100644 --- a/dockerfiles/debian-trixie +++ b/dockerfiles/debian-trixie @@ -21,14 +21,7 @@ ARG repository=debian FROM $repository:trixie -# Install Java -ENV JAVA_HOME=/opt/java/openjdk -COPY --from=eclipse-temurin:21 $JAVA_HOME $JAVA_HOME -ENV PATH="${JAVA_HOME}/bin:${PATH}" - -# These are needed for the Clouseau integration -ENV CLOUSEAU_JAVA_HOME=/opt/java/openjdk8 -COPY --from=ibm-semeru-runtimes:open-8-jre /opt/java/openjdk $CLOUSEAU_JAVA_HOME +# This isneeded for the Clouseau integration ENV PATH=/usr/local/lib/erlang/bin:"${PATH}" # Choose whether to install SpiderMonkey 1.8.5, default yes diff --git a/dockerfiles/ubuntu-jammy b/dockerfiles/ubuntu-jammy index 98cb035..b0ce23b 100644 --- a/dockerfiles/ubuntu-jammy +++ b/dockerfiles/ubuntu-jammy @@ -19,14 +19,7 @@ FROM ubuntu:jammy -# Install Java -ENV JAVA_HOME=/opt/java/openjdk -COPY --from=eclipse-temurin:21 $JAVA_HOME $JAVA_HOME -ENV PATH="${JAVA_HOME}/bin:${PATH}" - -# These are needed for the Clouseau integration -ENV CLOUSEAU_JAVA_HOME=/opt/java/openjdk8 -COPY --from=ibm-semeru-runtimes:open-8-jre /opt/java/openjdk $CLOUSEAU_JAVA_HOME +# This is needed for the Clouseau integration ENV PATH=/usr/local/lib/erlang/bin:"${PATH}" # Choose whether to install SpiderMonkey 1.8.5, default yes diff --git a/dockerfiles/ubuntu-noble b/dockerfiles/ubuntu-noble index da41d91..886557f 100644 --- a/dockerfiles/ubuntu-noble +++ b/dockerfiles/ubuntu-noble @@ -19,14 +19,7 @@ FROM ubuntu:noble -# Install Java -ENV JAVA_HOME=/opt/java/openjdk -COPY --from=eclipse-temurin:21 $JAVA_HOME $JAVA_HOME -ENV PATH="${JAVA_HOME}/bin:${PATH}" - -# These are needed for the Clouseau integration -ENV CLOUSEAU_JAVA_HOME=/opt/java/openjdk8 -COPY --from=ibm-semeru-runtimes:open-8-jre /opt/java/openjdk $CLOUSEAU_JAVA_HOME +# This is needed for the Clouseau integration ENV PATH=/usr/local/lib/erlang/bin:"${PATH}" # Choose whether to install SpiderMonkey 1.8.5, default yes
