Skip to content

Commit 8c50624

Browse files
committed
[OPENJDK-2737] gate jlink calls behind S2I_ENABLE_JLINK
Ensure that S2I_ENABLE_JLINK=true before evaluating any of the jlink integration code. https://issues.redhat.com/browse/OPENJDK-2737 Signed-off-by: Jonathan Dowland <[email protected]>
1 parent acf0162 commit 8c50624

File tree

1 file changed

+16
-12
lines changed
  • modules/s2i/bash/artifacts/usr/local/s2i

1 file changed

+16
-12
lines changed

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

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,22 @@ source "${JBOSS_CONTAINER_UTIL_PATHFINDER_MODULE}/pathfinder.sh"
1919
setup_java_app_and_lib
2020

2121
# include our jlink scripts
22-
source "${JBOSS_CONTAINER_JAVA_JLINK_MODULE}/mkdeps.sh"
23-
echo "Invoking mkdeps"
24-
generate_deps
22+
if [ "$S2I_ENABLE_JLINK" = "true" ]; then
2523

26-
source "${JBOSS_CONTAINER_JAVA_JLINK_MODULE}/mkstrippeddeps.sh"
27-
echo "Stripping dependencies"
28-
mkstrippeddeps
24+
source "${JBOSS_CONTAINER_JAVA_JLINK_MODULE}/mkdeps.sh"
25+
echo "Invoking mkdeps"
26+
generate_deps
2927

30-
source "${JBOSS_CONTAINER_JAVA_JLINK_MODULE}/generatejdkdeps.sh"
31-
echo "Generating JDK dependencies"
32-
generatejdkdeps
28+
source "${JBOSS_CONTAINER_JAVA_JLINK_MODULE}/mkstrippeddeps.sh"
29+
echo "Stripping dependencies"
30+
mkstrippeddeps
3331

34-
source "${JBOSS_CONTAINER_JAVA_JLINK_MODULE}/mkjreimage.sh"
35-
echo "Linking jre"
36-
generate_jre_image
32+
source "${JBOSS_CONTAINER_JAVA_JLINK_MODULE}/generatejdkdeps.sh"
33+
echo "Generating JDK dependencies"
34+
generatejdkdeps
35+
36+
source "${JBOSS_CONTAINER_JAVA_JLINK_MODULE}/mkjreimage.sh"
37+
echo "Linking jre"
38+
generate_jre_image
39+
40+
fi

0 commit comments

Comments
 (0)