diff --git a/README.adoc b/README.adoc index 462f5a37..2b8d0cc5 100644 --- a/README.adoc +++ b/README.adoc @@ -11,14 +11,30 @@ cekit build This will produce an image named `centos/openjdk-18-centos7` +### JDK 11 + +``` +cekit --overrides-file=centos7-jdk11-overrides.yaml build +``` + +This will produce an image named `centos/openjdk-11-centos7` + ### RHEL-Based Image +#### JDK 8 ``` cekit --overrides-file=product-overrides.yaml build ``` This will produce an image named `redhat-openjdk-8/openjdk18-openshift` +#### JDK 11 +``` +cekit --overrides-file=product-overrides.yaml --overrides-file=rhel7-jdk11-overrides.yaml build +``` + +This will produce an image named `redhat-openjdk-11/openjdk11-openshift` + ## License See link:LICENSE[LICENSE] file. diff --git a/centos7-jdk11-overrides.yaml b/centos7-jdk11-overrides.yaml new file mode 100644 index 00000000..2c8f6025 --- /dev/null +++ b/centos7-jdk11-overrides.yaml @@ -0,0 +1,6 @@ +name: "centos/openjdk-11-centos7" + +modules: + install: + - name: jboss.container.openjdk.jdk + version: "11" diff --git a/product-overrides.yaml b/product-overrides.yaml index f3c3bbed..798e4321 100644 --- a/product-overrides.yaml +++ b/product-overrides.yaml @@ -1,6 +1,6 @@ schema_version: 1 -from: "rhel7:7.5-released" +from: "rhel7:7-released" name: "redhat-openjdk-18/openjdk18-openshift" version: "1.6" diff --git a/rhel7-jdk11-overrides.yaml b/rhel7-jdk11-overrides.yaml new file mode 100644 index 00000000..0b0d0e83 --- /dev/null +++ b/rhel7-jdk11-overrides.yaml @@ -0,0 +1,24 @@ +schema_version: 1 + +name: &name "redhat-openjdk-11/openjdk11-openshift" +version: &version "1.0" + +labels: +- name: "com.redhat.component" + value: "redhat-openjdk-11-openjdk11-openshift-container" + +envs: +- name: "JBOSS_IMAGE_NAME" + value: *name +- name: "JBOSS_IMAGE_VERSION" + value: *version + +modules: + install: + - name: jboss.container.openjdk.jdk + version: "11" + +osbs: + repository: + name: containers/redhat-openjdk-11 + branch: jb-openjdk-11.0-openshift-rhel-7 diff --git a/tests/features-disabled/java/gc.feature b/tests/features-disabled/java/gc.feature index 20140a86..05baa34b 100644 --- a/tests/features-disabled/java/gc.feature +++ b/tests/features-disabled/java/gc.feature @@ -1,51 +1,51 @@ -@redhat-openjdk-18 +@redhat-openjdk-18 @redhat-openjdk-11 @centos/openjdk-18-centos7 Feature: Openshift OpenJDK GC tests Scenario: Check default GC configuration Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet - Then s2i build log should contain Using MAVEN_OPTS -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m - And container log should contain -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m + Then s2i build log should match regex Using MAVEN_OPTS (-XX:\+UnlockExperimentalVMOptions -XX:\+UseCGroupMemoryLimitForHeap )?-XX:\+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m + And container log should contain -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m Scenario: Check GC_MIN_HEAP_FREE_RATIO GC configuration Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet | variable | value | | GC_MIN_HEAP_FREE_RATIO | 5 | - Then s2i build log should contain Using MAVEN_OPTS -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m - And container log should contain -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m + Then s2i build log should match regex Using MAVEN_OPTS (-XX:\+UnlockExperimentalVMOptions -XX:\+UseCGroupMemoryLimitForHeap )?-XX:\+UseParallelOldGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m + And container log should contain -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m Scenario: Check GC_MAX_HEAP_FREE_RATIO GC configuration Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet | variable | value | | GC_MAX_HEAP_FREE_RATIO | 50 | - Then s2i build log should contain Using MAVEN_OPTS -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m - And container log should contain -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m + Then s2i build log should match regex Using MAVEN_OPTS (-XX:\+UnlockExperimentalVMOptions -XX:\+UseCGroupMemoryLimitForHeap )?-XX:\+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m + And container log should contain -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m Scenario: Check GC_TIME_RATIO GC configuration Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet | variable | value | | GC_TIME_RATIO | 5 | - Then s2i build log should contain Using MAVEN_OPTS -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=5 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m - And container log should contain -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=5 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m + Then s2i build log should match regex Using MAVEN_OPTS (-XX:\+UnlockExperimentalVMOptions -XX:\+UseCGroupMemoryLimitForHeap )?-XX:\+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=5 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m + And container log should contain -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=5 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m Scenario: Check GC_ADAPTIVE_SIZE_POLICY_WEIGHT GC configuration Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet | variable | value | | GC_ADAPTIVE_SIZE_POLICY_WEIGHT | 80 | - Then s2i build log should contain Using MAVEN_OPTS -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=80 -XX:MaxMetaspaceSize=100m - And container log should contain -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=80 -XX:MaxMetaspaceSize=100m + Then s2i build log should match regex Using MAVEN_OPTS (-XX:\+UnlockExperimentalVMOptions -XX:\+UseCGroupMemoryLimitForHeap )?-XX:\+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=80 -XX:MaxMetaspaceSize=100m + And container log should contain -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=80 -XX:MaxMetaspaceSize=100m Scenario: Check GC_MAX_METASPACE_SIZE GC configuration Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet | variable | value | | GC_MAX_METASPACE_SIZE | 120 | - Then s2i build log should contain Using MAVEN_OPTS -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=120m - And container log should contain -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=120m + Then s2i build log should match regex Using MAVEN_OPTS (-XX:\+UnlockExperimentalVMOptions -XX:\+UseCGroupMemoryLimitForHeap )?-XX:\+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=120m + And container log should contain -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=120m Scenario: Check GC_CONTAINER_OPTIONS configuration Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet | variable | value | | GC_CONTAINER_OPTIONS | -XX:+UseG1GC | - Then s2i build log should contain Using MAVEN_OPTS -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseG1GC + Then s2i build log should match regex Using MAVEN_OPTS (-XX:\+UnlockExperimentalVMOptions -XX:\+UseCGroupMemoryLimitForHeap )?-XX:\+UseG1GC And container log should contain -XX:+UseG1GC And container log should not contain -XX:+UseParallelOldGC diff --git a/tests/features-disabled/java/hawkular.feature b/tests/features-disabled/java/hawkular.feature index 0ea07711..880af534 100644 --- a/tests/features-disabled/java/hawkular.feature +++ b/tests/features-disabled/java/hawkular.feature @@ -1,4 +1,4 @@ -@redhat-openjdk-18 +@redhat-openjdk-18 @redhat-openjdk-11 @centos/openjdk-18-centos7 Feature: Openshift OpenJDK Hawkular tests diff --git a/tests/features-disabled/java/java_s2i.feature b/tests/features-disabled/java/java_s2i.feature index 1ac640ab..1b0a690d 100644 --- a/tests/features-disabled/java/java_s2i.feature +++ b/tests/features-disabled/java/java_s2i.feature @@ -1,4 +1,4 @@ -@redhat-openjdk-18 +@redhat-openjdk-18 @redhat-openjdk-11 @centos/openjdk-18-centos7 Feature: Openshift OpenJDK S2I tests # NOTE: these tests should be usable with the other images once we have refactored the JDK scripts. @@ -279,10 +279,10 @@ Feature: Openshift OpenJDK S2I tests Then XML file /tmp/artifacts/configuration/settings.xml should have 1 elements on XPath //ns:proxy[ns:id='genproxy'][ns:active='true'][ns:protocol='http'][ns:host='127.0.0.1'][ns:port='8080'][ns:nonProxyHosts='foo.example.com|bar.example.com'] Scenario: run an S2I build that depends on com.redhat.xpaas.repo.redhatga being defined - Given s2i build https://github.com/jmtd/openshift-examples from spring-boot-sample-simple using openjdk-enforce-profile + Given s2i build https://github.com/jboss-openshift/openshift-examples from spring-boot-sample-simple Scenario: run an S2I that should fail as MAVEN_ARGS does not define com.redhat.xpaas.repo.redhatga - Given failing s2i build https://github.com/jmtd/openshift-examples from spring-boot-sample-simple using openjdk-enforce-profile + Given failing s2i build https://github.com/jboss-openshift/openshift-examples from spring-boot-sample-simple | variable | value | | MAVEN_ARGS | -e package | diff --git a/tests/features-disabled/java/jolokia.feature b/tests/features-disabled/java/jolokia.feature index b8beb06c..f95409d4 100644 --- a/tests/features-disabled/java/jolokia.feature +++ b/tests/features-disabled/java/jolokia.feature @@ -1,4 +1,4 @@ -@redhat-openjdk-18 +@redhat-openjdk-18 @redhat-openjdk-11 Feature: Openshift OpenJDK Jolokia tests Scenario: Check Environment variable is correct diff --git a/tests/features-disabled/java/ports.feature b/tests/features-disabled/java/ports.feature index 373b6606..9a130ab0 100644 --- a/tests/features-disabled/java/ports.feature +++ b/tests/features-disabled/java/ports.feature @@ -1,4 +1,4 @@ -@redhat-openjdk-18 +@redhat-openjdk-18 @redhat-openjdk-11 @centos/openjdk-18-centos7 Feature: Openshift OpenJDK port tests diff --git a/tests/features-disabled/java/runtime.feature b/tests/features-disabled/java/runtime.feature index 1ba75ceb..760ebb4c 100644 --- a/tests/features-disabled/java/runtime.feature +++ b/tests/features-disabled/java/runtime.feature @@ -1,4 +1,4 @@ -@redhat-openjdk-18 +@redhat-openjdk-18 @redhat-openjdk-11 @centos/openjdk-18-centos7 Feature: Openshift OpenJDK Runtime tests diff --git a/tests/features-disabled/openshift.feature b/tests/features-disabled/openshift.feature index c6e229f4..604e95e8 100644 --- a/tests/features-disabled/openshift.feature +++ b/tests/features-disabled/openshift.feature @@ -1,6 +1,6 @@ Feature: Tests for all openshift images - @redhat-openjdk-18 + @redhat-openjdk-18 @redhat-openjdk-11 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 @@ -10,7 +10,7 @@ Feature: Tests for all openshift images Then the image should contain label release And the image should contain label architecture with value x86_64 - @redhat-openjdk-18 + @redhat-openjdk-18 @redhat-openjdk-11 @centos/openjdk-18-centos7 Scenario: Check that common labels are correctly set Given image is built