Skip to content

Commit

Permalink
[OPENJDK-2805] WIP install s2i scripts to libexec
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Dowland <[email protected]>
  • Loading branch information
jmtd committed Nov 15, 2024
1 parent 179ce26 commit 1d42286
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion modules/maven/s2i/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
chown -R $USER:root $SCRIPT_DIR
chmod -R ug+rwX $SCRIPT_DIR
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/maven/s2i/*
chmod ug+x ${ARTIFACTS_DIR}/usr/local/s2i/*
chmod ug+x ${ARTIFACTS_DIR}/usr/libexec/s2i/*

pushd ${ARTIFACTS_DIR}
cp -pr * /
Expand Down
2 changes: 1 addition & 1 deletion modules/run/tests/features/java.runtime.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ Feature: Openshift OpenJDK Runtime tests (OPENJDK-474)
| JAVA_DIAGNOSTICS | true |
Then container log should contain /deployments/undertow-servlet.jar unique
And container log should contain -XX:NativeMemoryTracking=summary
And file /usr/local/s2i/run should not contain JVM_ARGS
And file /usr/libexec/s2i/run should not contain JVM_ARGS
And container log should not contain unique unique
2 changes: 1 addition & 1 deletion modules/s2i/bash/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
chown -R $USER:root $SCRIPT_DIR
chmod -R ug+rwX $SCRIPT_DIR
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/java/s2i/*
chmod ug+x ${ARTIFACTS_DIR}/usr/local/s2i/*
chmod ug+x ${ARTIFACTS_DIR}/usr/libexec/s2i/*

pushd ${ARTIFACTS_DIR}
cp -pr * /
Expand Down
4 changes: 0 additions & 4 deletions modules/s2i/core/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ pushd ${ARTIFACTS_DIR}
cp -pr * /
popd

mkdir -p /usr/local/s2i \
&& chmod 775 /usr/local/s2i \
&& chown -R $USER:root /usr/local/s2i

mkdir -p /deployments \
&& chmod -R "ug+rwX" /deployments \
&& chown -R $USER:root /deployments
6 changes: 4 additions & 2 deletions modules/s2i/core/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ packages:
- rsync

labels:
# XXX this modules does not install files in this path
- name: "io.openshift.s2i.scripts-url"
value: "image:///usr/local/s2i"
value: "image:///usr/libexec/s2i"
- name: io.openshift.s2i.destination
value: "/tmp"
- name: org.jboss.container.deployments-dir
Expand Down Expand Up @@ -114,7 +115,8 @@ envs:

run:
cmd:
- "/usr/local/s2i/run"
# XXX this script is in a different module
- "/usr/libexec/s2i/run"

modules:
install:
Expand Down
2 changes: 1 addition & 1 deletion tests/features/imagebasic.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Feature: Tests for all openshift images
@ubi9/openjdk-21
Scenario: Check that builder labels are correctly set
Given image is built
Then the image should contain label io.openshift.s2i.scripts-url with value image:///usr/local/s2i
Then the image should contain label io.openshift.s2i.scripts-url with value image:///usr/libexec/s2i
3 changes: 2 additions & 1 deletion ubi9-openjdk-11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ labels:
value: *version

envs:
# XXX should this move to an s2i module?
- name: PATH
value: $PATH:"/usr/local/s2i"
value: $PATH:"/usr/libexec/s2i"
- name: "JBOSS_IMAGE_NAME"
value: *name
- name: "JBOSS_IMAGE_VERSION"
Expand Down
3 changes: 2 additions & 1 deletion ubi9-openjdk-17.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ labels:
value: *version

envs:
# XXX should this move to an s2i module?
- name: PATH
value: $PATH:"/usr/local/s2i"
value: $PATH:"/usr/libexec/s2i"
- name: "JBOSS_IMAGE_NAME"
value: *name
- name: "JBOSS_IMAGE_VERSION"
Expand Down
3 changes: 2 additions & 1 deletion ubi9-openjdk-21.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ labels:
value: *version

envs:
# XXX should this move to an s2i module?
- name: PATH
value: $PATH:"/usr/local/s2i"
value: $PATH:"/usr/libexec/s2i"
- name: "JBOSS_IMAGE_NAME"
value: *name
- name: "JBOSS_IMAGE_VERSION"
Expand Down

0 comments on commit 1d42286

Please sign in to comment.