Skip to content
43 changes: 43 additions & 0 deletions rhel8-jdk1.8-overrides.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
schema_version: 1

from: "ubi8:latest"
name: &name "openjdk/openjdk-1.8-rhel8"
version: &version "1.0"
description: "Source To Image (S2I) image for Red Hat OpenShift providing OpenJDK 1.8"

labels:
- name: "com.redhat.component"
value: "openjdk-1.8-rhel8-container"
- name: "usage"
value: "https://access.redhat.com/documentation/en-us/red_hat_jboss_middleware_for_openshift/3/html/red_hat_java_s2i_for_openshift/"

envs:
- name: "JBOSS_IMAGE_NAME"
value: *name
- name: "JBOSS_IMAGE_VERSION"
value: *version

modules:
install:
- name: jboss.container.maven.35.bash
version: "3.5"

osbs:
configuration:
container:
compose:
pulp_repos: true
include_unpublished_pulp_repos: true
repository:
name: containers/openjdk
branch: openjdk-1.8-rhel8

packages:
manager: dnf
content_sets:
x86_64:
- rhel-8-for-x86_64-baseos-rpms
- rhel-8-for-x86_64-appstream-rpms
ppc64le:
- rhel-8-for-ppc64le-baseos-rpms
- rhel-8-for-ppc64le-appstream-rpms
45 changes: 45 additions & 0 deletions rhel8-ubi8-overrides.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
schema_version: 1

from: "ubi8:latest"
name: &name "openjdk/openjdk-11-rhel8"
version: &version "1.0"
description: "Source To Image (S2I) image for Red Hat OpenShift providing OpenJDK 11"

labels:
- name: "com.redhat.component"
value: "openjdk-11-rhel8-container"
- name: "usage"
value: "https://access.redhat.com/documentation/en-us/red_hat_jboss_middleware_for_openshift/3/html/red_hat_java_s2i_for_openshift/"

envs:
- name: "JBOSS_IMAGE_NAME"
value: *name
- name: "JBOSS_IMAGE_VERSION"
value: *version

modules:
install:
- name: jboss.container.openjdk.jdk
version: "11"
- name: jboss.container.maven.35.bash
version: "3.5"

osbs:
configuration:
container:
compose:
pulp_repos: true
include_unpublished_pulp_repos: true
repository:
name: containers/openjdk
branch: openjdk-11-rhel8

packages:
manager: dnf
content_sets:
x86_64:
- rhel-8-for-x86_64-baseos-rpms
- rhel-8-for-x86_64-appstream-rpms
ppc64le:
- rhel-8-for-ppc64le-baseos-rpms
- rhel-8-for-ppc64le-appstream-rpms
2 changes: 1 addition & 1 deletion tests/features/java/gc.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@openjdk
@redhat/openjdk-8-rhel7
@redhat-openjdk-18
@centos/openjdk-8-centos7 @centos/openjdk-11-centos7
Feature: Openshift OpenJDK GC tests

Expand Down
2 changes: 1 addition & 1 deletion tests/features/java/hawkular.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@openjdk
@redhat/openjdk-8-rhel7
@redhat-openjdk-18
@centos/openjdk-8-centos7 @centos/openjdk-11-centos7
Feature: Openshift OpenJDK Hawkular tests

Expand Down
8 changes: 4 additions & 4 deletions tests/features/java/java_s2i.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@openjdk
@redhat/openjdk-8-rhel7
@redhat-openjdk-18
@centos/openjdk-8-centos7 @centos/openjdk-11-centos7
Feature: Openshift OpenJDK S2I tests
# NOTE: these tests should be usable with the other images once we have refactored the JDK scripts.
Expand Down Expand Up @@ -308,6 +308,6 @@ Feature: Openshift OpenJDK S2I tests
And run find /deployments in container and check its output for spring-boot-sample-simple-1.5.0.BUILD-SNAPSHOT.jar

Scenario: Check java perf dir owned by jboss (CLOUD-2070)
Given s2i build https://github.com/jboss-openshift/openshift-examples from spring-boot-sample-simple
Then run sh -c 'pgrep -x java | xargs -I{} jstat -gc {} 1000 1' in container and check its output for S0C
And run sh -c 'stat --printf="%U %G" /tmp/hsperfdata_jboss/' in container and check its output for jboss root
Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
Then run jstat -gc 1 1000 1 in container and check its output for S0C
And run stat --printf="%U %G" /tmp/hsperfdata_jboss/ in container and check its output for jboss root
2 changes: 1 addition & 1 deletion tests/features/java/jolokia.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@openjdk
@redhat/openjdk-8-rhel7
@redhat-openjdk-18
@centos/openjdk-8-centos7 @centos/openjdk-11-centos7
Feature: Openshift OpenJDK Jolokia tests

Expand Down
21 changes: 21 additions & 0 deletions tests/features/java/openjdk.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# TODO: it would be nice to make the below less specific to 8 & 11. What about when 12
# is released, etc.
Feature: Container only has one OpenJDK version installed

@centos/openjdk-8-centos7
@redhat-openjdk-18/openjdk18-openshift
@openjdk/openjdk-1.8-ubi8
Scenario: Check that only OpenJDK 8 is installed
When container is started with args
| arg | value |
| command | rpm -qa |
Then available container log should not contain java-11

@centos/openjdk-11-centos7
@openjdk/openjdk-11-rhel7
@openjdk/openjdk-11-ubi8
Scenario: Check that only OpenJDK 11 is installed
When container is started with args
| arg | value |
| command | rpm -qa |
Then available container log should not contain java-1.8.0
2 changes: 1 addition & 1 deletion tests/features/java/ports.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@openjdk
@redhat/openjdk-8-rhel7
@redhat-openjdk-18
@centos/openjdk-8-centos7 @centos/openjdk-11-centos7
Feature: Openshift OpenJDK port tests

Expand Down
2 changes: 1 addition & 1 deletion tests/features/java/runtime.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@openjdk
@redhat/openjdk-8-rhel7
@redhat-openjdk-18
@centos/openjdk-8-centos7 @centos/openjdk-11-centos7
Feature: Openshift OpenJDK Runtime tests

Expand Down
4 changes: 4 additions & 0 deletions tests/features/openshift.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
@centos/openjdk-8-centos7 @centos/openjdk-11-centos7
Feature: Tests for all openshift images

@openjdk
@redhat-openjdk-18
Scenario: Check that product labels are correctly set
# We don't set 'release' or 'architecture' on CI builds, but it's set on OSBS builds
# Since we base on an image which has it already set, it's kind of meaningless
Expand All @@ -12,6 +14,8 @@ Feature: Tests for all openshift images
Then the image should contain label release
And the image should contain label architecture with value x86_64

@openjdk
@redhat-openjdk-18
Scenario: Check that common labels are correctly set
Given image is built
Then the image should contain label version
Expand Down