Skip to content

Commit

Permalink
Merge pull request apache#51 from kubesmarts/main-sync-20241223-155045
Browse files Browse the repository at this point in the history
[2024-12-23:164345] - 🤖 Automated PR: Sync main with upstream
  • Loading branch information
ricardozanini authored Dec 23, 2024
2 parents 5ecba1f + 153b373 commit cb59ae8
Show file tree
Hide file tree
Showing 55 changed files with 896 additions and 423 deletions.
2 changes: 2 additions & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -2036,3 +2036,5 @@ scripts.iml
index.test.js
# scripts/check-junit-report-results/tests/reports/empty.xml
empty.xml
# packages/runtime-tools-process-gateway-api/src/graphql/types.tsx
types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,5 @@ quarkus.http.test-port=0
quarkus.swagger-ui.always-include=true
quarkus.kogito.data-index.graphql.ui.always-include=true

# Development tasks users
%dev.jbpm.devui.users.jdoe.groups=admin,HR,IT
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ modules:
install:
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.project.versions
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.dataindex.ephemeral
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ modules:
install:
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.project.versions
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.dataindex.postgresql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ modules:
install:
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.project.versions
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.jobs.service.allinone
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ modules:
install:
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.project.versions
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.jobs.service.ephemeral
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ modules:
install:
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.project.versions
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.jobs.service.postgresql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,15 @@

set -e

script_dir_path="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# extensions to be added, comma separated.
extensions="$1"
if [ -z "$extensions" ]; then
return 0
fi

# parameter passed which will trigger or not the jvm/maven configuration.
ignore_jvm_settings=${2:-false}

# shellcheck source=/dev/null
source "${script_dir_path}"/logging.sh

if [ "${SCRIPT_DEBUG}" = "true" ] ; then
set -x
export MAVEN_ARGS_APPEND="${MAVEN_ARGS_APPEND} -X --batch-mode"
log_info "Script debugging is enabled, allowing bash commands and their arguments to be printed as they are executed"
printenv
fi

if [ "${ignore_jvm_settings}" != "true" ]; then
source "${script_dir_path}"/configure-jvm-mvn.sh
fi
source "${KOGITO_HOME}"/launch/quarkus-mvn-plugin.sh

"${MAVEN_HOME}"/bin/mvn -B ${MAVEN_ARGS_APPEND} \
-nsu \
-B \
-s "${MAVEN_SETTINGS_PATH}" \
-DplatformVersion="${QUARKUS_PLATFORM_VERSION}" \
-Dextensions="${extensions}" \
${QUARKUS_ADD_EXTENSION_ARGS} \
"${QUARKUS_PLATFORM_GROUPID}":quarkus-maven-plugin:"${QUARKUS_PLATFORM_VERSION}":add-extension
run_quarkus_mvn_add_extension "$extensions", "$ignore_jvm_settings"
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#


# Useful functions for runnning Quarkus Maven Plugin. Moved from bare scripts to facilitate testing.

set -e

# Default version variables
quarkus_version="${QUARKUS_PLATFORM_VERSION}"
kogito_version="${KOGITO_VERSION}"

# shellcheck source=/dev/null
source "${KOGITO_HOME}"/launch/logging.sh

# Function to append the correct version to the extension if needed
append_version() {
local extension="$1"
local group_id
local artifact_id
local version

# Split extension into groupId, artifactId, and version
IFS=":" read -r group_id artifact_id version <<< "$extension"

# If the version is missing, append the default version based on the groupId
if [ -z "$version" ]; then
if [[ "$group_id" == "io.quarkus" ]]; then
extension="${group_id}:${artifact_id}:${quarkus_version}"
elif [[ "$group_id" == *"kie"* || "$group_id" == *"kogito"* || "$artifact_id" == *"kogito"* || "$artifact_id" == *"sonataflow"* ]]; then
extension="${group_id}:${artifact_id}:${kogito_version}"
fi
fi

echo "$extension"
}

process_extensions() {
local extensions="$1"
local processed_extensions=""
IFS=',' read -r -a extension_array <<< "$extensions"
for ext in "${extension_array[@]}"; do
processed_extensions+=$(append_version "$ext")","
done
# Remove the trailing comma
processed_extensions="${processed_extensions%,}"
echo "$processed_extensions"
}

