diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy index 5179b61a7..d9635ffcb 100644 --- a/.ci/jenkins/Jenkinsfile.deploy +++ b/.ci/jenkins/Jenkinsfile.deploy @@ -35,8 +35,8 @@ pipeline { JAVA_HOME = "${GRAALVM_HOME}" // Linked to node label - CONTAINER_ENGINE='docker' - CONTAINER_ENGINE_TLS_OPTIONS='' + CONTAINER_ENGINE = 'docker' + CONTAINER_ENGINE_TLS_OPTIONS = '' OPENSHIFT_API = credentials('OPENSHIFT_API') OPENSHIFT_REGISTRY = credentials('OPENSHIFT_REGISTRY') diff --git a/.github/workflows/pr-backporting.yml b/.github/workflows/pr-backporting.yml index 36423239e..ae52e051d 100644 --- a/.github/workflows/pr-backporting.yml +++ b/.github/workflows/pr-backporting.yml @@ -3,7 +3,6 @@ name: Pull Request Backporting on: pull_request_target: types: [closed, labeled] - env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -31,8 +30,11 @@ jobs: matrix: target-branch: ${{ fromJSON(needs.compute-targets.outputs.target-branches) }} fail-fast: false + env: + REVIEWERS: ${{ toJSON(github.event.pull_request.requested_reviewers) }} steps: - name: Backporting uses: kiegroup/kie-ci/.ci/actions/backporting@main with: target-branch: ${{ matrix.target-branch }} + additional-reviewers: ${REVIEWERS} \ No newline at end of file diff --git a/modules/kogito-openjdk/11-headless/module.yaml b/modules/kogito-openjdk/11-headless/module.yaml index ebfb5f79e..1ca311fa6 100644 --- a/modules/kogito-openjdk/11-headless/module.yaml +++ b/modules/kogito-openjdk/11-headless/module.yaml @@ -22,4 +22,5 @@ envs: packages: install: - - java-11-openjdk-headless \ No newline at end of file + - tzdata-java # Fix for new openjdk installations. See https://bugzilla.redhat.com/show_bug.cgi?id=2224411 + - java-11-openjdk-headless diff --git a/modules/kogito-openjdk/11/module.yaml b/modules/kogito-openjdk/11/module.yaml index c57600c3e..a6d65ea9a 100644 --- a/modules/kogito-openjdk/11/module.yaml +++ b/modules/kogito-openjdk/11/module.yaml @@ -25,5 +25,6 @@ execute: packages: install: - - java-11-openjdk-devel + - tzdata-java # Fix for new openjdk installations. See https://bugzilla.redhat.com/show_bug.cgi?id=2224411 + - java-11-openjdk-devel diff --git a/modules/rhpam-kogito-prod-profile/module.yaml b/modules/rhpam-kogito-prod-profile/module.yaml index 242250822..e589678aa 100644 --- a/modules/rhpam-kogito-prod-profile/module.yaml +++ b/modules/rhpam-kogito-prod-profile/module.yaml @@ -1,6 +1,6 @@ schema_version: 1 name: org.kie.kogito.rhpam.prod.profile -version: '7.13.3' +version: '7.13.4' description: Holds custom configurations for productized Kogito images. Add as first module to be installed. envs: diff --git a/rhpam-kogito-builder-rhel8-overrides.yaml b/rhpam-kogito-builder-rhel8-overrides.yaml index dab0c14d1..de0d6948e 100644 --- a/rhpam-kogito-builder-rhel8-overrides.yaml +++ b/rhpam-kogito-builder-rhel8-overrides.yaml @@ -1,7 +1,7 @@ schema_version: 1 name: "rhpam-7/rhpam-kogito-builder-rhel8" -version: "7.13.3" +version: "7.13.4" from: "registry.redhat.io/ubi8/ubi-minimal:latest" description: "RHPAM Platform for building Kogito based on Quarkus or SpringBoot" @@ -43,7 +43,7 @@ ports: modules: install: - name: org.kie.kogito.rhpam.prod.profile - version: "7.13.3" + version: "7.13.4" - name: org.kie.kogito.image.dependencies - name: org.kie.kogito.system.user - name: org.kie.kogito.logging diff --git a/rhpam-kogito-imagestream.yaml b/rhpam-kogito-imagestream.yaml index 934d2a77d..7489d70f0 100644 --- a/rhpam-kogito-imagestream.yaml +++ b/rhpam-kogito-imagestream.yaml @@ -15,18 +15,18 @@ items: openshift.io/provider-display-name: Kie Group. spec: tags: - - name: '7.13.3' + - name: '7.13.4' annotations: description: RHPAM Runtime image for Kogito based on Quarkus or SpringBoot JVM image iconClass: icon-jbpm tags: rhpam-kogito,runtime,kogito,quarkus,springboot,jvm supports: quarkus - version: '7.13.3' + version: '7.13.4' referencePolicy: type: Local from: kind: DockerImage - name: registry.redhat.io/rhpam-7/rhpam-kogito-runtime-jvm-rhel8:7.13.3 + name: registry.redhat.io/rhpam-7/rhpam-kogito-runtime-jvm-rhel8:7.13.4 - kind: ImageStream apiVersion: v1 metadata: @@ -36,18 +36,18 @@ items: openshift.io/provider-display-name: Kie Group. spec: tags: - - name: '7.13.3' + - name: '7.13.4' annotations: description: RHPAM Runtime image for Kogito based on Quarkus native image iconClass: icon-jbpm tags: rhpam-kogito,runtime,kogito,quarkus,native supports: quarkus - version: '7.13.3' + version: '7.13.4' referencePolicy: type: Local from: kind: DockerImage - name: registry.redhat.io/rhpam-7/rhpam-kogito-runtime-native-rhel8:7.13.3 + name: registry.redhat.io/rhpam-7/rhpam-kogito-runtime-native-rhel8:7.13.4 - kind: ImageStream apiVersion: v1 metadata: @@ -57,16 +57,16 @@ items: openshift.io/provider-display-name: Kie Group. spec: tags: - - name: '7.13.3' + - name: '7.13.4' annotations: description: RHPAM Platform for building Kogito based on Quarkus or SpringBoot iconClass: icon-jbpm tags: rhpam-kogito,builder,kogito,quarkus,springboot supports: quarkus - version: '7.13.3' + version: '7.13.4' referencePolicy: type: Local from: kind: DockerImage - name: registry.redhat.io/rhpam-7/rhpam-kogito-builder-rhel8:7.13.3 + name: registry.redhat.io/rhpam-7/rhpam-kogito-builder-rhel8:7.13.4 diff --git a/rhpam-kogito-runtime-jvm-rhel8-overrides.yaml b/rhpam-kogito-runtime-jvm-rhel8-overrides.yaml index 37fb114d7..3f37305df 100644 --- a/rhpam-kogito-runtime-jvm-rhel8-overrides.yaml +++ b/rhpam-kogito-runtime-jvm-rhel8-overrides.yaml @@ -1,7 +1,7 @@ schema_version: 1 name: "rhpam-7/rhpam-kogito-runtime-jvm-rhel8" -version: "7.13.3" +version: "7.13.4" from: "registry.redhat.io/ubi8/ubi-minimal:latest" description: "RHPAM Runtime image for Kogito based on Quarkus or SpringBoot JVM image" diff --git a/rhpam-kogito-runtime-native-rhel8-overrides.yaml b/rhpam-kogito-runtime-native-rhel8-overrides.yaml index 6dcc6c17b..77609f001 100644 --- a/rhpam-kogito-runtime-native-rhel8-overrides.yaml +++ b/rhpam-kogito-runtime-native-rhel8-overrides.yaml @@ -1,7 +1,7 @@ schema_version: 1 name: "rhpam-7/rhpam-kogito-runtime-native-rhel8" -version: "7.13.3" +version: "7.13.4" from: "registry.redhat.io/ubi8/ubi-minimal:latest" description: "RHPAM Runtime image for Kogito based on Quarkus native image" diff --git a/scripts/common.py b/scripts/common.py index 9066c6ed3..4406aade1 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -182,9 +182,6 @@ def update_module_version(module_dir, target_version): :param target_version: version to set into the module """ - image_version = retrieve_image_version() - file_updated = False - try: module_file = os.path.join(module_dir, "module.yaml") with open(module_file) as module: diff --git a/tests/features/common-dynamic-resources.feature b/tests/features/common-dynamic-resources.feature index ae7f5814b..faf92d2f3 100644 --- a/tests/features/common-dynamic-resources.feature +++ b/tests/features/common-dynamic-resources.feature @@ -23,6 +23,7 @@ Feature: Common tests for Kogito images Scenario: Verify if the properties were correctly set using DEFAULT MEM RATIO When container is started with args | arg | value | + | command | bash -c "sleep 2s; /home/kogito/kogito-app-launch.sh" | | mem_limit | 1073741824 | | env_json | {"SCRIPT_DEBUG":"true", "JAVA_MAX_MEM_RATIO": 80, "JAVA_INITIAL_MEM_RATIO": 25} | Then container log should match regex -Xms205m @@ -31,6 +32,7 @@ Feature: Common tests for Kogito images Scenario: Verify if the DEFAULT MEM RATIO properties are overridden with different values When container is started with args | arg | value | + | command | bash -c "sleep 2s; /home/kogito/kogito-app-launch.sh" | | mem_limit | 1073741824 | | env_json | {"SCRIPT_DEBUG":"true", "JAVA_MAX_MEM_RATIO": 50, "JAVA_INITIAL_MEM_RATIO": 10} | Then container log should match regex -Xms51m @@ -38,23 +40,24 @@ Feature: Common tests for Kogito images Scenario: Verify if the properties were correctly set when aren't passed When container is started with args - | arg | value | - | mem_limit | 1073741824 | - | env_json | {"SCRIPT_DEBUG":"true"} | + | arg | value | + | command | bash -c "sleep 2s; /home/kogito/kogito-app-launch.sh" | + | mem_limit | 1073741824 | + | env_json | {"SCRIPT_DEBUG":"true"} | Then container log should match regex -Xms128m And container log should match regex -Xmx512m Scenario: Verify if Java Remote Debug is correctly configured - When container is started with env - | variable | value | - | SCRIPT_DEBUG | true | - | JAVA_DEBUG | true | - |JAVA_DEBUG_PORT | 9222 | + When container is started with args + | arg | value | + | command | bash -c "sleep 2s; /home/kogito/kogito-app-launch.sh" | + | env_json | {"SCRIPT_DEBUG":"true", "JAVA_DEBUG":"true", "JAVA_DEBUG_PORT":"9222"} | Then container log should match regex -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9222 Scenario: Verify if the DEFAULT MEM RATIO properties are overridden with different values from user provided Xmx and Xms When container is started with args | arg | value | + | command | bash -c "sleep 2s; /home/kogito/kogito-app-launch.sh" | | mem_limit | 1073741824 | | env_json | {"SCRIPT_DEBUG":"true", "JAVA_MAX_MEM_RATIO": 50, "JAVA_INITIAL_MEM_RATIO": 10, "JAVA_OPTIONS":"-Xms4000m -Xmx8000m"} | Then container log should match regex -Xms4000m diff --git a/tests/features/kogito-builder-native.feature b/tests/features/kogito-builder-native.feature index e1e8e411a..f0abf2bbe 100644 --- a/tests/features/kogito-builder-native.feature +++ b/tests/features/kogito-builder-native.feature @@ -83,32 +83,19 @@ Feature: kogito-builder image native build tests # And s2i build log should contain '/home/kogito/bin/persons.proto' -> '/home/kogito/data/protobufs/persons.proto' # And s2i build log should contain -J-Xmx5153960755 - Scenario: Perform a incremental s2i build for native test + Scenario: Perform an incremental s2i build for native test Given s2i build https://github.com/kiegroup/kogito-examples.git from rules-quarkus-helloworld with env and incremental using 1.13.x | variable | value | | RUNTIME_TYPE | quarkus | | NATIVE | false | - Then s2i build log should not contain WARNING: Clean build will be performed because of error saving previous build artifacts - And file /home/kogito/bin/quarkus-run.jar should exist - And check that page is served - | property | value | - | port | 8080 | - | path | /hello | - | request_method | POST | - | content_type | application/json | - | request_body | {"strings":["hello"]} | - | wait | 80 | - | expected_phrase | ["hello","world"] | - - # Since the same image is used we can do a subsequent incremental build and verify if it is working as expected. - Scenario:Perform a second incremental s2i build for native scenario, this time, with native enabled - Given s2i build https://github.com/kiegroup/kogito-examples.git from rules-quarkus-helloworld with env and incremental using 1.13.x + And s2i build https://github.com/kiegroup/kogito-examples.git from rules-quarkus-helloworld with env and incremental using 1.13.x | variable | value | | RUNTIME_TYPE | quarkus | | NATIVE | true | | LIMIT_MEMORY | 6442450944 | - Then s2i build log should contain Expanding artifacts from incremental build... - And s2i build log should not contain WARNING: Clean build will be performed because of error saving previous build artifacts + Then s2i build log should not contain WARNING: Clean build will be performed because of error saving previous build artifacts + And s2i build log should contain Expanding artifacts from incremental build... + And s2i build log should contain -J-Xmx5153960755 And file /home/kogito/bin/rules-quarkus-helloworld-runner should exist And check that page is served | property | value | @@ -118,8 +105,7 @@ Feature: kogito-builder image native build tests | content_type | application/json | | request_body | {"strings":["hello"]} | | wait | 80 | - | expected_phrase | ["hello","world"] | - And s2i build log should contain -J-Xmx5153960755 + | expected_phrase | ["hello","world"] | Scenario: Verify that the Kogito Maven archetype is generating the project and compiling it correctly using native build Given s2i build /tmp/kogito-examples from dmn-example using 1.13.x and runtime-image quay.io/kiegroup/kogito-runtime-native:latest diff --git a/tests/features/kogito-common-builder-jvm.feature b/tests/features/kogito-common-builder-jvm.feature index faa947424..4d1779585 100644 --- a/tests/features/kogito-common-builder-jvm.feature +++ b/tests/features/kogito-common-builder-jvm.feature @@ -85,31 +85,17 @@ Feature: kogito-builder image JVM build tests | expected_phrase | ["hello","world"] | And file /home/kogito/bin/quarkus-run.jar should exist - Scenario: Perform a incremental s2i build using quarkus runtime type + Scenario: Perform an incremental s2i build using quarkus runtime type Given s2i build https://github.com/kiegroup/kogito-examples.git from rules-quarkus-helloworld with env and incremental using 1.13.x | variable | value | | RUNTIME_TYPE | quarkus | | NATIVE | false | - Then s2i build log should not contain WARNING: Clean build will be performed because of error saving previous build artifacts - And file /home/kogito/bin/quarkus-run.jar should exist - And check that page is served - | property | value | - | port | 8080 | - | path | /hello | - | request_method | POST | - | content_type | application/json | - | request_body | {"strings":["hello"]} | - | wait | 80 | - | expected_phrase | ["hello","world"] | - - # Since the same image is used we can do a subsequent incremental build and verify if it is working as expected. - Scenario: Perform a second incremental s2i build using quarkus runtime type - Given s2i build https://github.com/kiegroup/kogito-examples.git from rules-quarkus-helloworld with env and incremental using 1.13.x + And s2i build https://github.com/kiegroup/kogito-examples.git from rules-quarkus-helloworld with env and incremental using 1.13.x | variable | value | | RUNTIME_TYPE | quarkus | | NATIVE | false | - Then s2i build log should contain Expanding artifacts from incremental build... - And s2i build log should not contain WARNING: Clean build will be performed because of error saving previous build artifacts + Then s2i build log should not contain WARNING: Clean build will be performed because of error saving previous build artifacts + And s2i build log should contain Expanding artifacts from incremental build... And file /home/kogito/bin/quarkus-run.jar should exist And check that page is served | property | value | @@ -121,7 +107,6 @@ Feature: kogito-builder image JVM build tests | wait | 80 | | expected_phrase | ["hello","world"] | - #### SpringBoot Scenarios Scenario: Verify if the s2i build is finished as expected with debug enabled @@ -198,30 +183,27 @@ Feature: kogito-builder image JVM build tests And container log should contain Started KogitoSpringbootApplication And run sh -c 'echo $JAVA_OPTIONS' in container and immediately check its output for -Ddebug=true - Scenario: Perform a incremental s2i build using springboot runtime type - Given s2i build https://github.com/kiegroup/kogito-examples.git from ruleunit-springboot-example with env and incremental using 1.13.x + Scenario: Perform an incremental s2i build using springboot runtime type + Given s2i build https://github.com/kiegroup/kogito-examples.git from process-springboot-example with env and incremental using 1.13.x # Leave those here as placeholder for scripts adding variable to the test. No impact on tests if empty. | variable | value | | RUNTIME_TYPE | springboot | - Then check that page is served - | property | value | - | port | 8080 | - | path | /find-approved | - | wait | 80 | - | request_method | POST | - | request_body | {"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}}]} | - | content_type | application/json | - | expected_status_code | 200 | - And file /home/kogito/bin/ruleunit-springboot-example.jar should exist - - # Since the same image is used we can do a subsequent incremental build and verify if it is working as expected. - Scenario: Perform a second incremental s2i build using springboot runtime type - Given s2i build https://github.com/kiegroup/kogito-examples.git from ruleunit-springboot-example with env and incremental using 1.13.x + And s2i build https://github.com/kiegroup/kogito-examples.git from process-springboot-example with env and incremental using 1.13.x # Leave those here as placeholder for scripts adding variable to the test. No impact on tests if empty. | variable | value | | RUNTIME_TYPE | springboot | Then s2i build log should contain Expanding artifacts from incremental build... And s2i build log should not contain WARNING: Clean build will be performed because of error saving previous build artifacts + And file /home/kogito/bin/process-springboot-example.jar should exist + And check that page is served + | property | value | + | port | 8080 | + | path | /orders | + | wait | 80 | + | request_method | POST | + | request_body | {"approver" : "john", "order" : {"orderNumber" : "12345", "shipped" : false}} | + | content_type | application/json | + | expected_status_code | 201 | Scenario: Verify if the s2i build is finished as expected with uber-jar package type built Given s2i build https://github.com/kiegroup/kogito-examples.git from ruleunit-quarkus-example using 1.13.x and runtime-image quay.io/kiegroup/kogito-runtime-jvm:latest