Skip to content

Commit 9b8a913

Browse files
authored
Merge pull request #415 from jmtd/ubi8-jdk21
[OPENJDK-2411] JDK21 images for UBI8
2 parents 1480a3e + 4eff5d8 commit 9b8a913

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+436
-96
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: UBI8 OpenJDK 21 Runtime S2I Image CI
2+
on: [push, pull_request]
3+
env:
4+
LANG: en_US.UTF-8
5+
IMAGE: ubi8-openjdk-21-runtime
6+
jobs:
7+
call-openjdkci:
8+
uses: ./.github/workflows/image-workflow-template.yml
9+
with:
10+
image: ubi8-openjdk-21-runtime

.github/workflows/ubi8-openjdk-21.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: UBI8 OpenJDK 21 S2I Image CI
2+
on: [push, pull_request]
3+
env:
4+
LANG: en_US.UTF-8
5+
IMAGE: ubi8-openjdk-21
6+
jobs:
7+
call-openjdkci:
8+
uses: ./.github/workflows/image-workflow-template.yml
9+
with:
10+
image: ubi8-openjdk-21

modules/jdk/11/configure.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55
SCRIPT_DIR=$(dirname $0)
66
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
77

8-
chown -R jboss:root $SCRIPT_DIR
8+
chown -R $USER:root $SCRIPT_DIR
99
chmod -R ug+rwX $SCRIPT_DIR
1010
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/openjdk/jdk/*
1111

modules/jdk/17/configure.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55
SCRIPT_DIR=$(dirname $0)
66
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
77

8-
chown -R jboss:root $SCRIPT_DIR
8+
chown -R $USER:root $SCRIPT_DIR
99
chmod -R ug+rwX $SCRIPT_DIR
1010
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/openjdk/jdk/*
1111

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
#!/bin/sh
3+
# ==============================================================================
4+
# JDK specific customizations
5+
#
6+
# ==============================================================================
7+
8+
function jvm_specific_diagnostics() {
9+
echo "-Xlog:gc::utctime -XX:NativeMemoryTracking=summary"
10+
}

modules/jdk/21/configure.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
# Configure module
3+
set -e
4+
5+
SCRIPT_DIR=$(dirname $0)
6+
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
7+
8+
chown -R $USER:root $SCRIPT_DIR
9+
chmod -R ug+rwX $SCRIPT_DIR
10+
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/openjdk/jdk/*
11+
12+
pushd ${ARTIFACTS_DIR}
13+
cp -pr * /
14+
popd
15+
16+
# Set this JDK as the alternative in use
17+
_arch="$(uname -i)"
18+
alternatives --set java java-21-openjdk.${_arch}
19+
alternatives --set javac java-21-openjdk.${_arch}
20+
alternatives --set java_sdk_openjdk java-21-openjdk.${_arch}
21+
alternatives --set jre_openjdk java-21-openjdk.${_arch}
22+
23+
# Update securerandom.source for quicker starts (must be done after removing jdk 8, or it will hit the wrong files)
24+
JAVA_SECURITY_FILE=/usr/lib/jvm/java/conf/security/java.security
25+
SECURERANDOM=securerandom.source
26+
if grep -q "^$SECURERANDOM=.*" $JAVA_SECURITY_FILE; then
27+
sed -i "s|^$SECURERANDOM=.*|$SECURERANDOM=file:/dev/urandom|" $JAVA_SECURITY_FILE
28+
else
29+
echo $SECURERANDOM=file:/dev/urandom >> $JAVA_SECURITY_FILE
30+
fi

modules/jdk/21/module.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
schema_version: 1
2+
3+
name: "jboss.container.openjdk.jdk"
4+
description: "Installs the JDK for OpenJDK 21."
5+
version: &jdkver "21"
6+
7+
labels:
8+
- name: "org.jboss.product"
9+
value: "openjdk"
10+
- name: "org.jboss.product.version"
11+
value: *jdkver
12+
- name: "org.jboss.product.openjdk.version"
13+
value: *jdkver
14+
15+
envs:
16+
- name: "JAVA_HOME"
17+
value: "/usr/lib/jvm/java-21"
18+
- name: "JAVA_VENDOR"
19+
value: "openjdk"
20+
- name: "JAVA_VERSION"
21+
value: *jdkver
22+
- name: JBOSS_CONTAINER_OPENJDK_JDK_MODULE
23+
value: /opt/jboss/container/openjdk/jdk
24+
25+
packages:
26+
install:
27+
- java-21-openjdk-devel
28+
29+
modules:
30+
install:
31+
- name: jboss.container.user
32+
33+
execute:
34+
- script: configure.sh

modules/jdk/8/configure.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55
SCRIPT_DIR=$(dirname $0)
66
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
77

8-
chown -R jboss:root $SCRIPT_DIR
8+
chown -R $USER:root $SCRIPT_DIR
99
chmod -R ug+rwX $SCRIPT_DIR
1010
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/openjdk/jdk/*
1111

modules/jre/11/configure.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo $SCRIPT_DIR
77
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
88
echo $ARTIFACTS_DIR
99

10-
chown -R jboss:root $SCRIPT_DIR
10+
chown -R $USER:root $SCRIPT_DIR
1111
chmod -R ug+rwX $SCRIPT_DIR
1212
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/openjdk/jre/*
1313

modules/jre/17/configure.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo $SCRIPT_DIR
77
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
88
echo $ARTIFACTS_DIR
99

10-
chown -R jboss:root $SCRIPT_DIR
10+
chown -R $USER:root $SCRIPT_DIR
1111
chmod -R ug+rwX $SCRIPT_DIR
1212
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/openjdk/jre/*
1313

0 commit comments

Comments
 (0)