Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Commit

Permalink
Add Java 17 build
Browse files Browse the repository at this point in the history
This commits refactors the CI configuration to add Java 17 builds:
 - No more stable qualifier
 - Add spring-native qualifier to ci-image to avoid side effects
   for other projects
 - Provide Java 17 CI, GraalVM and Spring Native images
 - Use parameters.yml for JDK URL

This commit also renames jdk-identifier to labsjdk-identifier
for clarity.

See gh-773
  • Loading branch information
sdeleuze committed Oct 17, 2021
1 parent 383cfb2 commit ecbaab9
Show file tree
Hide file tree
Showing 10 changed files with 206 additions and 92 deletions.
2 changes: 1 addition & 1 deletion ci/images/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ NOTE: Some image requires build arguments.
To build the CI image that is used for releases and deployment, invoke the following:

----
$ docker build --no-cache -f ci-image/Dockerfile .
$ docker build --no-cache --build-arg JDK_URL=... -f spring-native-ci-image/Dockerfile .
----

To build the image that has the required GraalVM installation, you need two build
Expand Down
8 changes: 0 additions & 8 deletions ci/images/ci-image/Dockerfile

This file was deleted.

11 changes: 0 additions & 11 deletions ci/images/get-jdk-url.sh

This file was deleted.

6 changes: 3 additions & 3 deletions ci/images/graalvm-ce-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM springci/ci-image:main

ARG JDK_IDENTIFIER
ARG LABSJDK_IDENTIFIER
ARG GRAALVM_BRANCH

ENV PATH="/opt/mx:$PATH"
Expand All @@ -13,8 +13,8 @@ RUN cd /opt \
&& git clone --single-branch --branch master https://github.com/graalvm/mx.git \
&& git clone --single-branch --branch $GRAALVM_BRANCH https://github.com/oracle/graal.git

RUN mx --quiet fetch-jdk --jdk-id $JDK_IDENTIFIER --configuration /opt/graal/common.json --to /opt \
|| mx --quiet fetch-jdk --jdk-id $JDK_IDENTIFIER --to /opt
RUN mx --quiet fetch-jdk --jdk-id $LABSJDK_IDENTIFIER --configuration /opt/graal/common.json --to /opt \
|| mx --quiet fetch-jdk --jdk-id $LABSJDK_IDENTIFIER --to /opt

RUN mv /opt/labsjdk-ce-* /opt/openjdk-jvmci

Expand Down
3 changes: 1 addition & 2 deletions ci/images/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ curl --output /opt/concourse-release-scripts.jar https://repo.spring.io/release/
###########################################################
# JAVA
###########################################################
JDK_URL=$( ./get-jdk-url.sh $1 )

mkdir -p /opt/openjdk
cd /opt/openjdk
curl -L ${JDK_URL} | tar zx --strip-components=1
curl -L $1 | tar zx --strip-components=1
test -f /opt/openjdk/bin/java
test -f /opt/openjdk/bin/javac
9 changes: 9 additions & 0 deletions ci/images/spring-native-ci-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM ubuntu:focal

ARG JDK_URL

ADD setup.sh /setup.sh
RUN ./setup.sh $JDK_URL

ENV JAVA_HOME /opt/openjdk
ENV PATH $JAVA_HOME/bin:$PATH
8 changes: 6 additions & 2 deletions ci/parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ registry-mirror-host: docker.repo.spring.io
registry-mirror-username: ((artifactory-username))
registry-mirror-password: ((artifactory-password))

jdk-url-java11: "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.12%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.12_7.tar.gz"
jdl-url-java17: "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17%2B35/OpenJDK17-jdk_x64_linux_hotspot_17_35.tar.gz"

graalvm-repo: "https://github.com/oracle/graal.git"
graalvm-stable-branch: "release/graal-vm/21.2"
jdk-identifier-java11: "labsjdk-ce-11"
graalvm-branch: "release/graal-vm/21.2"
labsjdk-identifier-java11: "labsjdk-ce-11"
labsjdk-identifier-java17: "labsjdk-ce-17"
Loading

0 comments on commit ecbaab9

Please sign in to comment.