Skip to content

Commit

Permalink
Fix #1749 - Rename SonataFlow, jBPM, and Drools extensions (#1750)
Browse files Browse the repository at this point in the history
* Fix #1749 - Rename SonataFlow, jBPM, and Drools extensions

Signed-off-by: Ricardo Zanini <[email protected]>

* Review org.kie.kogito to org.kie namespace

Signed-off-by: Ricardo Zanini <[email protected]>

* Rename to org.apache.kie.sonataflow

Signed-off-by: Ricardo Zanini <[email protected]>

* Fix behave tests log regexp to match extensions descriptions

Signed-off-by: Ricardo Zanini <[email protected]>

* Trying to switch back to sh from bash

Signed-off-by: Ricardo Zanini <[email protected]>

* Changing behave tests fork to experiment with an older cekit version

Signed-off-by: Ricardo Zanini <[email protected]>

* Using jmtd cekit-behave ref

Signed-off-by: Ricardo Zanini <[email protected]>

* Fix devmodeui behave tests

Signed-off-by: Ricardo Zanini <[email protected]>

* Remove cekit-behave workaround

Signed-off-by: Ricardo Zanini <[email protected]>

---------

Signed-off-by: Ricardo Zanini <[email protected]>
  • Loading branch information
ricardozanini committed Apr 2, 2024
1 parent ce62b9d commit b4cf1cb
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 21 deletions.
4 changes: 2 additions & 2 deletions modules/kogito-s2i-core/added/s2i-core
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function build_kogito_app() {
-DprojectGroupId=$PROJECT_GROUP_ID \
-DprojectArtifactId=$PROJECT_ARTIFACT_ID \
-DprojectVersion=$PROJECT_VERSION \
-Dextensions="org.kie.kogito:kogito-quarkus:${KOGITO_VERSION},quarkus-smallrye-health,quarkus-smallrye-openapi,quarkus-resteasy,quarkus-resteasy-jackson"
-Dextensions="org.jbpm:jbpm-with-drools-quarkus:${KOGITO_VERSION},quarkus-smallrye-health,quarkus-smallrye-openapi,quarkus-resteasy,quarkus-resteasy-jackson"

if [ ! -z ${QUARKUS_EXTRA_EXTENSIONS} ]; then
log_info "----> Adding extra Quarkus extensions: ${QUARKUS_EXTRA_EXTENSIONS}"
Expand Down Expand Up @@ -236,7 +236,7 @@ function build_kogito_app() {

$MAVEN_HOME/bin/mvn ${MAVEN_ARGS_APPEND} -s "${MAVEN_SETTINGS_PATH}" $(get_quarkus_platform_properties) \
"${quarkus_plugin}":"${quarkus_platform_version}":add-extension \
-Dextensions="org.kie.kogito:kogito-quarkus-serverless-workflow:${KOGITO_VERSION}"
-Dextensions="org.apache.kie.sonataflow:sonataflow-quarkus:${KOGITO_VERSION}"
fi

$MAVEN_HOME/bin/mvn clean package ${MAVEN_ARGS_APPEND} ${KOGITO_OPTS} ${nativeBuild} -s "${MAVEN_SETTINGS_PATH}" \
Expand Down
2 changes: 1 addition & 1 deletion modules/kogito-s2i-core/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ envs:

- name: QUARKUS_EXTRA_EXTENSIONS
description: ^ Defines the Quarkus' extra extensions (as comma-separated list) to be added when performing build from assets.
example: "org.kie.kogito:kogito-addons-quarkus-knative-eventing,quarkus-kubernetes"
example: "org.kie:kie-addons-quarkus-knative-eventing,quarkus-kubernetes"

modules:
install:
Expand Down
3 changes: 1 addition & 2 deletions modules/kogito-swf/builder/build-config/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,5 @@ envs:
- name: "SCRIPT_DEBUG"
value: "false"
- name: QUARKUS_EXTENSIONS
# NOTE: If you change the QUARKUS_EXTENSIONS value remember to update the scripts/logic/build-quarkus-app.sh too!
# Follow up issue to remove KOGITO_VERSION: https://issues.redhat.com/browse/KOGITO-9270
value: quarkus-kubernetes,smallrye-health,org.kie.kogito:kogito-quarkus-serverless-workflow:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-knative-eventing:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-microprofile-config-service-catalog:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-kubernetes:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-events-process:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-process-management:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-source-files:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-knative-serving:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:${KOGITO_VERSION}
value: quarkus-kubernetes,smallrye-health,org.apache.kie.sonataflow:sonataflow-quarkus:${KOGITO_VERSION},org.kie:kie-addons-quarkus-knative-eventing:${KOGITO_VERSION},org.kie:kogito-addons-quarkus-microprofile-config-service-catalog:${KOGITO_VERSION},org.kie:kie-addons-quarkus-kubernetes:${KOGITO_VERSION},org.kie:kie-addons-quarkus-events-process:${KOGITO_VERSION},org.kie:kie-addons-quarkus-process-management:${KOGITO_VERSION},org.kie:kie-addons-quarkus-source-files:${KOGITO_VERSION},org.kie:kogito-addons-quarkus-knative-serving:${KOGITO_VERSION},org.kie:kogito-addons-quarkus-jobs-knative-eventing:${KOGITO_VERSION}
2 changes: 1 addition & 1 deletion modules/kogito-swf/common/scripts/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ description: "Kogito Serverless Workflow image common scripts"

envs:
- name: QUARKUS_EXTENSIONS
example: 'quarkus-kubernetes,org.kie.kogito:kogito-quarkus-serverless-workflow:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-knative-eventing:${KOGITO_VERSION}'
example: 'quarkus-kubernetes,org.apache.kie.sonataflow:sonataflow-quarkus:${KOGITO_VERSION},org.kie:kie-addons-quarkus-knative-eventing:${KOGITO_VERSION}'
description: To add extension to your application

- name: PROJECT_GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion modules/kogito-swf/devmode/build-config/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ envs:
- name: QUARKUS_EXTENSIONS
# NOTE: If you change the QUARKUS_EXTENSIONS value remember to update the scripts/logic/build-quarkus-app.sh too!
# Follow up issue to remove KOGITO_VERSION: https://issues.redhat.com/browse/KOGITO-9270
value: org.kie.kogito:kogito-quarkus-serverless-workflow:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-knative-eventing:${KOGITO_VERSION},smallrye-health,org.kie.kogito:kogito-quarkus-serverless-workflow-devui:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-source-files:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-process-management:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-jobs-service-embedded:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-data-index-inmemory:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-microprofile-config-service-catalog:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-kubernetes:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-knative-serving:${KOGITO_VERSION}
value: org.apache.kie.sonataflow:sonataflow-quarkus:${KOGITO_VERSION},org.kie:kie-addons-quarkus-knative-eventing:${KOGITO_VERSION},smallrye-health,org.apache.kie.sonataflow:sonataflow-quarkus-devui:${KOGITO_VERSION},org.kie:kie-addons-quarkus-source-files:${KOGITO_VERSION},org.kie:kie-addons-quarkus-process-management:${KOGITO_VERSION},org.kie:kogito-addons-quarkus-jobs-service-embedded:${KOGITO_VERSION},org.kie:kogito-addons-quarkus-data-index-inmemory:${KOGITO_VERSION},org.kie:kogito-addons-quarkus-microprofile-config-service-catalog:${KOGITO_VERSION},org.kie:kie-addons-quarkus-kubernetes:${KOGITO_VERSION},org.kie:kogito-addons-quarkus-knative-serving:${KOGITO_VERSION}
4 changes: 2 additions & 2 deletions tests/features/common.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
Feature: Common tests for Kogito images

Scenario: Verify if Kogito user is correctly configured
When container is started with command bash
Then run bash -c 'echo $USER' in container and check its output for kogito
When container is started with command sh
Then run sh -c 'echo $USER' in container and check its output for kogito
And run sh -c 'echo $HOME' in container and check its output for /home/kogito
And run sh -c 'id' in container and check its output for uid=1001(kogito) gid=0(root) groups=0(root),1001(kogito)

2 changes: 1 addition & 1 deletion tests/features/kogito-s2i-builder.feature
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Feature: kogito-s2i-builder image tests
| PROJECT_ARTIFACT_ID | myproject |
| PROJECT_VERSION | 2.0-SNAPSHOT |
| K_SINK | http://localhost:8181 |
| QUARKUS_EXTRA_EXTENSIONS | org.kie.kogito:kogito-addons-quarkus-knative-eventing |
| QUARKUS_EXTRA_EXTENSIONS | org.kie:kie-addons-quarkus-knative-eventing |
Then file /home/kogito/bin/quarkus-run.jar should exist
And s2i build log should contain Generating quarkus project structure for myproject...
And s2i build log should contain Adding Kogito Quarkus Workflows extension to the generated project.
Expand Down
4 changes: 2 additions & 2 deletions tests/features/kogito-swf-builder.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Feature: Serverless Workflow builder images
And container log should contain --no-transfer-progress
And container log should contain -Duser.home=/home/kogito
And container log should match regex Installed features:.*kogito-serverless-workflow
And container log should match regex Installed features:.*kogito-addon-knative-eventing-extension
And container log should match regex Installed features:.*kie-addon-knative-eventing-extension
And container log should match regex Installed features:.*smallrye-health

Scenario: Verify that the application is built and started correctly when QUARKUS_EXTENSIONS env is used
Expand All @@ -33,6 +33,6 @@ Feature: Serverless Workflow builder images
And container log should contain -Duser.home=/home/kogito
And container log should contain Extension io.quarkus:quarkus-elytron-security-jdbc has been installed
And container log should match regex Installed features:.*kogito-serverless-workflow
And container log should match regex Installed features:.*kogito-addon-knative-eventing-extension
And container log should match regex Installed features:.*kie-addon-knative-eventing-extension
And container log should match regex Installed features:.*smallrye-health
And container log should match regex Installed features:.*security-jdbc
2 changes: 1 addition & 1 deletion tests/features/kogito-swf-common.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: Serverless Workflow images common
Scenario: Verify if the swf and quarkus files are under /home/kogito/.m2/repository
When container is started with command bash
Then file /home/kogito/.m2/repository/io/quarkus/platform/quarkus-bom/3.2.10.Final/quarkus-bom-3.2.10.Final.pom should exist
And file /home/kogito/.m2/repository/org/kie/kogito/kogito-quarkus-serverless-workflow/ should exist and be a directory
And file /home/kogito/.m2/repository/org/apache/kie/sonataflow/sonataflow-quarkus/ should exist and be a directory

# This check should be enabled again once a similar check is done on runtimes
# to make sure we only have one version of quarkus bom ...
Expand Down
16 changes: 8 additions & 8 deletions tests/features/kogito-swf-devmode.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Feature: Serverless Workflow devmode images
And container log should contain -Duser.home=/home/kogito -o
And container log should contain -Dquarkus.test.continuous-testing=disabled
And container log should match regex Installed features:.*kogito-serverless-workflow
And container log should match regex Installed features:.*kogito-addon-knative-eventing-extension
And container log should match regex Installed features:.*kie-addon-knative-eventing-extension
And container log should match regex Installed features:.*smallrye-health
And container log should match regex Installed features:.*kogito-serverless-workflow-devui
And container log should match regex Installed features:.*kogito-addon-source-files-extension
And container log should match regex Installed features:.*sonataflow-quarkus-devui
And container log should match regex Installed features:.*kie-addon-source-files-extension
And container log should match regex Installed features:.*kogito-addons-quarkus-jobs-service-embedded
And container log should match regex Installed features:.*kogito-addons-quarkus-data-index-inmemory

Expand Down Expand Up @@ -55,10 +55,10 @@ Feature: Serverless Workflow devmode images
And container log should not contain /bin/mvn -B -X --batch-mode -o
And container log should contain Extension io.quarkus:quarkus-elytron-security-jdbc has been installed
And container log should match regex Installed features:.*kogito-serverless-workflow
And container log should match regex Installed features:.*kogito-addon-knative-eventing-extension
And container log should match regex Installed features:.*kie-addon-knative-eventing-extension
And container log should match regex Installed features:.*smallrye-health
And container log should match regex Installed features:.*kogito-serverless-workflow-devui
And container log should match regex Installed features:.*kogito-addon-source-files-extension
And container log should match regex Installed features:.*sonataflow-quarkus-devui
And container log should match regex Installed features:.*kie-addon-source-files-extension
And container log should match regex Installed features:.*kogito-addons-quarkus-jobs-service-embedded
And container log should match regex Installed features:.*kogito-addons-quarkus-data-index-inmemory
And container log should match regex Installed features:.*security-jdbc
Expand Down Expand Up @@ -114,14 +114,14 @@ Feature: Serverless Workflow devmode images
Then check that page is served
| property | value |
| port | 8080 |
| path | /q/dev-v1/org.kie.kogito.kogito-quarkus-serverless-workflow/dataindex |
| path | /q/dev-v1/org.kie.kogito-addons-quarkus-data-index-inmemory/dataindex |
| request_method | GET |
| wait | 480 |
| expected_status_code | 200 |
And check that page is served
| property | value |
| port | 8080 |
| path | /q/dev-v1/org.kie.kogito.kogito-quarkus-serverless-workflow-devui/workflowInstances |
| path | /q/dev-ui/org.apache.kie.sonataflow.sonataflow-quarkus-devui/workflows |
| request_method | GET |
| wait | 480 |
| expected_status_code | 200 |
Expand Down

0 comments on commit b4cf1cb

Please sign in to comment.