File tree Expand file tree Collapse file tree 18 files changed +55
-30
lines changed
artifacts/opt/jboss/container/java/jlink
s2i/bash/artifacts/usr/local/s2i Expand file tree Collapse file tree 18 files changed +55
-30
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ name: UBI9 OpenJDK 21 S2I Image CI
2
2
on : [push, pull_request]
3
3
env :
4
4
LANG : en_US.UTF-8
5
- IMAGE : ubi9- openjdk-21
5
+ IMAGE : openjdk-21-jlink-rhel9
6
6
jobs :
7
7
call-openjdkci :
8
8
uses : ./.github/workflows/image-workflow-template.yml
9
9
with :
10
- image : ubi9- openjdk-21
10
+ image : openjdk-21-jlink-rhel9
Original file line number Diff line number Diff line change 25
25
packages :
26
26
install :
27
27
- java-21-openjdk-devel
28
+ - java-21-openjdk-jmods
28
29
29
30
modules :
30
31
install :
Original file line number Diff line number Diff line change @@ -21,10 +21,7 @@ function generate_deps() {
21
21
--module-path dependencies \
22
22
" $JAVA_APP_JAR " \
23
23
" $JAVA_LIB_DIR " /** /* .jar \
24
- > deps.txt || {
25
- echo " jdeps failed: return code $? "
26
- exit $?
27
- }
24
+ > deps.txt
28
25
else
29
26
$JAVA_HOME /bin/jdeps --multi-release $JAVA_VERSION -R -s \
30
27
--module-path dependencies \
Original file line number Diff line number Diff line change
1
+ jlink_techpreview_warning ()
2
+ {
3
+ {
4
+ echo " WARNING WARNING WARNING"
5
+ echo " Jlink integration is a Tech Preview feature!"
6
+ echo " See <https://access.redhat.com/support/offerings/techpreview/>"
7
+ echo " for more information."
8
+ echo " WARNING WARNING WARNING"
9
+ } >&2
10
+ }
11
+
1
12
jlink_preflight_check ()
2
13
{
3
14
# preflight check: do we have what we need?
Original file line number Diff line number Diff line change 1
1
@ubi9/openjdk-17
2
- @ubi9 /openjdk-21
2
+ @openjdk-tech-preview /openjdk-21-jlink-rhel9
3
3
Feature : Openshift OpenJDK S2I tests (jlink specific )
4
- Scenario : Ensure jlinked builder is used to build the containerized application image
5
- Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from quarkus-quickstarts/getting-started-3.0.1.Final-nos2i
4
+
5
+ Scenario : tech preview warning is printed (OPENJDK-3038)
6
+ Given failing s2i build https://github.com/jboss-container-images/openjdk-test-applications from spring-boot-sample-simple/target using master
6
7
| variable | value |
7
8
| S2I_ENABLE_JLINK | true |
8
- | QUARKUS_PACKAGE_TYPE | uber -jar |
9
- Then run ls /tmp/jre in container and check its output for bin
9
+ Then s2i build log should contain Jlink integration is a Tech Preview feature
10
10
11
11
Scenario : Ensure S2I_ENABLE_JLINK is not set to true
12
12
Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from quarkus-quickstarts/getting-started-3.0.1.Final-nos2i
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
- set -e
3
+ set -eo pipefail
4
4
5
5
source " ${JBOSS_CONTAINER_UTIL_LOGGING_MODULE} /logging.sh"
6
6
source " ${JBOSS_CONTAINER_MAVEN_S2I_MODULE} /maven-s2i"
@@ -22,22 +22,35 @@ setup_java_app_and_lib
22
22
if [ " $S2I_ENABLE_JLINK " = " true" ]; then
23
23
24
24
source " ${JBOSS_CONTAINER_JAVA_JLINK_MODULE} /preflight.sh"
25
+ jlink_techpreview_warning
25
26
jlink_preflight_check
26
27
27
28
source " ${JBOSS_CONTAINER_JAVA_JLINK_MODULE} /mkdeps.sh"
28
29
echo " Invoking mkdeps"
29
- generate_deps
30
+ generate_deps || {
31
+ log_error " mkdeps failed, return code: $? "
32
+ exit 1
33
+ }
30
34
31
35
source " ${JBOSS_CONTAINER_JAVA_JLINK_MODULE} /mkstrippeddeps.sh"
32
36
echo " Stripping dependencies"
33
- mkstrippeddeps
37
+ mkstrippeddeps || {
38
+ log_error " stripping dependencies failed, return code: $? "
39
+ exit 1
40
+ }
34
41
35
42
source " ${JBOSS_CONTAINER_JAVA_JLINK_MODULE} /generatejdkdeps.sh"
36
43
echo " Generating JDK dependencies"
37
- generatejdkdeps
44
+ generatejdkdeps || {
45
+ log_error " generating JDK dependencies failed, return code: $? "
46
+ exit 1
47
+ }
38
48
39
49
source " ${JBOSS_CONTAINER_JAVA_JLINK_MODULE} /mkjreimage.sh"
40
50
echo " Linking jre"
41
- generate_jre_image
51
+ generate_jre_image || {
52
+ log_error " Linking JRE failed, return code: $? "
53
+ exit 1
54
+ }
42
55
43
56
fi
Original file line number Diff line number Diff line change 10
10
signing_intent : release
11
11
repository :
12
12
name : containers/openjdk
13
- branch : openjdk-21-ubi9
13
+ branch : openjdk-21-jlink-tech-preview- ubi9
14
14
15
15
packages :
16
16
manager : microdnf
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ parameters:
12
12
name : JDK_VERSION
13
13
value : " 11"
14
14
required : true
15
+ - description : OpenJDK builder image version tag
16
+ name : BUILDER_IMAGE_TAG
17
+ value : " latest"
15
18
- description : A name for the application used to ensure created resources are uniquely named
16
19
name : APPNAME
17
20
required : true
@@ -83,7 +86,7 @@ objects:
83
86
dockerStrategy :
84
87
from :
85
88
kind : ImageStreamTag
86
- name : ubi9-openjdk-${JDK_VERSION}:1.18 # Refer README.md to create this ImageStream
89
+ name : ubi9-openjdk-${JDK_VERSION}:${BUILDER_IMAGE_TAG} # Refer README.md to create this ImageStream
87
90
output :
88
91
to :
89
92
kind : ImageStreamTag
@@ -94,7 +97,7 @@ objects:
94
97
imageChange :
95
98
from :
96
99
kind : ImageStreamTag
97
- name : ubi9-openjdk-${JDK_VERSION}:1.18 # UBI9 OpenJDK ImageStreams with `jlink-dev` support
100
+ name : ubi9-openjdk-${JDK_VERSION}:${BUILDER_IMAGE_TAG}
98
101
# #############################################################################
99
102
# stage-2: Output ImageStream
100
103
- apiVersion : image.openshift.io/v1
Original file line number Diff line number Diff line change 1
1
@ubi9/openjdk-11
2
2
@ubi9/openjdk-17
3
- @ubi9 /openjdk-21
3
+ @openjdk-tech-preview /openjdk-21-jlink-rhel9
4
4
Feature : Openshift S2I tests
5
5
Scenario : Check networkaddress.cache.negative.ttl has been set correctly
6
6
Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from binary-cli-security-property
Original file line number Diff line number Diff line change 2
2
@ignore
3
3
@ubi9/openjdk-11
4
4
@ubi9/openjdk-17
5
- @ubi9 /openjdk-21
5
+ @openjdk-tech-preview /openjdk-21-jlink-rhel9
6
6
Feature : Openshift OpenJDK S2I tests
7
7
# NOTE: these tests should be usable with the other images once we have refactored the JDK scripts.
8
8
# These builds do not actually run maven. This is important, because the proxy
You can’t perform that action at this time.
0 commit comments