Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions modules/jdk/17/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@
# Configure module
set -e

SCRIPT_DIR=$(dirname $0)
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/openjdk/jdk/*

pushd ${ARTIFACTS_DIR}
cp -pr * /
popd

# Set this JDK as the alternative in use
_arch="$(uname -i)"
alternatives --set java java-17-openjdk.${_arch}
Expand Down
4 changes: 4 additions & 0 deletions modules/jdk/17/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ modules:

execute:
- script: configure.sh

artifacts:
- path: artifacts/jvm-options
dest: /opt/jboss/container/openjdk/jdk
11 changes: 0 additions & 11 deletions modules/jdk/21/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@
# Configure module
set -e

SCRIPT_DIR=$(dirname $0)
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/openjdk/jdk/*

pushd ${ARTIFACTS_DIR}
cp -pr * /
popd

# Set this JDK as the alternative in use
_arch="$(uname -i)"
alternatives --set java java-21-openjdk.${_arch}
Expand Down
4 changes: 4 additions & 0 deletions modules/jdk/21/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ modules:

execute:
- script: configure.sh

artifacts:
- path: artifacts/jvm-options
dest: /opt/jboss/container/openjdk/jdk
14 changes: 0 additions & 14 deletions modules/jre/17/configure.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
#!/bin/sh
# Configure module
set -e

SCRIPT_DIR=$(dirname $0)
echo $SCRIPT_DIR
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
echo $ARTIFACTS_DIR

chown -R $USER:root $SCRIPT_DIR
chmod -R ug+rwX $SCRIPT_DIR
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/openjdk/jre/*

pushd ${ARTIFACTS_DIR}
cp -pr * /
popd

# Set this JDK as the alternative in use
_arch="$(uname -i)"
alternatives --set java java-17-openjdk.${_arch}
4 changes: 4 additions & 0 deletions modules/jre/17/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ modules:

execute:
- script: configure.sh

artifacts:
- path: artifacts/jvm-options
dest: /opt/jboss/container/openjdk/jre
14 changes: 0 additions & 14 deletions modules/jre/21/configure.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
#!/bin/sh
# Configure module
set -e

SCRIPT_DIR=$(dirname $0)
echo $SCRIPT_DIR
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
echo $ARTIFACTS_DIR

chown -R $USER:root $SCRIPT_DIR
chmod -R ug+rwX $SCRIPT_DIR
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/openjdk/jre/*

pushd ${ARTIFACTS_DIR}
cp -pr * /
popd

# Set this JDK as the alternative in use
_arch="$(uname -i)"
alternatives --set java java-21-openjdk.${_arch}
4 changes: 4 additions & 0 deletions modules/jre/21/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ modules:

execute:
- script: configure.sh

artifacts:
- path: artifacts/jvm-options
dest: /opt/jboss/container/openjdk/jre
File renamed without changes.
File renamed without changes.
14 changes: 0 additions & 14 deletions modules/jvm/configure.sh

This file was deleted.

5 changes: 3 additions & 2 deletions modules/jvm/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ description: ^
Provides support for configuring Java JVM, e.g. GC settings, etc. Basic usage
is opts=$($JBOSS_CONTAINER_JAVA_JVM_MODULE/java-default-options)

execute:
- script: configure.sh
artifacts:
- path: artifacts/jvm
dest: /opt/jboss/container/java/jvm

modules:
install:
Expand Down
13 changes: 0 additions & 13 deletions modules/maven/default/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@
# Configure module
set -e

SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

# configure artifact permissions
chown -R $USER:root $ARTIFACTS_DIR
chmod -R ug+rwX $ARTIFACTS_DIR
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/maven/default/maven.sh

# install artifacts
pushd ${ARTIFACTS_DIR}
cp -pr * /
popd

MAVEN_VERSION_SQUASHED=${MAVEN_VERSION/./}

# pull in specific maven version to serve as default
Expand Down
4 changes: 4 additions & 0 deletions modules/maven/default/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ description: ^
execute:
- script: configure.sh

artifacts:
- path: artifacts/default
dest: /opt/jboss/container/maven/default

modules:
install:
- name: jboss.container.user
Expand Down
7 changes: 0 additions & 7 deletions modules/maven/module/configure.sh

This file was deleted.

5 changes: 3 additions & 2 deletions modules/maven/module/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ version: '3.8'
description: ^
Enables the AppStream RPM Module for Maven 3.8 packages.

execute:
- script: configure.sh
artifacts:
- path: artifacts/maven.module
dest: /etc/dnf/modules.d
File renamed without changes.
9 changes: 0 additions & 9 deletions modules/maven/s2i/artifacts/usr/local/s2i/assemble

This file was deleted.

15 changes: 0 additions & 15 deletions modules/maven/s2i/configure.sh

This file was deleted.

9 changes: 6 additions & 3 deletions modules/maven/s2i/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ envs:
- name: JBOSS_CONTAINER_MAVEN_S2I_MODULE
value: /opt/jboss/container/maven/s2i

execute:
- script: configure.sh

modules:
install:
- name: jboss.container.user
Expand All @@ -36,3 +33,9 @@ modules:
packages:
install:
- tar

artifacts:
- path: artifacts/s2i
dest: /opt/jboss/container/maven/s2i
- path: artifacts/save-artifacts
dest: /usr/libexec/s2i
14 changes: 0 additions & 14 deletions modules/proxy/configure.sh

This file was deleted.

5 changes: 3 additions & 2 deletions modules/proxy/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ modules:
install:
- name: jboss.container.user

execute:
- script: configure.sh
artifacts:
- path: artifacts/proxy
dest: /opt/jboss/container/java/proxy
File renamed without changes.
12 changes: 0 additions & 12 deletions modules/run/configure.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
#!/bin/sh
# Configure module
set -e

SCRIPT_DIR=$(dirname $0)
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/run/*

pushd ${ARTIFACTS_DIR}
cp -pr * /
popd

mkdir -p /deployments/data \
&& chmod -R "ug+rwX" /deployments/data \
&& chown -R $USER:root /deployments/data
Expand Down
4 changes: 4 additions & 0 deletions modules/run/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ modules:
- name: jboss.container.user
- name: jboss.container.java.jvm
- name: jboss.container.util.logging

artifacts:
- path: artifacts/run-java.sh
dest: /opt/jboss/container/java/run
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 0 additions & 15 deletions modules/s2i/bash/configure.sh

This file was deleted.

9 changes: 6 additions & 3 deletions modules/s2i/bash/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ envs:
- name: JBOSS_CONTAINER_JAVA_S2I_MODULE
value: /opt/jboss/container/java/s2i

execute:
- script: configure.sh

modules:
install:
- name: jboss.container.user
Expand All @@ -20,3 +17,9 @@ modules:
packages:
install:
- rsync

artifacts:
- path: artifacts/local
dest: /usr/local/s2i
- path: artifacts/opt
dest: /opt/jboss/container/java/s2i
16 changes: 0 additions & 16 deletions modules/s2i/core/configure.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
#!/bin/sh
# Configure module
set -e

SCRIPT_DIR=$(dirname $0)
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/s2i/core/*

pushd ${ARTIFACTS_DIR}
cp -pr * /
popd

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

# OPENJDK-2805
ln -s /usr/local/s2i /usr/libexec/s2i

Expand Down
4 changes: 4 additions & 0 deletions modules/s2i/core/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,7 @@ run:
modules:
install:
- name: jboss.container.user

artifacts:
- path: artifacts/s2i-core
dest: /opt/jboss/container/s2i/core
14 changes: 0 additions & 14 deletions modules/util/logging/configure.sh

This file was deleted.

5 changes: 3 additions & 2 deletions modules/util/logging/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ modules:
install:
- name: jboss.container.user

execute:
- script: configure.sh
artifacts:
- path: artifacts/logging.sh
dest: /opt/jboss/container/util/logging
7 changes: 7 additions & 0 deletions tests/features/imagebasic.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ Feature: Tests for all openshift images
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

@ubi9
Scenario: Check installed scripts are executable by all users (OPENJDK-3655)
When container is started with args
| arg | value |
| command | find /opt/jboss/container -type f -perm -g+x ( ! -perm -o+x ) -ls |
Then available container log should not contain /opt/jboss/container
Loading