Skip to content

Commit b74f064

Browse files
committed
Merge remote-tracking branch 'upstream2/jlink-dev' into error-handling
2 parents 4e589a8 + 090f253 commit b74f064

File tree

17 files changed

+37
-21
lines changed

17 files changed

+37
-21
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: UBI9 OpenJDK 21 S2I Image CI
22
on: [push, pull_request]
33
env:
44
LANG: en_US.UTF-8
5-
IMAGE: ubi9-openjdk-21
5+
IMAGE: openjdk-21-jlink-rhel9
66
jobs:
77
call-openjdkci:
88
uses: ./.github/workflows/image-workflow-template.yml
99
with:
10-
image: ubi9-openjdk-21
10+
image: openjdk-21-jlink-rhel9

modules/jdk/21/module.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ envs:
2525
packages:
2626
install:
2727
- java-21-openjdk-devel
28+
- java-21-openjdk-jmods
2829

2930
modules:
3031
install:

modules/jlink/artifacts/opt/jboss/container/java/jlink/preflight.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
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+
112
jlink_preflight_check()
213
{
314
# preflight check: do we have what we need?

modules/jlink/tests/features/jlink.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
@ubi9/openjdk-17
2-
@ubi9/openjdk-21
2+
@openjdk-tech-preview/openjdk-21-jlink-rhel9
33
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
67
| variable | value |
78
| 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
1010

1111
Scenario: Ensure S2I_ENABLE_JLINK is not set to true
1212
Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from quarkus-quickstarts/getting-started-3.0.1.Final-nos2i

modules/s2i/bash/artifacts/usr/local/s2i/assemble

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ setup_java_app_and_lib
2222
if [ "$S2I_ENABLE_JLINK" = "true" ]; then
2323

2424
source "${JBOSS_CONTAINER_JAVA_JLINK_MODULE}/preflight.sh"
25+
jlink_techpreview_warning
2526
jlink_preflight_check
2627

2728
source "${JBOSS_CONTAINER_JAVA_JLINK_MODULE}/mkdeps.sh"

redhat/ubi9-openjdk-21.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ osbs:
1010
signing_intent: release
1111
repository:
1212
name: containers/openjdk
13-
branch: openjdk-21-ubi9
13+
branch: openjdk-21-jlink-tech-preview-ubi9
1414

1515
packages:
1616
manager: microdnf

templates/jlink/jlinked-app.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ parameters:
1212
name: JDK_VERSION
1313
value: "11"
1414
required: true
15+
- description: OpenJDK builder image version tag
16+
name: BUILDER_IMAGE_TAG
17+
value: "latest"
1518
- description: A name for the application used to ensure created resources are uniquely named
1619
name: APPNAME
1720
required: true
@@ -71,7 +74,7 @@ objects:
7174
dockerStrategy:
7275
from:
7376
kind: ImageStreamTag
74-
name: ubi9-openjdk-${JDK_VERSION}:1.18 # Refer README.md to create this ImageStream
77+
name: ubi9-openjdk-${JDK_VERSION}:${BUILDER_IMAGE_TAG} # Refer README.md to create this ImageStream
7578
output:
7679
to:
7780
kind: ImageStreamTag
@@ -82,7 +85,7 @@ objects:
8285
imageChange:
8386
from:
8487
kind: ImageStreamTag
85-
name: ubi9-openjdk-${JDK_VERSION}:1.18 # UBI9 OpenJDK ImageStreams with `jlink-dev` support
88+
name: ubi9-openjdk-${JDK_VERSION}:${BUILDER_IMAGE_TAG}
8689
##############################################################################
8790
# stage-2: Output ImageStream
8891
- apiVersion: image.openshift.io/v1

tests/features/java.security.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@ubi9/openjdk-11
22
@ubi9/openjdk-17
3-
@ubi9/openjdk-21
3+
@openjdk-tech-preview/openjdk-21-jlink-rhel9
44
Feature: Openshift S2I tests
55
Scenario: Check networkaddress.cache.negative.ttl has been set correctly
66
Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from binary-cli-security-property

tests/features/java/java_s2i.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@ignore
33
@ubi9/openjdk-11
44
@ubi9/openjdk-17
5-
@ubi9/openjdk-21
5+
@openjdk-tech-preview/openjdk-21-jlink-rhel9
66
Feature: Openshift OpenJDK S2I tests
77
# NOTE: these tests should be usable with the other images once we have refactored the JDK scripts.
88
# These builds do not actually run maven. This is important, because the proxy

tests/features/java/java_s2i_inc.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@ubi9/openjdk-11
22
@ubi9/openjdk-17
3-
@ubi9/openjdk-21
3+
@openjdk-tech-preview/openjdk-21-jlink-rhel9
44
Feature: Openshift OpenJDK S2I tests
55

66
# test incremental builds

0 commit comments

Comments
 (0)