Skip to content

Commit 4f67aa3

Browse files
committed
[OPENJDK-3038] echo out Tech Preview warning
The jlink feature will initially ship as TP. Repurpose older unit test to check for the TP warning (older test is redundant as it only worked if jmods are installed). The test depends upon this being merged first: cekit/behave-test-steps#73 https://issues.redhat.com/browse/OPENJDK-3038 Signed-off-by: Jonathan Dowland <[email protected]>
1 parent 3dd45b2 commit 4f67aa3

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
@ubi9/openjdk-17
22
@ubi9/openjdk-21
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"

0 commit comments

Comments
 (0)