diff --git a/.gitignore b/.gitignore index 750f639a452..96461ab82b0 100644 --- a/.gitignore +++ b/.gitignore @@ -345,7 +345,4 @@ turbo.json # IntelliJ projects should be on _intellij-projects folder, never on specific packages. packages/*/.idea -examples/*/.idea - -# Jar files -**/*.jar \ No newline at end of file +examples/*/.idea \ No newline at end of file diff --git a/packages/kogito-db-migrator-tool-image/README.md b/packages/kogito-db-migrator-tool-image/README.md index db325462e39..dca5cd3bca1 100644 --- a/packages/kogito-db-migrator-tool-image/README.md +++ b/packages/kogito-db-migrator-tool-image/README.md @@ -1,37 +1,61 @@ -# kogito-db-migrator-tool-image + -This is a cekit based image builder for the database migrator application. Details about the database migrator application are [here](../kogito-db-migrator-tool/README.md) +# Kogito Postgres DB Migrator Tool Image -## Build and Run container image locally +This package contains the `Containerfile/Dockerfile` and scripts to build a container image for Kogito Postgres DB Migrator Tool. Details about the Kogito Postgres DB Migrator Tool can be found [here](../kogito-db-migrator-tool/README.md) -You can build the cekit build of container image by using the provided image builder shell script +## Additional requirements -```shell -./build-container-image.sh -``` +- docker + +## Build + +_NOTE_: Before performing this step, be sure that the Kogito Postgres DB Migrator Tool jar has been built and available for inclusion in the image. + +- Enable the image to be built: + + ```bash + export KIE_TOOLS_BUILD__buildContainerImages=true + ``` + +Run the following in the root folder of the repository to build the package: -_NOTE_: Before performing this step, be sure that the database migrator application jar has been built and available for inclusion in the image. - -Ensure the script completes without errors. - -Assuming you have a Postgres database running locally, e.g., a `di` database for data index and a `js` database for jobs service, you can run the image with the following command. Substitute appropriate values: - -```shell -podman run \ ---env MIGRATE_DB_DATAINDEX=true \ ---env QUARKUS_DATASOURCE_DATAINDEX_JDBC_URL= \ ---env QUARKUS_DATASOURCE_DATAINDEX_USERNAME= \ ---env QUARKUS_DATASOURCE_DATAINDEX_PASSWORD= \ ---env QUARKUS_FLYWAY_DATAINDEX_SCHEMAS=dataindex \ ---env MIGRATE_DB_JOBSSERVICE=true \ ---env QUARKUS_DATASOURCE_JOBSSERVICE_JDBC_URL= \ ---env QUARKUS_DATASOURCE_JOBSSERVICE_USERNAME= \ ---env QUARKUS_DATASOURCE_JOBSSERVICE_PASSWORD= \ ---env QUARKUS_FLYWAY_JOBSSERVICE_SCHEMAS=jobsservice \ -docker.io/apache/incubator-kie-kogito-service-db-migration-postgresql:999-SNAPSHOT +```bash +pnpm -F @kie-tools/kogito-db-migrator-tool-image... build:prod ``` -### Environment variables +- Then check if the image is correctly stored: + + ```bash + docker images + ``` + +## Run + +- Start up a clean container with: + + ```bash + docker run docker.io/apache/incubator-kie-kogito-service-db-migration-postgresql:latest + ``` + +## Customization + +1. Run a container with custom environment variables: | NAME | DESCRIPTION | DEFAULT | | --------------------------------------- | -------------------------------------------------------------------------------- | ----------------------------------------- | @@ -45,3 +69,48 @@ docker.io/apache/incubator-kie-kogito-service-db-migration-postgresql:999-SNAPSH | QUARKUS_DATASOURCE_JOBSSERVICE_USERNAME | Jobs service database username | postgres | | QUARKUS_DATASOURCE_JOBSSERVICE_PASSWORD | Jobs service database password | postgres | | QUARKUS_FLYWAY_JOBSSERVICE_SCHEMAS | Jobs service database schema | jobsservice | + +### Example + +An example to use diverse environment variables + +```bash + docker run \ + --env MIGRATE_DB_DATAINDEX=true \ + --env QUARKUS_DATASOURCE_DATAINDEX_JDBC_URL= \ + --env QUARKUS_DATASOURCE_DATAINDEX_USERNAME= \ + --env QUARKUS_DATASOURCE_DATAINDEX_PASSWORD= \ + --env QUARKUS_FLYWAY_DATAINDEX_SCHEMAS=dataindex \ + --env MIGRATE_DB_JOBSSERVICE=true \ + --env QUARKUS_DATASOURCE_JOBSSERVICE_JDBC_URL= \ + --env QUARKUS_DATASOURCE_JOBSSERVICE_USERNAME= \ + --env QUARKUS_DATASOURCE_JOBSSERVICE_PASSWORD= \ + --env QUARKUS_FLYWAY_JOBSSERVICE_SCHEMAS=jobsservice \ + docker.io/apache/incubator-kie-kogito-service-db-migration-postgresql:999-SNAPSHOT +``` + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/kogito-db-migrator-tool-image/build-container-image.sh b/packages/kogito-db-migrator-tool-image/build-container-image.sh deleted file mode 100755 index d4bac957570..00000000000 --- a/packages/kogito-db-migrator-tool-image/build-container-image.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# 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. -# - -set -x -set -e - -CEKIT_BUILDER=docker -SOURCE_FILE=/tmp/kogito-db-migrator-tool/sonataflow-db-migrator-0.0.0-runner.jar -TARGET_FILE=./cekit/modules/kogito-postgres-db-migration-deps/sonataflow-db-migrator-runner.jar - -if [ -f "$SOURCE_FILE" ]; then - echo "The file: $SOURCE_FILE found and will be used to build image." - rm -f $TARGET_FILE - cp $SOURCE_FILE $TARGET_FILE - - # Build the container image - cd ./cekit || exit - cekit -v build "$CEKIT_BUILDER" - rm -f $TARGET_FILE -else - echo "The file: $SOURCE_FILE not found. Please build kogito-db-migrator-tool package first before building the image." - exit 1 -fi \ No newline at end of file diff --git a/packages/kogito-db-migrator-tool-image/cekit/image.yaml b/packages/kogito-db-migrator-tool-image/cekit/image.yaml deleted file mode 100644 index a2517ee0154..00000000000 --- a/packages/kogito-db-migrator-tool-image/cekit/image.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# -# 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. -# -name: "docker.io/apache/incubator-kie-kogito-service-db-migration-postgresql" -version: "999-SNAPSHOT" -from: registry.access.redhat.com/ubi8/openjdk-17-runtime:1.19 -description: Flyway image for DI/JS database migration - -labels: - - name: "org.kie.kogito.version" - value: "999-SNAPSHOT" - - name: "maintainer" - value: "Apache KIE " - - name: "io.k8s.description" - value: "Kogito DB Migration creates schemas and tables for Data Index and Jobs Service for PostgreSQL database" - - name: "io.k8s.display-name" - value: "Kogito DB Migration for Data Index and Jobs Service - PostgreSQL" - - name: "io.openshift.tags" - value: "kogito,db-migration" - -modules: - repositories: - - path: modules - install: - - name: kogito-postgres-db-migration-deps - -run: - workdir: "/home/kogito" - entrypoint: - - "/home/kogito/migration.sh" diff --git a/packages/kogito-db-migrator-tool-image/cekit/modules/kogito-postgres-db-migration-deps/install b/packages/kogito-db-migrator-tool-image/cekit/modules/kogito-postgres-db-migration-deps/install deleted file mode 100644 index 5fa1a3e0e86..00000000000 --- a/packages/kogito-db-migrator-tool-image/cekit/modules/kogito-postgres-db-migration-deps/install +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# 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. -# - -set -x -set -e - -useradd -m kogito - -cd /home/kogito || exit - -chgrp -R 0 /home/kogito -chown -R 0 /home/kogito -chmod -R g=u /home/kogito - -chmod +x /home/kogito/migration.sh \ No newline at end of file diff --git a/packages/kogito-db-migrator-tool-image/cekit/modules/kogito-postgres-db-migration-deps/migration.sh b/packages/kogito-db-migrator-tool-image/cekit/modules/kogito-postgres-db-migration-deps/migration.sh deleted file mode 100644 index fe41d336d5b..00000000000 --- a/packages/kogito-db-migrator-tool-image/cekit/modules/kogito-postgres-db-migration-deps/migration.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/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. -# - -set -x -set -e - -OPERATOR_VERSION=999.0.0 - -for arg in "$@"; do - case "$arg" in - OPERATOR_VERSION=*) OPERATOR_VERSION="${arg#*=}" ;; - esac -done - -cd /home/kogito/ - -mv sonataflow-db-migrator-runner.jar sonataflow-db-migrator-"$OPERATOR_VERSION"-runner.jar - -java -jar sonataflow-db-migrator-"$OPERATOR_VERSION"-runner.jar \ No newline at end of file diff --git a/packages/kogito-db-migrator-tool-image/cekit/modules/kogito-postgres-db-migration-deps/module.yaml b/packages/kogito-db-migrator-tool-image/cekit/modules/kogito-postgres-db-migration-deps/module.yaml deleted file mode 100644 index 0605dacc689..00000000000 --- a/packages/kogito-db-migrator-tool-image/cekit/modules/kogito-postgres-db-migration-deps/module.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# -# 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. -# -schema_version: 1 -name: kogito-postgres-db-migration-deps -version: "1.0" -artifacts: - - name: migration.sh - path: migration.sh - dest: /home/kogito - - name: sonataflow-db-migrator-runner.jar - path: sonataflow-db-migrator-runner.jar - dest: /home/kogito -execute: - - script: install diff --git a/packages/kogito-db-migrator-tool-image/env/index.js b/packages/kogito-db-migrator-tool-image/env/index.js index c3fe8a9b1e0..00dc1399d44 100644 --- a/packages/kogito-db-migrator-tool-image/env/index.js +++ b/packages/kogito-db-migrator-tool-image/env/index.js @@ -17,4 +17,38 @@ * under the License. */ -console.log("index.js"); +const { varsWithName, composeEnv, getOrDefault } = require("@kie-tools-scripts/build-env"); + +const rootEnv = require("@kie-tools/root-env/env"); +const sonataflowImageCommonEnv = require("@kie-tools/sonataflow-image-common/env"); + +module.exports = composeEnv([rootEnv, sonataflowImageCommonEnv], { + vars: varsWithName({ + KOGITO_DB_MIGRATOR_TOOL_IMAGE__registry: { + default: "docker.io", + description: "The image registry.", + }, + KOGITO_DB_MIGRATOR_TOOL_IMAGE__account: { + default: "apache", + description: "The image registry account.", + }, + KOGITO_DB_MIGRATOR_TOOL_IMAGE__name: { + default: "incubator-kie-kogito-db-migrator-tool", + description: "The image name.", + }, + KOGITO_DB_MIGRATOR_TOOL_IMAGE__buildTag: { + default: rootEnv.env.root.streamName, + description: "The image tag.", + }, + }), + get env() { + return { + kogitoDbMigratorToolImage: { + registry: getOrDefault(this.vars.KOGITO_DB_MIGRATOR_TOOL_IMAGE__registry), + account: getOrDefault(this.vars.KOGITO_DB_MIGRATOR_TOOL_IMAGE__account), + name: getOrDefault(this.vars.KOGITO_DB_MIGRATOR_TOOL_IMAGE__name), + buildTag: getOrDefault(this.vars.KOGITO_DB_MIGRATOR_TOOL_IMAGE__buildTag), + }, + }; + }, +}); diff --git a/packages/kogito-db-migrator-tool-image/install.js b/packages/kogito-db-migrator-tool-image/install.js index 8529104bcd8..e1eb165cea7 100644 --- a/packages/kogito-db-migrator-tool-image/install.js +++ b/packages/kogito-db-migrator-tool-image/install.js @@ -17,4 +17,48 @@ * under the License. */ -console.log("install.js"); +const { execSync } = require("child_process"); +const fs = require("fs"); + +const { env } = require("./env"); +const path = require("path"); +const pythonVenvDir = path.dirname(require.resolve("@kie-tools/python-venv/package.json")); +const sonataflowImageCommonDir = path.dirname(require.resolve("@kie-tools/sonataflow-image-common/package.json")); +const replaceInFile = require("replace-in-file"); + +const activateCmd = + process.platform === "win32" + ? `${pythonVenvDir}\\venv\\Scripts\\Activate.bat` + : `. ${pythonVenvDir}/venv/bin/activate`; + +execSync( + `${activateCmd} && \ + python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${env.kogitoDbMigratorToolImage.buildTag} --source-folder ./resources`, + { stdio: "inherit" } +); + +// Find and read the -image.yaml file +const resourcesPath = path.resolve(__dirname, "./resources"); +const files = fs.readdirSync(resourcesPath); +const imageYamlFiles = files.filter((fileName) => fileName.endsWith("image.yaml")); +if (imageYamlFiles.length !== 1) { + throw new Error("There should only be one image.yaml file on ./resources!"); +} +const originalYamlPath = path.join(resourcesPath, imageYamlFiles[0]); +let imageYaml = fs.readFileSync(originalYamlPath, "utf8"); + +const imageUrl = `${env.kogitoDbMigratorToolImage.registry}/${env.kogitoDbMigratorToolImage.account}/${env.kogitoDbMigratorToolImage.name}`; + +// Replace the whole string between quotes ("") with the image name +imageYaml = imageYaml.replace(/(?<=")(.*incubator-kie-kogito-service-db-migration-postgresql.*)(?=")/gm, imageUrl); + +// Write file and then rename it to match the image name +fs.writeFileSync(originalYamlPath, imageYaml); +fs.renameSync(originalYamlPath, path.join(resourcesPath, `${env.kogitoDbMigratorToolImage.name}-image.yaml`)); + +// Replace image URL in .feature files +replaceInFile.sync({ + files: ["**/*.feature"], + from: /@docker.io\/apache\/.*/g, + to: `@${imageUrl}`, +}); diff --git a/packages/kogito-db-migrator-tool-image/package.json b/packages/kogito-db-migrator-tool-image/package.json index 0580e059efb..7990a1ee29b 100644 --- a/packages/kogito-db-migrator-tool-image/package.json +++ b/packages/kogito-db-migrator-tool-image/package.json @@ -13,14 +13,32 @@ "url": "https://github.com/apache/incubator-kie-tools/issues" }, "scripts": { - "build": "./build-container-image.sh", - "build:dev": "pnpm build", - "build:prod": "pnpm build", - "install": "node install.js" + "build": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && pnpm copy-assets && pnpm image:build && rimraf build && rimraf target && rimraf dist-tests-e2e && rimraf resources/modules/kogito-postgres-db-migration-deps/quarkus-app", + "build:dev": "run-script-os", + "build:dev:linux": "pnpm build", + "build:dev:win32:darwin": "echo \"Build skipped on Windows and MacOS\"", + "build:prod": "run-script-os", + "build:prod:linux": "pnpm build", + "build:prod:win32:darwin": "echo \"Build skipped on Windows and MacOS\"", + "copy-assets": "run-script-os", + "copy-assets:linux:darwin": "rimraf build && cp -R ./node_modules/@kie-tools/sonataflow-image-common/resources build && mkdir -p resources/modules/kogito-postgres-db-migration-deps/quarkus-app && cp -R ./node_modules/@kie-tools/kogito-db-migrator-tool/target/quarkus-app/* resources/modules/kogito-postgres-db-migration-deps/quarkus-app && cp -R resources/* build ", + "format": "prettier --write . --ignore-path=../../.prettierignore --ignore-path=../../.gitignore", + "image:build": "run-script-os", + "image:build:linux": "pnpm setup:env && cekit --descriptor build/incubator-kie-kogito-db-migrator-tool-image.yaml -v build docker", + "image:build:win32:darwin": "echo \"Build skipped on Windows and MacOS\"", + "install": "node install.js && pnpm format", + "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoDbMigratorToolImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoDbMigratorToolImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoDbMigratorToolImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoDbMigratorToolImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)" }, "dependencies": { "@kie-tools/kogito-db-migrator-tool": "workspace:*", "@kie-tools/python-venv": "workspace:*", - "@kie-tools/root-env": "workspace:*" + "@kie-tools/root-env": "workspace:*", + "@kie-tools/sonataflow-image-common": "workspace:*" + }, + "devDependencies": { + "cross-env": "^7.0.3", + "replace-in-file": "^7.1.0", + "rimraf": "^3.0.2", + "run-script-os": "^1.1.6" } } diff --git a/packages/kogito-db-migrator-tool/src/main/cekit/image.yaml b/packages/kogito-db-migrator-tool-image/resources/incubator-kie-kogito-db-migrator-tool-image.yaml similarity index 74% rename from packages/kogito-db-migrator-tool/src/main/cekit/image.yaml rename to packages/kogito-db-migrator-tool-image/resources/incubator-kie-kogito-db-migrator-tool-image.yaml index a2517ee0154..cee53d87224 100644 --- a/packages/kogito-db-migrator-tool/src/main/cekit/image.yaml +++ b/packages/kogito-db-migrator-tool-image/resources/incubator-kie-kogito-db-migrator-tool-image.yaml @@ -16,14 +16,14 @@ # specific language governing permissions and limitations # under the License. # -name: "docker.io/apache/incubator-kie-kogito-service-db-migration-postgresql" -version: "999-SNAPSHOT" -from: registry.access.redhat.com/ubi8/openjdk-17-runtime:1.19 -description: Flyway image for DI/JS database migration +name: "docker.io/apache/incubator-kie-kogito-db-migrator-tool" +version: "main" +from: registry.access.redhat.com/ubi8/openjdk-17-runtime:1.20 +description: Flyway image for Data Index and Jobs Service database migration labels: - name: "org.kie.kogito.version" - value: "999-SNAPSHOT" + value: "### SET ME DURING BUILD PROCESS ###" - name: "maintainer" value: "Apache KIE " - name: "io.k8s.description" @@ -37,9 +37,13 @@ modules: repositories: - path: modules install: - - name: kogito-postgres-db-migration-deps + - name: org.kie.kogito.system.user + - name: org.kie.kogito.postgresql.db-migration-deps run: - workdir: "/home/kogito" + workdir: "/home/kogito/bin" entrypoint: - - "/home/kogito/migration.sh" + - "java" + cmd: + - "-jar" + - "./quarkus-run.jar" diff --git a/packages/kogito-db-migrator-tool/src/main/cekit/modules/kogito-postgres-db-migration-deps/install b/packages/kogito-db-migrator-tool-image/resources/modules/kogito-postgres-db-migration-deps/module.yaml similarity index 80% rename from packages/kogito-db-migrator-tool/src/main/cekit/modules/kogito-postgres-db-migration-deps/install rename to packages/kogito-db-migrator-tool-image/resources/modules/kogito-postgres-db-migration-deps/module.yaml index 5fa1a3e0e86..88986aea4ac 100644 --- a/packages/kogito-db-migrator-tool/src/main/cekit/modules/kogito-postgres-db-migration-deps/install +++ b/packages/kogito-db-migrator-tool-image/resources/modules/kogito-postgres-db-migration-deps/module.yaml @@ -1,4 +1,3 @@ -#!/bin/sh # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -17,16 +16,10 @@ # specific language governing permissions and limitations # under the License. # - -set -x -set -e - -useradd -m kogito - -cd /home/kogito || exit - -chgrp -R 0 /home/kogito -chown -R 0 /home/kogito -chmod -R g=u /home/kogito - -chmod +x /home/kogito/migration.sh \ No newline at end of file +schema_version: 1 +name: org.kie.kogito.postgresql.db-migration-deps +version: "main" +artifacts: + - name: sonataflow-db-migrator-quarkus-app + path: ./quarkus-app + dest: /home/kogito/bin diff --git a/packages/kogito-db-migrator-tool/.dockerignore b/packages/kogito-db-migrator-tool/.dockerignore deleted file mode 100644 index 94810d006e7..00000000000 --- a/packages/kogito-db-migrator-tool/.dockerignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!target/*-runner -!target/*-runner.jar -!target/lib/* -!target/quarkus-app/* \ No newline at end of file diff --git a/packages/kogito-db-migrator-tool/.gitignore b/packages/kogito-db-migrator-tool/.gitignore index 33b2771547b..8404612fa0f 100644 --- a/packages/kogito-db-migrator-tool/.gitignore +++ b/packages/kogito-db-migrator-tool/.gitignore @@ -1,44 +1,4 @@ -#Maven -target/ -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -release.properties -.flattened-pom.xml - -# Eclipse -.project -.classpath -.settings/ -bin/ - -# IntelliJ -.idea -*.ipr -*.iml -*.iws - -# NetBeans -nb-configuration.xml - -# Visual Studio Code -.vscode -.factorypath - -# OSX -.DS_Store - -# Vim -*.swp -*.swo - -# patch -*.orig -*.rej - -# Local environment -.env - -# Plugin directory -/.quarkus/cli/plugins/ -*.iml \ No newline at end of file +# kogito-db-migrator-tool +src/main/resources/postgresql +src/main/resources/ansi +src/main/resources/h2 \ No newline at end of file diff --git a/packages/kogito-db-migrator-tool/README.md b/packages/kogito-db-migrator-tool/README.md index 229ce15d3be..18e28f7eea9 100644 --- a/packages/kogito-db-migrator-tool/README.md +++ b/packages/kogito-db-migrator-tool/README.md @@ -1,25 +1,31 @@ -# kogito-db-migrator +# Kogito Postgres DB Migrator Tool -This is a java quarkus based postgres database migrator application for Sonataflow Data Index and Jobs Service applications for use by SonataFlow Operator. +This is a Java, Quarkus-based PostgreSQL database migrator application for Data-Index and Jobs Service applications for use by SonataFlow Operator. -_NOTE_: This postgres database migrator application and its corresponding images are only envisaged to be made use of by SonataFlow Operator, Data Index and Jobs Service internally. Conversely this application is of no use outside the usecases involved with SonataFlow Operator, Data Index and Jobs Service. +_NOTE_: This postgres database migrator application and its corresponding images are only envisaged to be made use of by SonataFlow Operator, Data Index and Jobs Service internally. Conversely this application is of no use outside the usecases involved with SonataFlow Operator, Data Index and Jobs Service applications. -## Running the application in dev mode +--- -Though you can run the application locally in dev mode but it is advisable to run this application as a container image. -The primary reason not to run as standalone application in dev mode, is that by default there are no DDL migration files included in the source. The script `get-kogito-ddl-scripts.sh` can be used to download the needed postgres DDL files into the application. +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. -You can run your application in dev mode that enables live coding using: +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): -```shell script -./get-kogito-ddl-scripts.sh -./mvnw compile quarkus:dev -``` +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header -## Build jar file - -You can build the jar file with the script `build-db-migrator-jar.sh` which places the jar into /tmp/ kogito-db-migrator-tool directory for use by the corresponding image builder in package kogito-db-migrator-tool-image later, which can be found [here](../kogito-db-migrator-tool-image/README.md). - -```shell -./build-db-migrator-jar.sh -``` +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/kogito-db-migrator-tool/build-db-migrator-jar.sh b/packages/kogito-db-migrator-tool/build-db-migrator-jar.sh deleted file mode 100755 index 6be70586900..00000000000 --- a/packages/kogito-db-migrator-tool/build-db-migrator-jar.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -# -# 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. -# - -set -x -set -e - -# Directory where the DB Migrator Jar will be dropped -OUTPUT_DIR=/tmp/kogito-db-migrator-tool -TARGET_JAR_FILE=./target/sonataflow-db-migrator-0.0.0-runner.jar -DDL_DIR=./src/main/resources/postgresql - -rm -rf $OUTPUT_DIR -mkdir -p $OUTPUT_DIR - -./get-kogito-ddl-scripts.sh - -if [ "$1" = "true" ]; then - echo "Using dev version:" - mvn clean install -DskipTests -Dquarkus.package.jar.type=uber-jar -else - echo "Using prod version:" - mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures) -Dquarkus.package.jar.type=uber-jar -fi - -cp $TARGET_JAR_FILE $OUTPUT_DIR - -# As the jar is built and ddl files are included, cleanup by deleting the ddl files -rm -rf $DDL_DIR diff --git a/packages/kogito-db-migrator-tool/env/index.js b/packages/kogito-db-migrator-tool/env/index.js index 42ad5024d52..8938b690b7f 100644 --- a/packages/kogito-db-migrator-tool/env/index.js +++ b/packages/kogito-db-migrator-tool/env/index.js @@ -23,7 +23,7 @@ module.exports = composeEnv([require("@kie-tools/root-env/env")], { vars: varsWithName({}), get env() { return { - devDeploymentQuarkusApp: { + kogitoDBMigratorTool: { version: require("../package.json").version, }, }; diff --git a/packages/kogito-db-migrator-tool/get-kogito-ddl-scripts.sh b/packages/kogito-db-migrator-tool/get-kogito-ddl-scripts.sh deleted file mode 100755 index cc88b91eb0b..00000000000 --- a/packages/kogito-db-migrator-tool/get-kogito-ddl-scripts.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -# -# 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. -# - -set -x -set -e - -# Script variables with default values. These values will be updated by hack/bump-version.sh, don't change it. -DDL_VERSION=10.0.999-SNAPSHOT -DDL_FILE=kogito-ddl-10.0.999-20241018.012042-73-db-scripts.zip -DDL_BASE_URL=https://repository.apache.org/content/groups/snapshots/org/kie/kogito/kogito-ddl -TMP_DIR=./tmp -RESOURCES_DIR=src/main/resources -POSTGRESQL_DDL_DIR=postgresql - -# cleanup temporary files -cleanup () { - echo "Cleaning up" - rm -rf ${RESOURCES_DIR}"/"${POSTGRESQL_DDL_DIR} - rm -rf $TMP_DIR -} - -# Use specific variable values, if passed -for arg in "$@"; do - case "$arg" in - DDL_VERSION=*) DDL_VERSION="${arg#*=}" ;; - DDL_FILE=*) DDL_FILE="${arg#*=}" ;; - DDL_BASE_URL=*) DDL_BASE_URL="${arg#*=}" ;; - esac -done - -DDL_URL=$DDL_BASE_URL/$DDL_VERSION/$DDL_FILE - -printf "Variables being used for the DDL: \n DDL_VERSION: %s, \n DDL_FILE: %s, \n DDL_BASE_URL: %s \n\n" "$DDL_VERSION" "$DDL_FILE" "$DDL_BASE_URL" - -# Start with cleanup -cleanup - -# Get Data Index/ Jobs Service DDL Files -mkdir -p $TMP_DIR -# Change the variables below, as needed -wget "$DDL_URL" -mv "$DDL_FILE" $TMP_DIR -cd $TMP_DIR || exit -unzip "$DDL_FILE" -mv "./"${POSTGRESQL_DDL_DIR} "../"${RESOURCES_DIR} -cd .. || exit -rm -rf $TMP_DIR diff --git a/packages/kogito-db-migrator-tool/install.js b/packages/kogito-db-migrator-tool/install.js index 61f0e221a7b..26b71a097ba 100644 --- a/packages/kogito-db-migrator-tool/install.js +++ b/packages/kogito-db-migrator-tool/install.js @@ -16,9 +16,8 @@ * specific language governing permissions and limitations * under the License. */ - const { env } = require("./env"); -const { setupMavenConfigFile, installMvnw, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); +const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); setupMavenConfigFile( ` @@ -31,5 +30,3 @@ setupMavenConfigFile( `, { ignoreDefault: true } // Can't have special configuration that only works inside this repo. ); - -installMvnw(); diff --git a/packages/kogito-db-migrator-tool/package.json b/packages/kogito-db-migrator-tool/package.json index 8dc4ca795f5..f1cb0ccdc16 100644 --- a/packages/kogito-db-migrator-tool/package.json +++ b/packages/kogito-db-migrator-tool/package.json @@ -13,15 +13,18 @@ "url": "https://github.com/apache/incubator-kie-tools/issues" }, "scripts": { - "build:dev": "./build-db-migrator-jar.sh true", - "build:prod": "./build-db-migrator-jar.sh false", - "install": "node install.js" + "build:dev": "pnpm pre-build && mvn clean install -DskipTests", + "build:prod": "pnpm pre-build && run-script-os", + "build:prod:darwin:linux": "mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", + "build:prod:win32": "pnpm powershell \"mvn clean install `-DskipTests=$(build-env tests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", + "pre-build": "mvn dependency:unpack" }, "dependencies": { "@kie-tools/maven-base": "workspace:*" }, "devDependencies": { "@kie-tools/root-env": "workspace:*", + "rimraf": "^3.0.2", "run-script-os": "^1.1.6" }, "kieTools": { diff --git a/packages/kogito-db-migrator-tool/pom.xml b/packages/kogito-db-migrator-tool/pom.xml index 25ae0882008..4948189277d 100644 --- a/packages/kogito-db-migrator-tool/pom.xml +++ b/packages/kogito-db-migrator-tool/pom.xml @@ -32,31 +32,6 @@ 4.0.0 org.kie.kogito sonataflow-db-migrator - - 2024-11-01T00:00:00Z - 3.13.0 - UTF-8 - UTF-8 - quarkus-bom - io.quarkus.platform - 3.13.0 - true - 3.2.5 - 0.8.12 - 1.19.0 - - - - - - ${quarkus.platform.group-id} - ${quarkus.platform.artifact-id} - ${quarkus.platform.version} - pom - import - - - @@ -67,10 +42,6 @@ io.quarkus quarkus-jdbc-postgresql - - org.flywaydb - flyway-database-postgresql - io.quarkus quarkus-arc @@ -93,12 +64,6 @@ com.github.stefanbirkner system-rules - ${systemrules.version} - test - - - org.junit.jupiter - junit-jupiter test @@ -106,108 +71,42 @@ src/test/java + + + maven-dependency-plugin + + + + org.kie.kogito + kogito-ddl + ${version.org.kie.kogito} + db-scripts + zip + true + src/main/resources + kogito-ddl-db-scripts.zip + ansi/* + + + + - ${quarkus.platform.group-id} + io.quarkus quarkus-maven-plugin - ${quarkus.platform.version} true build - generate-code - generate-code-tests - native-image-agent - - - org.apache.maven.plugins - maven-compiler-plugin - ${compiler-plugin.version} -parameters - - maven-surefire-plugin - ${surefire-plugin.version} - - - org.jboss.logmanager.LogManager - ${maven.home} - - - - - maven-failsafe-plugin - ${surefire-plugin.version} - - - - integration-test - verify - - - - - - ${project.build.directory}/${project.build.finalName}-runner - - org.jboss.logmanager.LogManager - ${maven.home} - - - - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - - prepare-agent - - - - report - prepare-package - - report - - - - - - - - native - - - native - - - - false - true - - - - - - - apache - Apache Maven - default - https://repo.maven.apache.org/maven2/ - - false - - - diff --git a/packages/kogito-db-migrator-tool/src/main/cekit/modules/kogito-postgres-db-migration-deps/migration.sh b/packages/kogito-db-migrator-tool/src/main/cekit/modules/kogito-postgres-db-migration-deps/migration.sh deleted file mode 100644 index fe41d336d5b..00000000000 --- a/packages/kogito-db-migrator-tool/src/main/cekit/modules/kogito-postgres-db-migration-deps/migration.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/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. -# - -set -x -set -e - -OPERATOR_VERSION=999.0.0 - -for arg in "$@"; do - case "$arg" in - OPERATOR_VERSION=*) OPERATOR_VERSION="${arg#*=}" ;; - esac -done - -cd /home/kogito/ - -mv sonataflow-db-migrator-runner.jar sonataflow-db-migrator-"$OPERATOR_VERSION"-runner.jar - -java -jar sonataflow-db-migrator-"$OPERATOR_VERSION"-runner.jar \ No newline at end of file diff --git a/packages/kogito-db-migrator-tool/src/main/cekit/modules/kogito-postgres-db-migration-deps/module.yaml b/packages/kogito-db-migrator-tool/src/main/cekit/modules/kogito-postgres-db-migration-deps/module.yaml deleted file mode 100644 index 0605dacc689..00000000000 --- a/packages/kogito-db-migrator-tool/src/main/cekit/modules/kogito-postgres-db-migration-deps/module.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# -# 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. -# -schema_version: 1 -name: kogito-postgres-db-migration-deps -version: "1.0" -artifacts: - - name: migration.sh - path: migration.sh - dest: /home/kogito - - name: sonataflow-db-migrator-runner.jar - path: sonataflow-db-migrator-runner.jar - dest: /home/kogito -execute: - - script: install diff --git a/packages/kogito-db-migrator-tool/src/main/java/org/kie/kogito/postgresql/migrator/MigrationService.java b/packages/kogito-db-migrator-tool/src/main/java/org/kie/kogito/postgresql/migrator/MigrationService.java index 233539cc35a..f6a86d704e0 100644 --- a/packages/kogito-db-migrator-tool/src/main/java/org/kie/kogito/postgresql/migrator/MigrationService.java +++ b/packages/kogito-db-migrator-tool/src/main/java/org/kie/kogito/postgresql/migrator/MigrationService.java @@ -52,7 +52,7 @@ private void migrateDB(Flyway flywayService, Boolean clean, String serviceName) } flywayService.migrate(); if (flywayService.info() != null) { - Log.info(flywayService.info().current().getVersion().toString()); + Log.info("Migrated to version " + flywayService.info().current().toString()); } } diff --git a/packages/kogito-db-migrator-tool/src/test/java/org/kie/kogito/postgresql/migrator/MigrationServiceTest.java b/packages/kogito-db-migrator-tool/src/test/java/org/kie/kogito/postgresql/migrator/MigrationServiceTest.java index 0c4f497cc81..2506952c2b3 100644 --- a/packages/kogito-db-migrator-tool/src/test/java/org/kie/kogito/postgresql/migrator/MigrationServiceTest.java +++ b/packages/kogito-db-migrator-tool/src/test/java/org/kie/kogito/postgresql/migrator/MigrationServiceTest.java @@ -35,7 +35,7 @@ public class MigrationServiceTest { @BeforeEach public void setupEach() { flyway = mock(Flyway.class); - when(flyway.migrate()).thenReturn(new MigrateResult("flywayVersion", "db", "schema", "postgres")); + when(flyway.migrate()).thenReturn(new MigrateResult("flywayVersion", "db", "schema")); when(flyway.clean()).thenReturn(new CleanResult("flywayVersion", "db")); } diff --git a/packages/maven-base/pom.xml b/packages/maven-base/pom.xml index cb4ad84b499..42511516735 100644 --- a/packages/maven-base/pom.xml +++ b/packages/maven-base/pom.xml @@ -140,6 +140,8 @@ 4.11.0 0.4 0.23.0 + 0.8.12 + 1.19.0 @@ -263,6 +265,12 @@ ${version.org.mockito} test + + com.github.stefanbirkner + system-rules + ${version.com.github.stefanbirkner.systemrules} + test + @@ -408,6 +416,25 @@ + + org.jacoco + jacoco-maven-plugin + ${version.jacoco.maven.plugin} + + + + prepare-agent + + + + report + prepare-package + + report + + + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 217fdd48396..6f6ec33a906 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6385,6 +6385,50 @@ importers: specifier: ^1.1.6 version: 1.1.6 + packages/kogito-db-migrator-tool: + dependencies: + '@kie-tools/maven-base': + specifier: workspace:* + version: link:../maven-base + devDependencies: + '@kie-tools/root-env': + specifier: workspace:* + version: link:../root-env + rimraf: + specifier: ^3.0.2 + version: 3.0.2 + run-script-os: + specifier: ^1.1.6 + version: 1.1.6 + + packages/kogito-db-migrator-tool-image: + dependencies: + '@kie-tools/kogito-db-migrator-tool': + specifier: workspace:* + version: link:../kogito-db-migrator-tool + '@kie-tools/python-venv': + specifier: workspace:* + version: link:../python-venv + '@kie-tools/root-env': + specifier: workspace:* + version: link:../root-env + '@kie-tools/sonataflow-image-common': + specifier: workspace:* + version: link:../sonataflow-image-common + devDependencies: + cross-env: + specifier: ^7.0.3 + version: 7.0.3 + replace-in-file: + specifier: ^7.1.0 + version: 7.1.0 + rimraf: + specifier: ^3.0.2 + version: 3.0.2 + run-script-os: + specifier: ^1.1.6 + version: 1.1.6 + packages/kogito-jit-runner-image: devDependencies: '@kie-tools/maven-base': diff --git a/repo/graph.dot b/repo/graph.dot index 3e22c2ef251..fbb8b1486bd 100644 --- a/repo/graph.dot +++ b/repo/graph.dot @@ -143,6 +143,8 @@ digraph G { "@kie-tools/sonataflow-image-common" [ color = "black", fontcolor = "black", style = "dashed, rounded" ]; "@kie/kogito-data-index-ephemeral-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ]; "@kie/kogito-data-index-postgresql-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ]; + "@kie-tools/kogito-db-migrator-tool" [ color = "black", fontcolor = "black", style = "dashed, rounded" ]; + "@kie-tools/kogito-db-migrator-tool-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ]; "@kie/kogito-jit-runner-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ]; "@kie/kogito-jobs-service-allinone-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ]; "@kie/kogito-jobs-service-ephemeral-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ]; @@ -449,6 +451,9 @@ digraph G { "@kie/kogito-data-index-ephemeral-image" -> "@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ]; "@kie/kogito-data-index-postgresql-image" -> "@kie-tools/maven-base" [ style = "dashed", color = "black" ]; "@kie/kogito-data-index-postgresql-image" -> "@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ]; + "@kie-tools/kogito-db-migrator-tool" -> "@kie-tools/maven-base" [ style = "solid", color = "black" ]; + "@kie-tools/kogito-db-migrator-tool-image" -> "@kie-tools/kogito-db-migrator-tool" [ style = "solid", color = "black" ]; + "@kie-tools/kogito-db-migrator-tool-image" -> "@kie-tools/sonataflow-image-common" [ style = "solid", color = "black" ]; "@kie/kogito-jit-runner-image" -> "@kie-tools/maven-base" [ style = "dashed", color = "black" ]; "@kie/kogito-jit-runner-image" -> "@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ]; "@kie/kogito-jobs-service-allinone-image" -> "@kie-tools/maven-base" [ style = "dashed", color = "black" ]; diff --git a/repo/graph.json b/repo/graph.json index 0f3378f7b52..2eefc41b8e3 100644 --- a/repo/graph.json +++ b/repo/graph.json @@ -159,6 +159,8 @@ { "id": "@kie/kogito-base-builder-image" }, { "id": "@kie-tools/sonataflow-image-common" }, { "id": "@kie-tools/python-venv" }, + { "id": "@kie-tools/kogito-db-migrator-tool" }, + { "id": "@kie-tools/kogito-db-migrator-tool-image" }, { "id": "@kie/kogito-jit-runner-image" }, { "id": "@kie/kogito-jobs-service-allinone-image" }, { "id": "@kie-tools/unitables" }, @@ -1984,6 +1986,21 @@ "target": "@kie-tools/root-env", "weight": 1 }, + { + "source": "@kie-tools/kogito-db-migrator-tool", + "target": "@kie-tools/maven-base", + "weight": 1 + }, + { + "source": "@kie-tools/kogito-db-migrator-tool-image", + "target": "@kie-tools/kogito-db-migrator-tool", + "weight": 1 + }, + { + "source": "@kie-tools/kogito-db-migrator-tool-image", + "target": "@kie-tools/sonataflow-image-common", + "weight": 1 + }, { "source": "@kie/kogito-jit-runner-image", "target": "@kie-tools/maven-base", @@ -2670,6 +2687,8 @@ ["@kie/kogito-base-builder-image", "packages/kogito-base-builder-image"], ["@kie/kogito-data-index-ephemeral-image", "packages/kogito-data-index-ephemeral-image"], ["@kie/kogito-data-index-postgresql-image", "packages/kogito-data-index-postgresql-image"], + ["@kie-tools/kogito-db-migrator-tool", "packages/kogito-db-migrator-tool"], + ["@kie-tools/kogito-db-migrator-tool-image", "packages/kogito-db-migrator-tool-image"], ["@kie/kogito-jit-runner-image", "packages/kogito-jit-runner-image"], ["@kie/kogito-jobs-service-allinone-image", "packages/kogito-jobs-service-allinone-image"], ["@kie/kogito-jobs-service-ephemeral-image", "packages/kogito-jobs-service-ephemeral-image"],