run_quarkus_mvn_add_extension() {
local extensions="$1"
local ignore_jvm_settings=${2:-false}

local processed_extensions=$(process_extensions "$extensions")

if [ "${SCRIPT_DEBUG}" = "true" ]; then
set -x
export MAVEN_ARGS_APPEND="${MAVEN_ARGS_APPEND} -X --batch-mode"
log_info "Script debugging is enabled, allowing bash commands and their arguments to be printed as they are executed"
printenv
fi

if [ "${ignore_jvm_settings}" != "true" ]; then
source "${KOGITO_HOME}"/launch/configure-jvm-mvn.sh
fi

log_info "Processed extensions to be added ${processed_extensions}"

"${MAVEN_HOME}"/bin/mvn -B ${MAVEN_ARGS_APPEND} \
-nsu \
-B \
-s "${MAVEN_SETTINGS_PATH}" \
-DplatformVersion="${QUARKUS_PLATFORM_VERSION}" \
-Dextensions="${processed_extensions}" \
${QUARKUS_ADD_EXTENSION_ARGS} \
"${QUARKUS_PLATFORM_GROUPID}":quarkus-maven-plugin:"${QUARKUS_PLATFORM_VERSION}":add-extension
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,15 @@

set -e

script_dir_path="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# extensions to be added, comma separated.
extensions="$1"
if [ -z "$extensions" ]; then
return 0
fi

# parameter passed which will trigger or not the jvm/maven configuration.
ignore_jvm_settings=${2:-false}

# shellcheck source=/dev/null
source "${script_dir_path}"/logging.sh

if [ "${SCRIPT_DEBUG}" = "true" ] ; then
set -x
export MAVEN_ARGS_APPEND="${MAVEN_ARGS_APPEND} -X --batch-mode"
log_info "Script debugging is enabled, allowing bash commands and their arguments to be printed as they are executed"
printenv
fi

if [ "${ignore_jvm_settings}" != "true" ]; then
source "${script_dir_path}"/configure-jvm-mvn.sh
fi
source "${KOGITO_HOME}"/launch/quarkus-mvn-plugin.sh

"${MAVEN_HOME}"/bin/mvn -B ${MAVEN_ARGS_APPEND} \
-nsu \
-B \
-s "${MAVEN_SETTINGS_PATH}" \
-DplatformVersion="${QUARKUS_PLATFORM_VERSION}" \
-Dextensions="${extensions}" \
${QUARKUS_ADD_EXTENSION_ARGS} \
"${QUARKUS_PLATFORM_GROUPID}":quarkus-maven-plugin:"${QUARKUS_PLATFORM_VERSION}":add-extension
run_quarkus_mvn_add_extension "$extensions", "$ignore_jvm_settings"
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#


# Useful functions for runnning Quarkus Maven Plugin. Moved from bare scripts to facilitate testing.

set -e

# Default version variables
quarkus_version="${QUARKUS_PLATFORM_VERSION}"
kogito_version="${KOGITO_VERSION}"

# shellcheck source=/dev/null
source "${KOGITO_HOME}"/launch/logging.sh

# Function to append the correct version to the extension if needed
append_version() {
local extension="$1"
local group_id
local artifact_id
local version

# Split extension into groupId, artifactId, and version
IFS=":" read -r group_id artifact_id version <<< "$extension"

# If the version is missing, append the default version based on the groupId
if [ -z "$version" ]; then
if [[ "$group_id" == "io.quarkus" ]]; then
extension="${group_id}:${artifact_id}:${quarkus_version}"
elif [[ "$group_id" == *"kie"* || "$group_id" == *"kogito"* || "$artifact_id" == *"kogito"* || "$artifact_id" == *"sonataflow"* ]]; then
extension="${group_id}:${artifact_id}:${kogito_version}"
fi
fi

echo "$extension"
}

process_extensions() {
local extensions="$1"
local processed_extensions=""
IFS=',' read -r -a extension_array <<< "$extensions"
for ext in "${extension_array[@]}"; do
processed_extensions+=$(append_version "$ext")","
done
# Remove the trailing comma
processed_extensions="${processed_extensions%,}"
echo "$processed_extensions"
}

run_quarkus_mvn_add_extension() {
local extensions="$1"
local ignore_jvm_settings=${2:-false}

local processed_extensions=$(process_extensions "$extensions")

if [ "${SCRIPT_DEBUG}" = "true" ]; then
set -x
export MAVEN_ARGS_APPEND="${MAVEN_ARGS_APPEND} -X --batch-mode"
log_info "Script debugging is enabled, allowing bash commands and their arguments to be printed as they are executed"
printenv
fi

if [ "${ignore_jvm_settings}" != "true" ]; then
source "${KOGITO_HOME}"/launch/configure-jvm-mvn.sh
fi

log_info "Processed extensions to be added ${processed_extensions}"

"${MAVEN_HOME}"/bin/mvn -B ${MAVEN_ARGS_APPEND} \
-nsu \
-B \
-s "${MAVEN_SETTINGS_PATH}" \
-DplatformVersion="${QUARKUS_PLATFORM_VERSION}" \
-Dextensions="${processed_extensions}" \
${QUARKUS_ADD_EXTENSION_ARGS} \
"${QUARKUS_PLATFORM_GROUPID}":quarkus-maven-plugin:"${QUARKUS_PLATFORM_VERSION}":add-extension
}
Loading

0 comments on commit cb59ae8

Please sign in to comment.