This is an automated email from the ASF dual-hosted git repository.
ricardozanini pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git
The following commit(s) were added to refs/heads/main by this push:
new 560cc5bf8ea [kogito-data-index-images] Fix kie-issues#1981 - Add Data
Index UI to Images; Small install.js refactor (#3181)
560cc5bf8ea is described below
commit 560cc5bf8ea78982b08dd91968d0f09f792f234e
Author: Ricardo Zanini <[email protected]>
AuthorDate: Tue Jun 17 10:39:06 2025 -0300
[kogito-data-index-images] Fix kie-issues#1981 - Add Data Index UI to
Images; Small install.js refactor (#3181)
Signed-off-by: Ricardo Zanini <[email protected]>
---
.../supporting-files/ci/partitions/partition0.txt | 4 +-
.../supporting-files/ci/partitions/partition1.txt | 5 +-
packages/kogito-base-builder-image/install.js | 53 +++---------
packages/kogito-base-builder-image/package.json | 3 +-
.../kogito-data-index-ephemeral-image/install.js | 49 ++---------
.../kogito-data-index-ephemeral-image/package.json | 3 +-
.../kogito-data-index-postgresql-image/install.js | 49 ++---------
.../package.json | 3 +-
.../env/index.js | 0
.../package.json | 2 +-
.../src/index.html | 0
.../src/styles.css | 0
.../static/favicon.svg | 0
.../webpack.config.js | 0
packages/kogito-db-migrator-tool-image/install.js | 49 ++---------
.../kogito-db-migrator-tool-image/package.json | 7 +-
packages/kogito-images-install-helper/index.js | 97 ++++++++++++++++++++++
packages/kogito-images-install-helper/package.json | 33 ++++++++
packages/kogito-jit-runner-image/install.js | 48 ++---------
packages/kogito-jit-runner-image/package.json | 3 +-
.../env/index.js | 54 ------------
.../kogito-jobs-service-allinone-image/install.js | 71 ----------------
.../package.json | 54 ------------
.../resources/app/ephemeral/pom.xml | 62 --------------
.../resources/app/pom.xml | 44 ----------
.../resources/app/postgresql/pom.xml | 62 --------------
...tor-kie-kogito-jobs-service-allinone-image.yaml | 71 ----------------
.../added/kogito-app-launch.sh | 62 --------------
.../kogito-jobs-service-all-in-one/configure | 37 ---------
.../kogito-jobs-service-all-in-one/module.yaml | 32 -------
.../kogito-jobs-service-all-in-one.feature | 63 --------------
.../features/kogito-jobs-service-common.feature | 31 -------
.../kogito-jobs-service-ephemeral-image/install.js | 49 ++---------
.../package.json | 3 +-
.../install.js | 49 ++---------
.../package.json | 3 +-
packages/sonataflow-builder-image/install.js | 49 ++---------
packages/sonataflow-builder-image/package.json | 3 +-
packages/sonataflow-devmode-image/install.js | 49 ++---------
packages/sonataflow-devmode-image/package.json | 3 +-
packages/sonataflow-image-common/package.json | 10 ++-
.../modules/kogito-data-index-common/configure | 5 ++
.../modules/kogito-data-index-common/module.yaml | 3 +
.../package.json | 2 +-
pnpm-lock.yaml | 91 +++++++++++++++++++-
repo/graph.dot | 38 ++++-----
repo/graph.json | 78 ++++++-----------
47 files changed, 376 insertions(+), 1110 deletions(-)
diff --git a/.github/supporting-files/ci/partitions/partition0.txt
b/.github/supporting-files/ci/partitions/partition0.txt
index 3792439c1ac..d6798f09d97 100644
--- a/.github/supporting-files/ci/partitions/partition0.txt
+++ b/.github/supporting-files/ci/partitions/partition0.txt
@@ -1 +1,3 @@
-@kie-tools/kn-plugin-workflow
\ No newline at end of file
+@kie-tools/kn-plugin-workflow
+@kie-tools/sonataflow-management-console-image
+@kie/kogito-jit-runner-image
\ No newline at end of file
diff --git a/.github/supporting-files/ci/partitions/partition1.txt
b/.github/supporting-files/ci/partitions/partition1.txt
index 717676af4ef..80e49db0a02 100644
--- a/.github/supporting-files/ci/partitions/partition1.txt
+++ b/.github/supporting-files/ci/partitions/partition1.txt
@@ -9,7 +9,4 @@
chrome-extension-serverless-workflow-editor
vscode-extension-dashbuilder-editor
yard-vscode-extension
-swf-vscode-extension
-@kie-tools/sonataflow-management-console-image
-@kie/kogito-jit-runner-image
-@kie/kogito-jobs-service-allinone-image
\ No newline at end of file
+swf-vscode-extension
\ No newline at end of file
diff --git a/packages/kogito-base-builder-image/install.js
b/packages/kogito-base-builder-image/install.js
index 0e3b3188d06..dd618c398e3 100644
--- a/packages/kogito-base-builder-image/install.js
+++ b/packages/kogito-base-builder-image/install.js
@@ -17,48 +17,15 @@
* under the License.
*/
-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.kogitoBaseBuilderImage.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.kogitoBaseBuilderImage.registry}/${env.kogitoBaseBuilderImage.account}/${env.kogitoBaseBuilderImage.name}`;
-
-// Replace the whole string between quotes ("") with the image name
-imageYaml = imageYaml.replace(/(?<=")(.*kogito-base-builder.*)(?=")/gm,
imageUrl);
-
-// Write file and then rename it to match the image name
-fs.writeFileSync(originalYamlPath, imageYaml);
-fs.renameSync(originalYamlPath, path.join(resourcesPath,
`${env.kogitoBaseBuilderImage.name}-image.yaml`));
-
-// Replace image URL in .feature files
-replaceInFile.sync({
- files: ["**/*.feature"],
- from: /@docker.io\/apache\/.*/g,
- to: `@${imageUrl}`,
+const { runKogitoImageInstall } = require("@kie/kogito-images-install-helper");
+const { env } = require("./env");
+const { buildTag, registry, account, name: imageName } =
env.kogitoBaseBuilderImage;
+
+runKogitoImageInstall({
+ finalImageName: "kogito-base-builder",
+ imageTag: { buildTag, registry, account, name: imageName },
+ resourceDir: path.resolve(__dirname, "./resources"),
+ requiresMvn: false,
+ imagePkgDir: __dirname,
});
diff --git a/packages/kogito-base-builder-image/package.json
b/packages/kogito-base-builder-image/package.json
index da44bf68816..374b5dca693 100644
--- a/packages/kogito-base-builder-image/package.json
+++ b/packages/kogito-base-builder-image/package.json
@@ -16,7 +16,7 @@
"build:dev": "run-script-if --bool \"$(build-env containerImages.build)\"
--then \"pnpm copy-assets\" \"pnpm image:build\"",
"build:prod": "pnpm build:dev && pnpm image:test",
"copy-assets": "run-script-os",
- "copy-assets:linux:darwin": "rimraf build && cp -R
./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R
resources/* build",
+ "copy-assets:linux:darwin": "rimraf build && cp -R
./node_modules/@kie-tools/sonataflow-image-common/dist build && cp -R
resources/* build",
"format": "prettier --write . --ignore-path=../../.prettierignore
--ignore-path=../../.gitignore",
"image:build": "run-script-os",
"image:build:darwin:linux": "pnpm setup:env make -C ./build build",
@@ -31,6 +31,7 @@
"@kie-tools/python-venv": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/sonataflow-image-common": "workspace:*",
+ "@kie/kogito-images-install-helper": "workspace:*",
"cross-env": "^7.0.3",
"replace-in-file": "^7.1.0",
"rimraf": "^3.0.2",
diff --git a/packages/kogito-data-index-ephemeral-image/install.js
b/packages/kogito-data-index-ephemeral-image/install.js
index 87cead623e8..f5dcd31a8e4 100644
--- a/packages/kogito-data-index-ephemeral-image/install.js
+++ b/packages/kogito-data-index-ephemeral-image/install.js
@@ -17,50 +17,17 @@
* under the License.
*/
-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.kogitoDataIndexEphemeralImage.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.kogitoDataIndexEphemeralImage.registry}/${env.kogitoDataIndexEphemeralImage.account}/${env.kogitoDataIndexEphemeralImage.name}`;
-
-// Replace the whole string between quotes ("") with the image name
-imageYaml =
imageYaml.replace(/(?<=")(.*kogito-data-index-ephemeral.*)(?=")/gm, imageUrl);
+const { runKogitoImageInstall } = require("@kie/kogito-images-install-helper");
+const { env } = require("./env");
-// Write file and then rename it to match the image name
-fs.writeFileSync(originalYamlPath, imageYaml);
-fs.renameSync(originalYamlPath, path.join(resourcesPath,
`${env.kogitoDataIndexEphemeralImage.name}-image.yaml`));
+const { buildTag, registry, account, name: imageName } =
env.kogitoDataIndexEphemeralImage;
-// Replace image URL in .feature files
-replaceInFile.sync({
- files: ["**/*.feature"],
- from: /@docker.io\/apache\/.*/g,
- to: `@${imageUrl}`,
+runKogitoImageInstall({
+ finalImageName: "kogito-data-index-ephemeral",
+ imageTag: { buildTag, registry, account, name: imageName },
+ resourceDir: path.resolve(__dirname, "./resources"),
+ imagePkgDir: __dirname,
});
/// Maven app
diff --git a/packages/kogito-data-index-ephemeral-image/package.json
b/packages/kogito-data-index-ephemeral-image/package.json
index 86189e26f02..a9b9bb43136 100644
--- a/packages/kogito-data-index-ephemeral-image/package.json
+++ b/packages/kogito-data-index-ephemeral-image/package.json
@@ -16,7 +16,7 @@
"build:dev": "run-script-if --bool \"$(build-env containerImages.build)\"
--then \"pnpm mvn-build-app\" \"pnpm copy-assets\" \"pnpm image:build\"",
"build:prod": "pnpm build:dev && pnpm image:test",
"copy-assets": "run-script-os",
- "copy-assets:linux:darwin": "rimraf build && cp -R
./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R
resources/* build",
+ "copy-assets:linux:darwin": "rimraf build && cp -R
./node_modules/@kie-tools/sonataflow-image-common/dist build && cp -R
resources/* build",
"copy-test-assets": "run-script-os",
"copy-test-assets:linux:darwin": "cp -R test-resources/. build",
"format": "prettier --write . --ignore-path=../../.prettierignore
--ignore-path=../../.gitignore",
@@ -39,6 +39,7 @@
"@kie-tools/python-venv": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/sonataflow-image-common": "workspace:*",
+ "@kie/kogito-images-install-helper": "workspace:*",
"cross-env": "^7.0.3",
"replace-in-file": "^7.1.0",
"rimraf": "^3.0.2",
diff --git a/packages/kogito-data-index-postgresql-image/install.js
b/packages/kogito-data-index-postgresql-image/install.js
index c21e2cea7d2..93b2af43560 100644
--- a/packages/kogito-data-index-postgresql-image/install.js
+++ b/packages/kogito-data-index-postgresql-image/install.js
@@ -17,50 +17,17 @@
* under the License.
*/
-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.kogitoDataIndexPostgresqlImage.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.kogitoDataIndexPostgresqlImage.registry}/${env.kogitoDataIndexPostgresqlImage.account}/${env.kogitoDataIndexPostgresqlImage.name}`;
-
-// Replace the whole string between quotes ("") with the image name
-imageYaml =
imageYaml.replace(/(?<=")(.*kogito-data-index-postgresql.*)(?=")/gm, imageUrl);
+const { runKogitoImageInstall } = require("@kie/kogito-images-install-helper");
+const { env } = require("./env");
-// Write file and then rename it to match the image name
-fs.writeFileSync(originalYamlPath, imageYaml);
-fs.renameSync(originalYamlPath, path.join(resourcesPath,
`${env.kogitoDataIndexPostgresqlImage.name}-image.yaml`));
+const { buildTag, registry, account, name: imageName } =
env.kogitoDataIndexPostgresqlImage;
-// Replace image URL in .feature files
-replaceInFile.sync({
- files: ["**/*.feature"],
- from: /@docker.io\/apache\/.*/g,
- to: `@${imageUrl}`,
+runKogitoImageInstall({
+ finalImageName: "kogito-data-index-postgresql",
+ imageTag: { buildTag, registry, account, name: imageName },
+ resourceDir: path.resolve(__dirname, "./resources"),
+ imagePkgDir: __dirname,
});
/// Maven app
diff --git a/packages/kogito-data-index-postgresql-image/package.json
b/packages/kogito-data-index-postgresql-image/package.json
index a1194946d1f..5159e3bdd0e 100644
--- a/packages/kogito-data-index-postgresql-image/package.json
+++ b/packages/kogito-data-index-postgresql-image/package.json
@@ -16,7 +16,7 @@
"build:dev": "run-script-if --bool \"$(build-env containerImages.build)\"
--then \"pnpm mvn-build-app\" \"pnpm copy-assets\" \"pnpm image:build\"",
"build:prod": "pnpm build:dev && pnpm image:test",
"copy-assets": "run-script-os",
- "copy-assets:linux:darwin": "rimraf build && cp -R
./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R
resources/* build",
+ "copy-assets:linux:darwin": "rimraf build && cp -R
./node_modules/@kie-tools/sonataflow-image-common/dist build && cp -R
resources/* build",
"copy-test-assets": "run-script-os",
"copy-test-assets:linux:darwin": "cp -R test-resources/. build",
"format": "prettier --write . --ignore-path=../../.prettierignore
--ignore-path=../../.gitignore",
@@ -39,6 +39,7 @@
"@kie-tools/python-venv": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/sonataflow-image-common": "workspace:*",
+ "@kie/kogito-images-install-helper": "workspace:*",
"cross-env": "^7.0.3",
"replace-in-file": "^7.1.0",
"rimraf": "^3.0.2",
diff --git a/packages/data-index-webapp/env/index.js
b/packages/kogito-data-index-webapp/env/index.js
similarity index 100%
rename from packages/data-index-webapp/env/index.js
rename to packages/kogito-data-index-webapp/env/index.js
diff --git a/packages/data-index-webapp/package.json
b/packages/kogito-data-index-webapp/package.json
similarity index 95%
rename from packages/data-index-webapp/package.json
rename to packages/kogito-data-index-webapp/package.json
index 1627e52a3d1..afb6ef91281 100644
--- a/packages/data-index-webapp/package.json
+++ b/packages/kogito-data-index-webapp/package.json
@@ -1,5 +1,5 @@
{
- "name": "@kie-tools/data-index-webapp",
+ "name": "@kie-tools/kogito-data-index-webapp",
"version": "0.0.0",
"description": "",
"license": "Apache-2.0",
diff --git a/packages/data-index-webapp/src/index.html
b/packages/kogito-data-index-webapp/src/index.html
similarity index 100%
rename from packages/data-index-webapp/src/index.html
rename to packages/kogito-data-index-webapp/src/index.html
diff --git a/packages/data-index-webapp/src/styles.css
b/packages/kogito-data-index-webapp/src/styles.css
similarity index 100%
rename from packages/data-index-webapp/src/styles.css
rename to packages/kogito-data-index-webapp/src/styles.css
diff --git a/packages/data-index-webapp/static/favicon.svg
b/packages/kogito-data-index-webapp/static/favicon.svg
similarity index 100%
rename from packages/data-index-webapp/static/favicon.svg
rename to packages/kogito-data-index-webapp/static/favicon.svg
diff --git a/packages/data-index-webapp/webpack.config.js
b/packages/kogito-data-index-webapp/webpack.config.js
similarity index 100%
rename from packages/data-index-webapp/webpack.config.js
rename to packages/kogito-data-index-webapp/webpack.config.js
diff --git a/packages/kogito-db-migrator-tool-image/install.js
b/packages/kogito-db-migrator-tool-image/install.js
index cec8142a81d..3af64c2d707 100644
--- a/packages/kogito-db-migrator-tool-image/install.js
+++ b/packages/kogito-db-migrator-tool-image/install.js
@@ -17,48 +17,15 @@
* under the License.
*/
-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(/(?<=")(.*kie-kogito-db-migrator-tool.*)(?=")/gm, imageUrl);
+const { runKogitoImageInstall } = require("@kie/kogito-images-install-helper");
+const { env } = require("./env");
-// 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`));
+const { buildTag, registry, account, name: imageName } =
env.kogitoDbMigratorToolImage;
-// Replace image URL in .feature files
-replaceInFile.sync({
- files: ["**/*.feature"],
- from: /@docker.io\/apache\/.*/g,
- to: `@${imageUrl}`,
+runKogitoImageInstall({
+ finalImageName: imageName,
+ imageTag: { buildTag, registry, account, name: imageName },
+ resourceDir: path.resolve(__dirname, "./resources"),
+ imagePkgDir: __dirname,
});
diff --git a/packages/kogito-db-migrator-tool-image/package.json
b/packages/kogito-db-migrator-tool-image/package.json
index 14ed917e88d..601a5f8470e 100644
--- a/packages/kogito-db-migrator-tool-image/package.json
+++ b/packages/kogito-db-migrator-tool-image/package.json
@@ -21,7 +21,7 @@
"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 && cp -R
resources/* build && mkdir -p
build/modules/kogito-db-migrator-tool/postgresql/quarkus-app && cp -R
./node_modules/@kie-tools/kogito-db-migrator-tool/target/quarkus-app/*
build/modules/kogito-db-migrator-tool/postgresql/quarkus-app",
+ "copy-assets:linux:darwin": "rimraf build && cp -R
./node_modules/@kie-tools/sonataflow-image-common/dist build && cp -R
resources/* build && mkdir -p
build/modules/kogito-db-migrator-tool/postgresql/quarkus-app && cp -R
./node_modules/@kie-tools/kogito-db-migrator-tool/target/quarkus-app/*
build/modules/kogito-db-migrator-tool/postgresql/quarkus-app",
"format": "prettier --write . --ignore-path=../../.prettierignore
--ignore-path=../../.gitignore",
"image:build": "run-script-os",
"image:build:linux": "pnpm setup:env make -C ./build build",
@@ -32,11 +32,12 @@
},
"dependencies": {
"@kie-tools/kogito-db-migrator-tool": "workspace:*",
- "@kie-tools/python-venv": "workspace:*",
- "@kie-tools/root-env": "workspace:*",
"@kie-tools/sonataflow-image-common": "workspace:*"
},
"devDependencies": {
+ "@kie-tools/python-venv": "workspace:*",
+ "@kie-tools/root-env": "workspace:*",
+ "@kie/kogito-images-install-helper": "workspace:*",
"cross-env": "^7.0.3",
"replace-in-file": "^7.1.0",
"rimraf": "^3.0.2",
diff --git a/packages/kogito-images-install-helper/index.js
b/packages/kogito-images-install-helper/index.js
new file mode 100644
index 00000000000..ad74da162e8
--- /dev/null
+++ b/packages/kogito-images-install-helper/index.js
@@ -0,0 +1,97 @@
+/*
+ * 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.
+ */
+
+const { execSync } = require("child_process");
+const fs = require("fs");
+const path = require("path");
+const replaceInFile = require("replace-in-file");
+const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } =
require("@kie-tools/maven-base");
+
+/**
+ * Install routine for Kogito images. Helps with bumping versions, configuring
Maven, and updating YAMLs/features.
+ * @param {{ imageTag: { buildTag:string, registry:string, account:string,
name:string }, resourceDir?: string, finalImageName: string, requiresMvn:
boolean, imagePkgDir: string }} options
+ */
+function runKogitoImageInstall({
+ imageTag,
+ resourceDir = "./resources",
+ finalImageName,
+ requiresMvn = true,
+ imagePkgDir,
+}) {
+ if (!finalImageName) {
+ throw new Error("'finalImageName' parameter is required");
+ }
+ if (!imageTag) {
+ throw new Error("'imageTag' parameter is required");
+ }
+
+ // 1) Maven revision and tail
+ if (requiresMvn) {
+ const consumerVersion = require(path.join(imagePkgDir,
"package.json")).version;
+ setupMavenConfigFile(
+ `
+ -Drevision=${consumerVersion}
+
-Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies(path.resolve(imagePkgDir))}
+ `
+ );
+ }
+
+ // 2) Activate Python venv and bump via versions_manager.py
+ const pythonVenvDir =
path.dirname(require.resolve("@kie-tools/python-venv/package.json"));
+ const imageCommonDir =
path.dirname(require.resolve("@kie-tools/sonataflow-image-common/package.json"));
+
+ const activateCmd =
+ process.platform === "win32"
+ ? `${pythonVenvDir}\\venv\\Scripts\\Activate.bat`
+ : `. ${pythonVenvDir}/venv/bin/activate`;
+
+ execSync(
+ `${activateCmd} && \
+ python3 ${imageCommonDir}/resources/scripts/versions_manager.py \
+ --bump-to ${imageTag.buildTag} --source-folder ${resourceDir}`,
+ { stdio: "inherit" }
+ );
+
+ // 3) Find, replace inside, and rename the *-image.yaml
+ const files = fs.readdirSync(resourceDir);
+ const yamlFile =
+ files.find((f) => f.endsWith(`-${imageTag.name}.yaml`)) || files.find((f)
=> f.endsWith("-image.yaml"));
+ if (!yamlFile) {
+ throw new Error(`No *-image.yaml found in ${resourceDir}`);
+ }
+ const yamlPath = path.join(resourceDir, yamlFile);
+ let content = fs.readFileSync(yamlPath, "utf8");
+
+ const imageUrl = `${imageTag.registry}/${imageTag.account}/${imageTag.name}`;
+ // Use the provided finalImageName to match and replace
+ const regex = new RegExp(`(?<=").*${finalImageName}.*(?=")`, "g");
+ content = content.replace(regex, imageUrl);
+
+ fs.writeFileSync(yamlPath, content);
+ fs.renameSync(yamlPath, path.join(resourceDir,
`${imageTag.name}-image.yaml`));
+
+ // 4) Update any .feature files with the new image URL tag
+ replaceInFile.sync({
+ files: ["**/*.feature"],
+ from: /@docker.io\/apache\/.*/g,
+ to: `@${imageUrl}`,
+ });
+}
+
+module.exports = { runKogitoImageInstall };
diff --git a/packages/kogito-images-install-helper/package.json
b/packages/kogito-images-install-helper/package.json
new file mode 100644
index 00000000000..f25ff6df34d
--- /dev/null
+++ b/packages/kogito-images-install-helper/package.json
@@ -0,0 +1,33 @@
+{
+ "private": true,
+ "name": "@kie/kogito-images-install-helper",
+ "version": "0.0.0",
+ "description": "Install helper for Kogito images",
+ "license": "Apache-2.0",
+ "homepage": "https://github.com/apache/incubator-kie-tools",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/apache/incubator-kie-tools.git"
+ },
+ "bugs": {
+ "url": "https://github.com/apache/incubator-kie-tools/issues"
+ },
+ "main": "index.js",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {},
+ "dependencies": {
+ "@kie-tools/maven-base": "workspace:*",
+ "@kie-tools/python-venv": "workspace:*",
+ "@kie-tools/root-env": "workspace:*",
+ "@kie-tools/sonataflow-image-common": "workspace:*",
+ "replace-in-file": "^7.1.0"
+ },
+ "devDependencies": {},
+ "kieTools": {
+ "requiredPreinstalledCliCommands": [
+ "python3"
+ ]
+ }
+}
diff --git a/packages/kogito-jit-runner-image/install.js
b/packages/kogito-jit-runner-image/install.js
index 0294693b81c..d04ac4ab780 100644
--- a/packages/kogito-jit-runner-image/install.js
+++ b/packages/kogito-jit-runner-image/install.js
@@ -17,50 +17,18 @@
* under the License.
*/
-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.kogitoJitRunnerImage.buildTag} --source-folder ./resources`,
- { stdio: "inherit" }
-);
+const { runKogitoImageInstall } = require("@kie/kogito-images-install-helper");
-// 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.kogitoJitRunnerImage.registry}/${env.kogitoJitRunnerImage.account}/${env.kogitoJitRunnerImage.name}`;
-
-// Replace the whole string between quotes ("") with the image name
-imageYaml = imageYaml.replace(/(?<=")(.*kogito-jit-runner.*)(?=")/gm,
imageUrl);
+const { env } = require("./env");
-// Write file and then rename it to match the image name
-fs.writeFileSync(originalYamlPath, imageYaml);
-fs.renameSync(originalYamlPath, path.join(resourcesPath,
`${env.kogitoJitRunnerImage.name}-image.yaml`));
+const { buildTag, registry, account, name: imageName } =
env.kogitoJitRunnerImage;
-// Replace image URL in .feature files
-replaceInFile.sync({
- files: ["**/*.feature"],
- from: /@docker.io\/apache\/.*/g,
- to: `@${imageUrl}`,
+runKogitoImageInstall({
+ finalImageName: "kogito-jit-runner",
+ imageTag: { buildTag, registry, account, name: imageName },
+ resourceDir: path.resolve(__dirname, "./resources"),
+ imagePkgDir: __dirname,
});
/// Maven app
diff --git a/packages/kogito-jit-runner-image/package.json
b/packages/kogito-jit-runner-image/package.json
index 58da9a9219b..0d34a734801 100644
--- a/packages/kogito-jit-runner-image/package.json
+++ b/packages/kogito-jit-runner-image/package.json
@@ -16,7 +16,7 @@
"build:dev": "run-script-if --bool \"$(build-env containerImages.build)\"
--then \"pnpm mvn-build-app\" \"pnpm copy-assets\" \"pnpm image:build\"",
"build:prod": "pnpm build:dev && pnpm image:test",
"copy-assets": "run-script-os",
- "copy-assets:linux:darwin": "rimraf build && cp -R
./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R
resources/* build",
+ "copy-assets:linux:darwin": "rimraf build && cp -R
./node_modules/@kie-tools/sonataflow-image-common/dist build && cp -R
resources/* build",
"copy-test-assets": "run-script-os",
"copy-test-assets:linux:darwin": "cp -R test-resources/. build",
"format": "prettier --write . --ignore-path=../../.prettierignore
--ignore-path=../../.gitignore",
@@ -39,6 +39,7 @@
"@kie-tools/python-venv": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/sonataflow-image-common": "workspace:*",
+ "@kie/kogito-images-install-helper": "workspace:*",
"cross-env": "^7.0.3",
"replace-in-file": "^7.1.0",
"rimraf": "^3.0.2",
diff --git a/packages/kogito-jobs-service-allinone-image/env/index.js
b/packages/kogito-jobs-service-allinone-image/env/index.js
deleted file mode 100644
index 5cd647c4bc8..00000000000
--- a/packages/kogito-jobs-service-allinone-image/env/index.js
+++ /dev/null
@@ -1,54 +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.
- */
-
-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_JOBS_SERVICE_ALLINONE_IMAGE__registry: {
- default: "docker.io",
- description: "The image registry.",
- },
- KOGITO_JOBS_SERVICE_ALLINONE_IMAGE__account: {
- default: "apache",
- description: "The image registry account.",
- },
- KOGITO_JOBS_SERVICE_ALLINONE_IMAGE__name: {
- default: "incubator-kie-kogito-jobs-service-allinone",
- description: "The image name.",
- },
- KOGITO_JOBS_SERVICE_ALLINONE_IMAGE__buildTag: {
- default: rootEnv.env.root.streamName,
- description: "The image tag.",
- },
- }),
- get env() {
- return {
- kogitoJobsServiceAllInOneImage: {
- registry:
getOrDefault(this.vars.KOGITO_JOBS_SERVICE_ALLINONE_IMAGE__registry),
- account:
getOrDefault(this.vars.KOGITO_JOBS_SERVICE_ALLINONE_IMAGE__account),
- name: getOrDefault(this.vars.KOGITO_JOBS_SERVICE_ALLINONE_IMAGE__name),
- buildTag:
getOrDefault(this.vars.KOGITO_JOBS_SERVICE_ALLINONE_IMAGE__buildTag),
- },
- };
- },
-});
diff --git a/packages/kogito-jobs-service-allinone-image/install.js
b/packages/kogito-jobs-service-allinone-image/install.js
deleted file mode 100644
index 8bfc7d1293f..00000000000
--- a/packages/kogito-jobs-service-allinone-image/install.js
+++ /dev/null
@@ -1,71 +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.
- */
-
-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.kogitoJobsServiceAllInOneImage.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.kogitoJobsServiceAllInOneImage.registry}/${env.kogitoJobsServiceAllInOneImage.account}/${env.kogitoJobsServiceAllInOneImage.name}`;
-
-// Replace the whole string between quotes ("") with the image name
-imageYaml =
imageYaml.replace(/(?<=")(.*kogito-jobs-service-allinone.*)(?=")/gm, imageUrl);
-
-// Write file and then rename it to match the image name
-fs.writeFileSync(originalYamlPath, imageYaml);
-fs.renameSync(originalYamlPath, path.join(resourcesPath,
`${env.kogitoJobsServiceAllInOneImage.name}-image.yaml`));
-
-// Replace image URL in .feature files
-replaceInFile.sync({
- files: ["**/*.feature"],
- from: /@docker.io\/apache\/.*/g,
- to: `@${imageUrl}`,
-});
-
-/// Maven app
-
-const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } =
require("@kie-tools/maven-base");
-setupMavenConfigFile(`
- -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
-`);
diff --git a/packages/kogito-jobs-service-allinone-image/package.json
b/packages/kogito-jobs-service-allinone-image/package.json
deleted file mode 100644
index baa7c4b177a..00000000000
--- a/packages/kogito-jobs-service-allinone-image/package.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "private": true,
- "name": "@kie/kogito-jobs-service-allinone-image",
- "version": "0.0.0",
- "description": "",
- "license": "Apache-2.0",
- "homepage": "https://github.com/apache/incubator-kie-tools",
- "repository": {
- "type": "git",
- "url": "https://github.com/apache/incubator-kie-tools.git"
- },
- "bugs": {
- "url": "https://github.com/apache/incubator-kie-tools/issues"
- },
- "scripts": {
- "build:dev": "run-script-if --bool \"$(build-env containerImages.build)\"
--then \"pnpm mvn-build-app\" \"pnpm copy-assets\" \"pnpm image:build\"",
- "build:prod": "pnpm build:dev && pnpm image:test",
- "copy-assets": "run-script-os",
- "copy-assets:linux:darwin": "rimraf build && cp -R
./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R
resources/* build",
- "copy-test-assets": "run-script-os",
- "copy-test-assets:linux:darwin": "cp -R test-resources/. build",
- "format": "prettier --write . --ignore-path=../../.prettierignore
--ignore-path=../../.gitignore",
- "image:build": "run-script-os",
- "image:build:darwin:linux": "pnpm setup:env make -C ./build build",
- "image:build:win32": "echo \"Build skipped on Windows\"",
- "image:test": "run-script-if --ignore-errors \"$(build-env
tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then
\"mkdir -p build/target/test/results\" \"run-script-os\" --finally \"mkdir -p
build/target/test/results\" \"cp -R build/target/test/results
dist-tests-e2e/\"",
- "image:test:darwin:linux": "pnpm copy-test-assets && pnpm setup:env make
-C ./build test-image",
- "image:test:win32": "echo \"Tests skipped on Windows\"",
- "install": "node install.js && pnpm format",
- "mvn-build-app": "run-script-os",
- "mvn-build-app:linux:darwin": "mvn -am package
-Dquarkus.package.type=fast-jar -Dquarkus.container-image.build=false -B -f
./resources/app/pom.xml",
- "mvn-build-app:win32": "echo \"Build skipped on Windows\"",
- "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate &&
cross-env KOGITO_IMAGE_REGISTRY=$(build-env
kogitoJobsServiceAllInOneImage.registry)
KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env
kogitoJobsServiceAllInOneImage.account) KOGITO_IMAGE_NAME=$(build-env
kogitoJobsServiceAllInOneImage.name) KOGITO_IMAGE_TAG=$(build-env
kogitoJobsServiceAllInOneImage.buildTag) QUARKUS_PLATFORM_GROUPID=$(build-env
kogitoImagesCekitModules.quarkusGroupId) QUARKUS_PLATFORM_VERSION=$(buil [...]
- },
- "dependencies": {
- "@kie-tools/maven-base": "workspace:*"
- },
- "devDependencies": {
- "@kie-tools/python-venv": "workspace:*",
- "@kie-tools/root-env": "workspace:*",
- "@kie-tools/sonataflow-image-common": "workspace:*",
- "cross-env": "^7.0.3",
- "replace-in-file": "^7.1.0",
- "rimraf": "^3.0.2",
- "run-script-os": "^1.1.6"
- },
- "kieTools": {
- "requiredPreinstalledCliCommands": [
- "python3",
- "make",
- "s2i"
- ]
- }
-}
diff --git
a/packages/kogito-jobs-service-allinone-image/resources/app/ephemeral/pom.xml
b/packages/kogito-jobs-service-allinone-image/resources/app/ephemeral/pom.xml
deleted file mode 100644
index d0699004862..00000000000
---
a/packages/kogito-jobs-service-allinone-image/resources/app/ephemeral/pom.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.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.
--->
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
->
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.kie</groupId>
- <artifactId>kogito-jobs-service-image-parent</artifactId>
- <version>${revision}</version>
- </parent>
-
- <artifactId>kogito-jobs-service-inmemory-image-app</artifactId>
- <version>${revision}</version>
-
- <name>KIE Tools :: Kogito Jobs Service Inmemory Image :: App</name>
- <description>Kogito Jobs Service Inmemory Image Quarkus App</description>
-
- <dependencies>
- <dependency>
- <groupId>org.kie.kogito</groupId>
- <artifactId>jobs-service-inmemory</artifactId>
- <version>${version.org.kie.kogito}</version>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${project.artifactId}</finalName>
- <plugins>
- <plugin>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/packages/kogito-jobs-service-allinone-image/resources/app/pom.xml
b/packages/kogito-jobs-service-allinone-image/resources/app/pom.xml
deleted file mode 100644
index d9ef6a0be43..00000000000
--- a/packages/kogito-jobs-service-allinone-image/resources/app/pom.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.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.
--->
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
->
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.kie</groupId>
- <artifactId>kie-tools-maven-base</artifactId>
- <version>${revision}</version>
-
<relativePath>../../node_modules/@kie-tools/maven-base/pom.xml</relativePath>
- </parent>
-
- <artifactId>kogito-jobs-service-image-parent</artifactId>
- <version>${revision}</version>
- <packaging>pom</packaging>
-
- <name>KIE Tools :: Kogito Jobs Service Image :: Parent</name>
- <description>Kogito Kogito Jobs Service Image Parent</description>
-
- <modules>
- <module>ephemeral</module>
- <module>postgresql</module>
- </modules>
-</project>
diff --git
a/packages/kogito-jobs-service-allinone-image/resources/app/postgresql/pom.xml
b/packages/kogito-jobs-service-allinone-image/resources/app/postgresql/pom.xml
deleted file mode 100644
index 3b329361104..00000000000
---
a/packages/kogito-jobs-service-allinone-image/resources/app/postgresql/pom.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.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.
--->
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
->
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.kie</groupId>
- <artifactId>kogito-jobs-service-image-parent</artifactId>
- <version>${revision}</version>
- </parent>
-
- <artifactId>kogito-jobs-service-postgresql-image-app</artifactId>
- <version>${revision}</version>
-
- <name>KIE Tools :: Kogito Jobs Service Postgresql Image :: App</name>
- <description>Kogito Kogito Jobs Service Postgresql Image Quarkus
App</description>
-
- <dependencies>
- <dependency>
- <groupId>org.kie.kogito</groupId>
- <artifactId>jobs-service-postgresql</artifactId>
- <version>${version.org.kie.kogito}</version>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${project.artifactId}</finalName>
- <plugins>
- <plugin>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git
a/packages/kogito-jobs-service-allinone-image/resources/incubator-kie-kogito-jobs-service-allinone-image.yaml
b/packages/kogito-jobs-service-allinone-image/resources/incubator-kie-kogito-jobs-service-allinone-image.yaml
deleted file mode 100644
index b0bd0a71fb3..00000000000
---
a/packages/kogito-jobs-service-allinone-image/resources/incubator-kie-kogito-jobs-service-allinone-image.yaml
+++ /dev/null
@@ -1,71 +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: "docker.io/apache/incubator-kie-kogito-jobs-service-ephemeral"
-version: "main"
-from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.21"
-description: "Runtime image for Kogito Jobs Service with all available jdbc
providers"
-
-labels:
- - name: "org.kie.kogito.version"
- value: "### SET ME DURING BUILD PROCESS ###"
- - name: "maintainer"
- value: "Apache KIE <[email protected]>"
- - name: "io.k8s.description"
- value: "Runtime image for Kogito Jobs Service with all available jdbc
providers"
- - name: "io.k8s.display-name"
- value: "Kogito Jobs Service All-in-One"
- - name: "io.openshift.tags"
- value: "kogito,jobs-service,postgresql,ephemeral"
- - name: "io.openshift.expose-services"
- value: "8080:http"
-
-envs:
- - name: "SCRIPT_DEBUG"
- example: "true"
- description: "If set to true, ensures that the bash scripts are executed
with the -x option, printing the commands and their arguments as they are
executed. Also debug JVM initialization."
- - name: "ENABLE_EVENTS"
- example: "true"
- description: "By default Jobs Service doesn't integrate with message
systems (e.g. Kafka). Set this variable to true to enable the events add-on."
- - name: "JOBS_SERVICE_PERSISTENCE"
- example: "postgresql"
- description: "The all in one image contains all the supported jdbc plugins
for Jobs Service, ephemeral and postgresql, if empty, defaults to ephemeral"
-
-modules:
- repositories:
- - path: 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
- - name: org.kie.kogito.security.custom.truststores
- - name: org.kie.kogito.jobs.service.common
-
-ports:
- - value: 8080
-
-run:
- workdir: "/home/kogito"
- user: 1001
- cmd:
- - "/home/kogito/kogito-app-launch.sh"
diff --git
a/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/added/kogito-app-launch.sh
b/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/added/kogito-app-launch.sh
deleted file mode 100644
index 447dbbae762..00000000000
---
a/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/added/kogito-app-launch.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/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.
-#
-
-
-#import
-source "${KOGITO_HOME}"/launch/logging.sh
-
-if [ "${SCRIPT_DEBUG}" = "true" ] ; then
- set -x
- SHOW_JVM_SETTINGS="-XshowSettings:properties"
- log_info "Script debugging is enabled, allowing bash commands and their
arguments to be printed as they are executed"
- log_info "JVM settings debug is enabled."
- printenv
-fi
-
-allowed_jobs_service_flavors=("ephemeral" "postgresql")
-jobs_service_flavor="ephemeral"
-if [[ ! "${allowed_jobs_service_flavors[*]}" =~ ${JOBS_SERVICE_PERSISTENCE,,}
]]; then
- log_warning "${JOBS_SERVICE_PERSISTENCE,,} is not supported, the allowed
flavors are [${allowed_jobs_service_flavors[*]}], defaulting to
${jobs_service_flavor}"
- unset JOBS_SERVICE_PERSISTENCE
-
-elif [ "x${JOBS_SERVICE_PERSISTENCE}" != "x" ]; then
- jobs_service_flavor=${JOBS_SERVICE_PERSISTENCE,,}
-fi
-
-# Configuration scripts
-# Any configuration script that needs to run on image startup must be added
here.
-CONFIGURE_SCRIPTS=(
- "${KOGITO_HOME}"/launch/kogito-jobs-service-common.sh
- "${KOGITO_HOME}"/launch/configure-custom-truststore.sh
-)
-source "${KOGITO_HOME}"/launch/configure.sh
-#############################################
-
-DYNAMIC_RESOURCES_OPTS="$(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options)
$(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/debug-options)"
-
-# shellcheck disable=SC2086
-CMD="exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS}
${KOGITO_JOBS_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \
--Dquarkus.http.host=0.0.0.0 \
--Dquarkus.http.port=8080 \
--jar \"${KOGITO_HOME}/bin/${jobs_service_flavor}/quarkus-app/quarkus-run.jar\""
-
-log_info "Running application start mvn command"
-echo "$CMD"
-eval "$CMD"
diff --git
a/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/configure
b/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/configure
deleted file mode 100644
index 0dcce19d402..00000000000
---
a/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/configure
+++ /dev/null
@@ -1,37 +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 -e
-
-SCRIPT_DIR=$(dirname "${0}")
-ADDED_DIR="${SCRIPT_DIR}"/added
-
-mkdir "${KOGITO_HOME}"/bin/shared-libs/
-
-mv "${KOGITO_HOME}"/bin/ephemeral/quarkus-app/lib/*
"${KOGITO_HOME}"/bin/shared-libs/
-rm -rf "${KOGITO_HOME}"/bin/ephemeral/quarkus-app/lib
-ln -s "${KOGITO_HOME}"/bin/shared-libs
"${KOGITO_HOME}"/bin/ephemeral/quarkus-app/lib
-
-cp -R "${KOGITO_HOME}"/bin/postgresql/quarkus-app/lib/*
"${KOGITO_HOME}"/bin/shared-libs/
-rm -rf "${KOGITO_HOME}"/bin/postgresql/quarkus-app/lib
-ln -s "${KOGITO_HOME}"/bin/shared-libs
"${KOGITO_HOME}"/bin/postgresql/quarkus-app/lib
-
-
-cp "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}"
-chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh
diff --git
a/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/module.yaml
b/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/module.yaml
deleted file mode 100644
index 244300c4d04..00000000000
---
a/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/module.yaml
+++ /dev/null
@@ -1,32 +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: org.kie.kogito.jobs.service.allinone
-version: "main"
-
-artifacts:
- - path: ../../../../app/ephemeral/target/quarkus-app
- dest: /home/kogito/bin/ephemeral/quarkus-app
- name: jobs-service-inmemory-all-in-one
- - path: ../../../../app/postgresql/target/quarkus-app
- dest: /home/kogito/bin/postgresql/quarkus-app
- name: jobs-service-postgresql-all-in-one
-
-execute:
- - script: configure
diff --git
a/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature
b/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature
deleted file mode 100644
index 17385fbe52c..00000000000
---
a/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature
+++ /dev/null
@@ -1,63 +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.
-#
-
[email protected]/apache/incubator-kie-kogito-jobs-service-allinone
-Feature: Kogito-jobs-service-all-in-one feature.
-
- Scenario: verify if all labels are correctly set kogito-jobs-service image
image
- Given image is built
- Then the image should contain label maintainer with value Apache KIE
<[email protected]>
- And the image should contain label io.openshift.expose-services with value
8080:http
- And the image should contain label io.k8s.description with value Runtime
image for Kogito Jobs Service with all available jdbc providers
- And the image should contain label io.k8s.display-name with value Kogito
Jobs Service All-in-One
- And the image should contain label io.openshift.tags with value
kogito,jobs-service,postgresql,ephemeral
-
- Scenario: Verify if all jobs-service flavors are in the image
- When container is started with command bash
- Then file /home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar should
exist
- And file /home/kogito/bin/postgresql/quarkus-app/quarkus-run.jar should
exist
-
- Scenario: Verify if the debug is correctly enabled with the ephemeral jar
- When container is started with env
- | variable | value |
- | SCRIPT_DEBUG | false |
- Then container log should contain -Dquarkus.http.host=0.0.0.0
-Dquarkus.http.port=8080 -jar
"/home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar"
- And container log should contain started in
- And container log should not contain Application failed to start
-
- Scenario: verify if the container is started with invalid jobs-service flavor
- When container is started with env
- | variable | value |
- | SCRIPT_DEBUG | false |
- | JOBS_SERVICE_PERSISTENCE | something |
- Then container log should contain -Dquarkus.http.host=0.0.0.0
-Dquarkus.http.port=8080 -jar
"/home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar"
- And container log should contain something is not supported, the allowed
flavors are [ephemeral postgresql], defaulting to ephemeral
-
- Scenario: verify if container starts as expected
- When container is started with env
- | variable | value
|
- | SCRIPT_DEBUG | false
|
- | QUARKUS_LOG_LEVEL | DEBUG
|
- | JOBS_SERVICE_PERSISTENCE | postgresql
|
- | QUARKUS_DATASOURCE_DB_KIND | postgresql
|
- | QUARKUS_DATASOURCE_USERNAME | test
|
- | QUARKUS_DATASOURCE_PASSWORD | 123456
|
- | QUARKUS_DATASOURCE_JDBC_URL |
jdbc:postgresql://10.11.12.13:5432/hibernate_orm_test |
- Then container log should contain -Dquarkus.http.host=0.0.0.0
-Dquarkus.http.port=8080 -jar
"/home/kogito/bin/postgresql/quarkus-app/quarkus-run.jar"
- And container log should contain connected to
jdbc:postgresql://10.11.12.13:5432/hibernate_orm_test
diff --git
a/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-common.feature
b/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-common.feature
deleted file mode 100644
index 58fb8bea9c2..00000000000
---
a/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-common.feature
+++ /dev/null
@@ -1,31 +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.
-#
-
[email protected]/apache/incubator-kie-kogito-jobs-service-allinone
[email protected]/apache/incubator-kie-kogito-jobs-service-allinone
[email protected]/apache/incubator-kie-kogito-jobs-service-allinone
-Feature: Kogito-jobs-service common feature.
-
- Scenario: verify if the events is correctly enabled
- When container is started with env
- | variable | value |
- | SCRIPT_DEBUG | false |
- | ENABLE_EVENTS | true |
- | KOGITO_JOBS_PROPS | -Dkafka.bootstrap.servers=localhost:11111 |
- Then container log should contain localhost:11111
diff --git a/packages/kogito-jobs-service-ephemeral-image/install.js
b/packages/kogito-jobs-service-ephemeral-image/install.js
index 65a384e676f..869210319b1 100644
--- a/packages/kogito-jobs-service-ephemeral-image/install.js
+++ b/packages/kogito-jobs-service-ephemeral-image/install.js
@@ -17,50 +17,17 @@
* under the License.
*/
-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.kogitoJobsServiceEphemeralImage.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.kogitoJobsServiceEphemeralImage.registry}/${env.kogitoJobsServiceEphemeralImage.account}/${env.kogitoJobsServiceEphemeralImage.name}`;
-
-// Replace the whole string between quotes ("") with the image name
-imageYaml =
imageYaml.replace(/(?<=")(.*kogito-jobs-service-ephemeral.*)(?=")/gm, imageUrl);
+const { runKogitoImageInstall } = require("@kie/kogito-images-install-helper");
+const { env } = require("./env");
-// Write file and then rename it to match the image name
-fs.writeFileSync(originalYamlPath, imageYaml);
-fs.renameSync(originalYamlPath, path.join(resourcesPath,
`${env.kogitoJobsServiceEphemeralImage.name}-image.yaml`));
+const { buildTag, registry, account, name: imageName } =
env.kogitoJobsServiceEphemeralImage;
-// Replace image URL in .feature files
-replaceInFile.sync({
- files: ["**/*.feature"],
- from: /@docker.io\/apache\/.*/g,
- to: `@${imageUrl}`,
+runKogitoImageInstall({
+ finalImageName: "kogito-jobs-service-ephemeral",
+ imageTag: { buildTag, registry, account, name: imageName },
+ resourceDir: path.resolve(__dirname, "./resources"),
+ imagePkgDir: __dirname,
});
/// Maven app
diff --git a/packages/kogito-jobs-service-ephemeral-image/package.json
b/packages/kogito-jobs-service-ephemeral-image/package.json
index fe101aecd27..9dfa54f7ea1 100644
--- a/packages/kogito-jobs-service-ephemeral-image/package.json
+++ b/packages/kogito-jobs-service-ephemeral-image/package.json
@@ -16,7 +16,7 @@
"build:dev": "run-script-if --bool \"$(build-env containerImages.build)\"
--then \"pnpm mvn-build-app\" \"pnpm copy-assets\" \"pnpm image:build\"",
"build:prod": "pnpm build:dev && pnpm image:test",
"copy-assets": "run-script-os",
- "copy-assets:linux:darwin": "rimraf build && cp -R
./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R
resources/* build",
+ "copy-assets:linux:darwin": "rimraf build && cp -R
./node_modules/@kie-tools/sonataflow-image-common/dist build && cp -R
resources/* build",
"copy-test-assets": "run-script-os",
"copy-test-assets:linux:darwin": "cp -R test-resources/. build",
"format": "prettier --write . --ignore-path=../../.prettierignore
--ignore-path=../../.gitignore",
@@ -39,6 +39,7 @@
"@kie-tools/python-venv": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/sonataflow-image-common": "workspace:*",
+ "@kie/kogito-images-install-helper": "workspace:*",
"cross-env": "^7.0.3",
"replace-in-file": "^7.1.0",
"rimraf": "^3.0.2",
diff --git a/packages/kogito-jobs-service-postgresql-image/install.js
b/packages/kogito-jobs-service-postgresql-image/install.js
index c9e38da2aec..fe49100f9ef 100644
--- a/packages/kogito-jobs-service-postgresql-image/install.js
+++ b/packages/kogito-jobs-service-postgresql-image/install.js
@@ -17,50 +17,17 @@
* under the License.
*/
-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.kogitoJobsServicePostgresqlImage.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.kogitoJobsServicePostgresqlImage.registry}/${env.kogitoJobsServicePostgresqlImage.account}/${env.kogitoJobsServicePostgresqlImage.name}`;
-
-// Replace the whole string between quotes ("") with the image name
-imageYaml =
imageYaml.replace(/(?<=")(.*kogito-jobs-service-postgresql.*)(?=")/gm,
imageUrl);
+const { runKogitoImageInstall } = require("@kie/kogito-images-install-helper");
+const { env } = require("./env");
-// Write file and then rename it to match the image name
-fs.writeFileSync(originalYamlPath, imageYaml);
-fs.renameSync(originalYamlPath, path.join(resourcesPath,
`${env.kogitoJobsServicePostgresqlImage.name}-image.yaml`));
+const { buildTag, registry, account, name: imageName } =
env.kogitoJobsServicePostgresqlImage;
-// Replace image URL in .feature files
-replaceInFile.sync({
- files: ["**/*.feature"],
- from: /@docker.io\/apache\/.*/g,
- to: `@${imageUrl}`,
+runKogitoImageInstall({
+ finalImageName: "kogito-jobs-service-postgresql",
+ imageTag: { buildTag, registry, account, name: imageName },
+ resourceDir: path.resolve(__dirname, "./resources"),
+ imagePkgDir: __dirname,
});
/// Maven app
diff --git a/packages/kogito-jobs-service-postgresql-image/package.json
b/packages/kogito-jobs-service-postgresql-image/package.json
index 40d7746f5c5..677d8eb088c 100644
--- a/packages/kogito-jobs-service-postgresql-image/package.json
+++ b/packages/kogito-jobs-service-postgresql-image/package.json
@@ -16,7 +16,7 @@
"build:dev": "run-script-if --bool \"$(build-env containerImages.build)\"
--then \"pnpm mvn-build-app\" \"pnpm copy-assets\" \"pnpm image:build\"",
"build:prod": "pnpm build:dev && pnpm image:test",
"copy-assets": "run-script-os",
- "copy-assets:linux:darwin": "rimraf build && cp -R
./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R
resources/* build",
+ "copy-assets:linux:darwin": "rimraf build && cp -R
./node_modules/@kie-tools/sonataflow-image-common/dist build && cp -R
resources/* build",
"copy-test-assets": "run-script-os",
"copy-test-assets:linux:darwin": "cp -R test-resources/. build",
"format": "prettier --write . --ignore-path=../../.prettierignore
--ignore-path=../../.gitignore",
@@ -39,6 +39,7 @@
"@kie-tools/python-venv": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/sonataflow-image-common": "workspace:*",
+ "@kie/kogito-images-install-helper": "workspace:*",
"cross-env": "^7.0.3",
"replace-in-file": "^7.1.0",
"rimraf": "^3.0.2",
diff --git a/packages/sonataflow-builder-image/install.js
b/packages/sonataflow-builder-image/install.js
index bd2a2098f1e..520e7af09d6 100644
--- a/packages/sonataflow-builder-image/install.js
+++ b/packages/sonataflow-builder-image/install.js
@@ -17,25 +17,20 @@
* under the License.
*/
-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 { runKogitoImageInstall } = require("@kie/kogito-images-install-helper");
+const { env } = require("./env");
-const activateCmd =
- process.platform === "win32"
- ? `${pythonVenvDir}\\venv\\Scripts\\Activate.bat`
- : `. ${pythonVenvDir}/venv/bin/activate`;
+const { buildTag, registry, account, name: imageName } =
env.sonataflowBuilderImage;
-execSync(
- `${activateCmd} && \
- python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py
--bump-to ${env.sonataflowBuilderImage.buildTag} --source-folder ./resources`,
- { stdio: "inherit" }
-);
+runKogitoImageInstall({
+ finalImageName: "sonataflow-builder",
+ imageTag: { buildTag, registry, account, name: imageName },
+ resourceDir: path.resolve(__dirname, "./resources"),
+ requiresMvn: false,
+});
// Creates a symlink to the bats installation dir
try {
@@ -45,29 +40,3 @@ try {
throw err;
}
}
-
-// 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.sonataflowBuilderImage.registry}/${env.sonataflowBuilderImage.account}/${env.sonataflowBuilderImage.name}`;
-
-// Replace the whole string between quotes ("") with the image name
-imageYaml = imageYaml.replace(/(?<=")(.*sonataflow-builder.*)(?=")/gm,
imageUrl);
-
-// Write file and then rename it to match the image name
-fs.writeFileSync(originalYamlPath, imageYaml);
-fs.renameSync(originalYamlPath, path.join(resourcesPath,
`${env.sonataflowBuilderImage.name}-image.yaml`));
-
-// Replace image URL in .feature files
-replaceInFile.sync({
- files: ["**/*.feature"],
- from: /@docker.io\/apache\/.*/g,
- to: `@${imageUrl}`,
-});
diff --git a/packages/sonataflow-builder-image/package.json
b/packages/sonataflow-builder-image/package.json
index 776ca1c8adb..3cbb0d44fc1 100644
--- a/packages/sonataflow-builder-image/package.json
+++ b/packages/sonataflow-builder-image/package.json
@@ -20,7 +20,7 @@
"copy:maven-m2-repo-via-http-image--settings-xml:linux:darwin":
"M2_REPO_VIA_HTTP_URL_WITHOUT_PROTOCOL=$(docker inspect -f
'{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' m2-repo-via-http)
envsubst <
build/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst
> build/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml
&& rm
build/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst",
"copy:maven-m2-repo-via-http-image--settings-xml:win32": "echo \"Build
skipped on macOS and Windows\"",
"copy-assets": "run-script-os",
- "copy-assets:linux:darwin": "rimraf build && rsync -av --exclude '*.bats'
./node_modules/@kie-tools/sonataflow-image-common/resources/ build && cp -R
resources/* build && pnpm copy:maven-m2-repo-via-http-image--settings-xml",
+ "copy-assets:linux:darwin": "rimraf build && rsync -av --exclude '*.bats'
./node_modules/@kie-tools/sonataflow-image-common/dist/ build && cp -R
resources/* build && pnpm copy:maven-m2-repo-via-http-image--settings-xml",
"copy-test-assets": "run-script-os",
"copy-test-assets:linux:darwin": "cp -R test-resources/* build",
"format": "prettier --write . --ignore-path=../../.prettierignore
--ignore-path=../../.gitignore",
@@ -51,6 +51,7 @@
"@kie-tools/python-venv": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/sonataflow-image-common": "workspace:*",
+ "@kie/kogito-images-install-helper": "workspace:*",
"cross-env": "^7.0.3",
"replace-in-file": "^7.1.0",
"rimraf": "^3.0.2",
diff --git a/packages/sonataflow-devmode-image/install.js
b/packages/sonataflow-devmode-image/install.js
index baaa6f34bc7..a8badea6b1e 100644
--- a/packages/sonataflow-devmode-image/install.js
+++ b/packages/sonataflow-devmode-image/install.js
@@ -17,48 +17,15 @@
* under the License.
*/
-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.sonataflowDevModeImage.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.sonataflowDevModeImage.registry}/${env.sonataflowDevModeImage.account}/${env.sonataflowDevModeImage.name}`;
-
-// Replace the whole string between quotes ("") with the image name
-imageYaml = imageYaml.replace(/(?<=")(.*sonataflow-devmode.*)(?=")/gm,
imageUrl);
+const { runKogitoImageInstall } = require("@kie/kogito-images-install-helper");
+const { env } = require("./env");
-// Write file and then rename it to match the image name
-fs.writeFileSync(originalYamlPath, imageYaml);
-fs.renameSync(originalYamlPath, path.join(resourcesPath,
`${env.sonataflowDevModeImage.name}-image.yaml`));
+const { buildTag, registry, account, name: imageName } =
env.sonataflowDevModeImage;
-// Replace image URL in .feature files
-replaceInFile.sync({
- files: ["**/*.feature"],
- from: /@docker.io\/apache\/.*/g,
- to: `@${imageUrl}`,
+runKogitoImageInstall({
+ finalImageName: "sonataflow-devmode",
+ imageTag: { buildTag, registry, account, name: imageName },
+ resourceDir: path.resolve(__dirname, "./resources"),
+ requiresMvn: false,
});
diff --git a/packages/sonataflow-devmode-image/package.json
b/packages/sonataflow-devmode-image/package.json
index 3c420448732..906a7db99d4 100644
--- a/packages/sonataflow-devmode-image/package.json
+++ b/packages/sonataflow-devmode-image/package.json
@@ -20,7 +20,7 @@
"copy:maven-m2-repo-via-http-image--settings-xml:linux:darwin":
"M2_REPO_VIA_HTTP_URL_WITHOUT_PROTOCOL=$(docker inspect -f
'{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' m2-repo-via-http)
envsubst <
build/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst
> build/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml
&& rm
build/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst",
"copy:maven-m2-repo-via-http-image--settings-xml:win32": "echo \"Build
skipped on macOS and Windows\"",
"copy-assets": "run-script-os",
- "copy-assets:linux:darwin": "rimraf build && cp -R
./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R
resources/* build && pnpm copy:maven-m2-repo-via-http-image--settings-xml",
+ "copy-assets:linux:darwin": "rimraf build && cp -R
./node_modules/@kie-tools/sonataflow-image-common/dist build && cp -R
resources/* build && pnpm copy:maven-m2-repo-via-http-image--settings-xml",
"copy-test-assets": "run-script-os",
"copy-test-assets:linux:darwin": "cp -R test-resources/* build",
"format": "prettier --write . --ignore-path=../../.prettierignore
--ignore-path=../../.gitignore",
@@ -44,6 +44,7 @@
"@kie-tools/root-env": "workspace:*",
"@kie-tools/sonataflow-image-common": "workspace:*",
"@kie-tools/sonataflow-quarkus-devui": "workspace:*",
+ "@kie/kogito-images-install-helper": "workspace:*",
"cross-env": "^7.0.3",
"replace-in-file": "^7.1.0",
"rimraf": "^3.0.2",
diff --git a/packages/sonataflow-image-common/package.json
b/packages/sonataflow-image-common/package.json
index 7a830e09cac..4fca1e58fe5 100644
--- a/packages/sonataflow-image-common/package.json
+++ b/packages/sonataflow-image-common/package.json
@@ -13,9 +13,13 @@
"url": "https://github.com/apache/incubator-kie-tools/issues"
},
"scripts": {
- "build:dev": "pnpm update:quarkus:config && pnpm format && pnpm test",
+ "build:dev": "rimraf dist && pnpm update:quarkus:config && pnpm format &&
pnpm test && pnpm gen-dist",
"build:prod": "pnpm build:dev",
+ "copy-deps-dist": "mkdir -p
dist/modules/kogito-data-index-common/added/kogito-data-index-webapp && cp -r
node_modules/@kie-tools/kogito-data-index-webapp/dist/*
dist/modules/kogito-data-index-common/added/kogito-data-index-webapp/",
"format": "prettier --write .",
+ "gen-dist": "run-script-os",
+ "gen-dist:linux:darwin": "mkdir dist && cp -r resources/* dist/ && pnpm
copy-deps-dist",
+ "gen-dist:win32": "echo \"Copy is skipped in Windows\"",
"install": "node install.js",
"test": "run-script-os",
"test:linux:darwin": "run-script-if --ignore-errors \"$(build-env
tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"mkdir -p
dist-tests\" \"rm -rf dist-tests/*\" \"make -C ./resources bats\" --finally
\"touch dist-tests/report.xml\" \"mv dist-tests/report.xml
dist-tests/junit-report.xml\"",
@@ -24,9 +28,13 @@
"update:quarkus:config:linux:darwin":
"node_modules/@kie-tools/python-venv/venv/bin/python
resources/scripts/update_quarkus_config.py $(build-env
kogitoImagesCekitModules.quarkusRegistries)",
"update:quarkus:config:win32": "echo \"Update Quarkus Config is skipped on
Windows\""
},
+ "dependencies": {
+ "@kie-tools/kogito-data-index-webapp": "workspace:*"
+ },
"devDependencies": {
"@kie-tools/python-venv": "workspace:*",
"@kie-tools/root-env": "workspace:*",
+ "rimraf": "^3.0.2",
"run-script-os": "^1.1.6"
},
"kieTools": {
diff --git
a/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/configure
b/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/configure
index aa352e6cd5a..f25633d0e57 100644
---
a/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/configure
+++
b/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/configure
@@ -23,9 +23,14 @@ SCRIPT_DIR=$(dirname "${0}")
ADDED_DIR="${SCRIPT_DIR}"/added
mkdir -p "${KOGITO_HOME}"/launch
+# Web UI
+mkdir -p "${KOGITO_HOME}"/ui/
+# Protobufs cache dir
mkdir -p "${KOGITO_HOME}"/data/protobufs/
cp -v "${ADDED_DIR}"/kogito-data-index-common.sh "${KOGITO_HOME}"/launch
+# Copy UI web application
+cp -v -p "${ADDED_DIR}"/kogito-data-index-webapp/* "${KOGITO_HOME}"/ui/
chown -R ${USER_ID}:0 "${KOGITO_HOME}"
chmod -R ug+rwX "${KOGITO_HOME}"
diff --git
a/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/module.yaml
b/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/module.yaml
index c820da3bd1a..ecf0054b545 100644
---
a/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/module.yaml
+++
b/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/module.yaml
@@ -25,6 +25,9 @@ envs:
- name: "KOGITO_DATA_INDEX_QUARKUS_PROFILE"
value: "kafka-events-support"
description: "Allows to change the event connection type. The possible
values are :`kafka-events-support`(default) or `http-events-support`"
+ - name: "KOGITO_DATA_INDEX_UI_PATH"
+ value: "/home/kogito/ui/"
+ description: "Path where the Data Index WebApp UI is served"
execute:
- script: configure
diff --git a/packages/sonataflow-management-console-image/package.json
b/packages/sonataflow-management-console-image/package.json
index ab5775f0825..6b19766ba18 100644
--- a/packages/sonataflow-management-console-image/package.json
+++ b/packages/sonataflow-management-console-image/package.json
@@ -29,7 +29,7 @@
"image:cekit:build": "run-script-os",
"image:cekit:build:linux": "pnpm image:cekit:copy && pnpm
image:cekit:setup:env make -C ./dist-dev build",
"image:cekit:build:win32:darwin": "echo \"Build skipped on macOS and
Windows\"",
- "image:cekit:copy": "cp -R
./node_modules/@kie-tools/sonataflow-image-common/resources/* ./dist-dev/ && cp
-R resources/* ./dist-dev/",
+ "image:cekit:copy": "cp -R
./node_modules/@kie-tools/sonataflow-image-common/dist/* ./dist-dev/ && cp -R
resources/* ./dist-dev/",
"image:cekit:setup:env": ".
./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env
KOGITO_IMAGE_REGISTRY=$(build-env sonataflowManagementConsoleImageEnv.registry)
KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env
sonataflowManagementConsoleImageEnv.account) KOGITO_IMAGE_NAME=$(build-env
sonataflowManagementConsoleImageEnv.name) KOGITO_IMAGE_TAG=$(build-env
sonataflowManagementConsoleImageEnv.buildTag)
QUARKUS_PLATFORM_GROUPID=$(build-env kogitoImagesCekitModules.quarkusGroupId)
[...]
"image:test": "run-script-if --ignore-errors \"$(build-env
tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then
\"mkdir -p dist-dev/target/test/results\" \"run-script-os\" --finally \"cp -R
dist-dev/target/test/results dist-tests-e2e/\"",
"image:test:darwin:win32": "echo \"Tests skipped on macOS and Windows\"",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 63cf57adb4b..752cd57c133 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -7370,6 +7370,9 @@ importers:
'@kie-tools/sonataflow-image-common':
specifier: workspace:*
version: link:../sonataflow-image-common
+ '@kie/kogito-images-install-helper':
+ specifier: workspace:*
+ version: link:../kogito-images-install-helper
cross-env:
specifier: ^7.0.3
version: 7.0.3
@@ -7398,6 +7401,9 @@ importers:
'@kie-tools/sonataflow-image-common':
specifier: workspace:*
version: link:../sonataflow-image-common
+ '@kie/kogito-images-install-helper':
+ specifier: workspace:*
+ version: link:../kogito-images-install-helper
cross-env:
specifier: ^7.0.3
version: 7.0.3
@@ -7426,6 +7432,9 @@ importers:
'@kie-tools/sonataflow-image-common':
specifier: workspace:*
version: link:../sonataflow-image-common
+ '@kie/kogito-images-install-helper':
+ specifier: workspace:*
+ version: link:../kogito-images-install-helper
cross-env:
specifier: ^7.0.3
version: 7.0.3
@@ -7439,6 +7448,39 @@ importers:
specifier: ^1.1.6
version: 1.1.6
+ packages/kogito-data-index-webapp:
+ devDependencies:
+ '@kie-tools-core/webpack-base':
+ specifier: workspace:*
+ version: link:../webpack-base
+ '@kie-tools/root-env':
+ specifier: workspace:*
+ version: link:../root-env
+ copy-webpack-plugin:
+ specifier: ^11.0.0
+ version: 11.0.0([email protected](@swc/[email protected])([email protected]))
+ jest:
+ specifier: ^29.7.0
+ version:
29.7.0(@types/[email protected])([email protected])([email protected](@swc/[email protected])(@types/[email protected])([email protected]))
+ rimraf:
+ specifier: ^3.0.2
+ version: 3.0.2
+ ts-node:
+ specifier: ^10.9.2
+ version:
10.9.2(@swc/[email protected])(@types/[email protected])([email protected])
+ webpack:
+ specifier: ^5.94.0
+ version: 5.94.0(@swc/[email protected])([email protected])
+ webpack-cli:
+ specifier: ^4.10.0
+ version: 4.10.0([email protected])([email protected])
+ webpack-dev-server:
+ specifier: ^4.15.1
+ version: 4.15.1([email protected])([email protected])
+ webpack-merge:
+ specifier: ^5.9.0
+ version: 5.10.0
+
packages/kogito-db-migrator-tool:
dependencies:
'@kie-tools/maven-base':
@@ -7460,16 +7502,19 @@ importers:
'@kie-tools/kogito-db-migrator-tool':
specifier: workspace:*
version: link:../kogito-db-migrator-tool
+ '@kie-tools/sonataflow-image-common':
+ specifier: workspace:*
+ version: link:../sonataflow-image-common
+ devDependencies:
'@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':
+ '@kie/kogito-images-install-helper':
specifier: workspace:*
- version: link:../sonataflow-image-common
- devDependencies:
+ version: link:../kogito-images-install-helper
cross-env:
specifier: ^7.0.3
version: 7.0.3
@@ -7483,6 +7528,24 @@ importers:
specifier: ^1.1.6
version: 1.1.6
+ packages/kogito-images-install-helper:
+ dependencies:
+ '@kie-tools/maven-base':
+ specifier: workspace:*
+ version: link:../maven-base
+ '@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
+ replace-in-file:
+ specifier: ^7.1.0
+ version: 7.1.0
+
packages/kogito-jit-runner-image:
dependencies:
'@kie-tools/maven-base':
@@ -7498,6 +7561,9 @@ importers:
'@kie-tools/sonataflow-image-common':
specifier: workspace:*
version: link:../sonataflow-image-common
+ '@kie/kogito-images-install-helper':
+ specifier: workspace:*
+ version: link:../kogito-images-install-helper
cross-env:
specifier: ^7.0.3
version: 7.0.3
@@ -7554,6 +7620,9 @@ importers:
'@kie-tools/sonataflow-image-common':
specifier: workspace:*
version: link:../sonataflow-image-common
+ '@kie/kogito-images-install-helper':
+ specifier: workspace:*
+ version: link:../kogito-images-install-helper
cross-env:
specifier: ^7.0.3
version: 7.0.3
@@ -7582,6 +7651,9 @@ importers:
'@kie-tools/sonataflow-image-common':
specifier: workspace:*
version: link:../sonataflow-image-common
+ '@kie/kogito-images-install-helper':
+ specifier: workspace:*
+ version: link:../kogito-images-install-helper
cross-env:
specifier: ^7.0.3
version: 7.0.3
@@ -11950,6 +12022,9 @@ importers:
'@kie-tools/sonataflow-image-common':
specifier: workspace:*
version: link:../sonataflow-image-common
+ '@kie/kogito-images-install-helper':
+ specifier: workspace:*
+ version: link:../kogito-images-install-helper
cross-env:
specifier: ^7.0.3
version: 7.0.3
@@ -12194,6 +12269,9 @@ importers:
'@kie-tools/sonataflow-quarkus-devui':
specifier: workspace:*
version: link:../sonataflow-quarkus-devui
+ '@kie/kogito-images-install-helper':
+ specifier: workspace:*
+ version: link:../kogito-images-install-helper
cross-env:
specifier: ^7.0.3
version: 7.0.3
@@ -12208,6 +12286,10 @@ importers:
version: 1.1.6
packages/sonataflow-image-common:
+ dependencies:
+ '@kie-tools/kogito-data-index-webapp':
+ specifier: workspace:*
+ version: link:../kogito-data-index-webapp
devDependencies:
'@kie-tools/python-venv':
specifier: workspace:*
@@ -12215,6 +12297,9 @@ importers:
'@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
diff --git a/repo/graph.dot b/repo/graph.dot
index 5eb28eae501..85742a1913b 100644
--- a/repo/graph.dot
+++ b/repo/graph.dot
@@ -97,7 +97,6 @@ digraph G {
"@kie-tools/i18n-common-dictionary" [ color = "blue", fontcolor = "blue",
style = "rounded" ];
"@kie-tools/dashbuilder-viewer-image" [ color = "black", fontcolor =
"black", style = "dashed, rounded" ];
"@kie-tools/dashbuilder-viewer-image-env" [ color = "black", fontcolor =
"black", style = "dashed, rounded" ];
- "@kie-tools/data-index-webapp" [ color = "blue", fontcolor = "blue", style =
"rounded" ];
"@kie-tools/dev-deployment-base-image" [ color = "black", fontcolor =
"black", style = "dashed, rounded" ];
"@kie-tools/dev-deployment-upload-service" [ color = "black", fontcolor =
"black", style = "dashed, rounded" ];
"@kie-tools/dev-deployment-dmn-form-webapp" [ color = "black", fontcolor =
"black", style = "dashed, rounded" ];
@@ -154,13 +153,14 @@ digraph G {
"@kie-tools/kn-plugin-workflow" [ color = "black", fontcolor = "black",
style = "dashed, rounded" ];
"@kie-tools/sonataflow-operator" [ color = "black", fontcolor = "black",
style = "dashed, rounded" ];
"@kie/kogito-base-builder-image" [ color = "black", fontcolor = "black",
style = "dashed, rounded" ];
- "@kie-tools/sonataflow-image-common" [ color = "black", fontcolor = "black",
style = "dashed, rounded" ];
+ "@kie/kogito-images-install-helper" [ 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-data-index-webapp" [ color = "blue", fontcolor = "blue",
style = "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-tools/sonataflow-image-common" [ 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" ];
"@kie/kogito-jobs-service-postgresql-image" [ color = "black", fontcolor =
"black", style = "dashed, rounded" ];
"@kie-tools/runtime-tools-management-console-webapp" [ color = "blue",
fontcolor = "blue", style = "rounded" ];
@@ -355,7 +355,6 @@ digraph G {
"@kie-tools/dashbuilder-viewer-image" ->
"@kie-tools/dashbuilder-viewer-deployment-webapp" [ style = "dashed", color =
"black" ];
"@kie-tools/dashbuilder-viewer-image" ->
"@kie-tools/dashbuilder-viewer-image-env" [ style = "dashed", color = "black" ];
"@kie-tools/dashbuilder-viewer-image-env" -> "@kie-tools/root-env" [ style =
"dashed", color = "black" ];
- "@kie-tools/data-index-webapp" -> "@kie-tools-core/webpack-base" [ style =
"dashed", color = "blue" ];
"@kie-tools/dev-deployment-base-image" -> "@kie-tools/maven-base" [ style =
"solid", color = "black" ];
"@kie-tools/dev-deployment-base-image" ->
"@kie-tools/dev-deployment-upload-service" [ style = "dashed", color = "black"
];
"@kie-tools/dev-deployment-base-image" -> "@kie-tools/image-builder" [ style
= "dashed", color = "black" ];
@@ -476,22 +475,18 @@ digraph G {
"@kie-tools/kie-sandbox-webapp-image" -> "@kie-tools/online-editor" [ style
= "solid", color = "black" ];
"@kie-tools/kie-sandbox-webapp-image" -> "@kie-tools/image-builder" [ style
= "dashed", color = "black" ];
"@kie-tools/kn-plugin-workflow" -> "@kie-tools/sonataflow-operator" [ style
= "dashed", color = "black" ];
- "@kie/kogito-base-builder-image" -> "@kie-tools/sonataflow-image-common" [
style = "dashed", color = "black" ];
- "@kie/kogito-data-index-ephemeral-image" -> "@kie-tools/maven-base" [ style
= "solid", color = "black" ];
- "@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
= "solid", color = "black" ];
- "@kie/kogito-data-index-postgresql-image" ->
"@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
+ "@kie/kogito-base-builder-image" -> "@kie/kogito-images-install-helper" [
style = "dashed", color = "black" ];
+ "@kie/kogito-data-index-ephemeral-image" ->
"@kie/kogito-images-install-helper" [ style = "dashed", color = "black" ];
+ "@kie/kogito-data-index-postgresql-image" ->
"@kie/kogito-images-install-helper" [ style = "dashed", color = "black" ];
+ "@kie-tools/kogito-data-index-webapp" -> "@kie-tools-core/webpack-base" [
style = "dashed", color = "blue" ];
"@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 = "solid",
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
= "solid", color = "black" ];
- "@kie/kogito-jobs-service-allinone-image" ->
"@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
- "@kie/kogito-jobs-service-ephemeral-image" -> "@kie-tools/maven-base" [
style = "solid", color = "black" ];
- "@kie/kogito-jobs-service-ephemeral-image" ->
"@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
- "@kie/kogito-jobs-service-postgresql-image" -> "@kie-tools/maven-base" [
style = "solid", color = "black" ];
- "@kie/kogito-jobs-service-postgresql-image" ->
"@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
+ "@kie-tools/kogito-db-migrator-tool-image" ->
"@kie/kogito-images-install-helper" [ style = "dashed", color = "black" ];
+ "@kie/kogito-images-install-helper" -> "@kie-tools/maven-base" [ style =
"solid", color = "black" ];
+ "@kie/kogito-images-install-helper" -> "@kie-tools/sonataflow-image-common"
[ style = "solid", color = "black" ];
+ "@kie/kogito-jit-runner-image" -> "@kie/kogito-images-install-helper" [
style = "dashed", color = "black" ];
+ "@kie/kogito-jobs-service-ephemeral-image" ->
"@kie/kogito-images-install-helper" [ style = "dashed", color = "black" ];
+ "@kie/kogito-jobs-service-postgresql-image" ->
"@kie/kogito-images-install-helper" [ style = "dashed", color = "black" ];
"@kie-tools/kogito-management-console" -> "@kie-tools/image-builder" [ style
= "dashed", color = "black" ];
"@kie-tools/kogito-management-console" -> "@kie-tools/image-env-to-json" [
style = "dashed", color = "black" ];
"@kie-tools/kogito-management-console" ->
"@kie-tools/runtime-tools-management-console-webapp" [ style = "dashed", color
= "black" ];
@@ -627,9 +622,8 @@ digraph G {
"swf-vscode-extension" -> "@kie-tools-core/webpack-base" [ style = "dashed",
color = "blue" ];
"swf-vscode-extension" ->
"@kie-tools/serverless-workflow-diagram-editor-assets" [ style = "dashed",
color = "blue" ];
"swf-vscode-extension" -> "@kie-tools/vscode-extension-common-test-helpers"
[ style = "dashed", color = "blue" ];
- "@kie-tools/sonataflow-builder-image" -> "@kie-tools/maven-base" [ style =
"solid", color = "black" ];
"@kie-tools/sonataflow-builder-image" ->
"@kie-tools/maven-m2-repo-via-http-image" [ style = "dashed", color = "black" ];
- "@kie-tools/sonataflow-builder-image" ->
"@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
+ "@kie-tools/sonataflow-builder-image" -> "@kie/kogito-images-install-helper"
[ style = "dashed", color = "black" ];
"sonataflow-deployment-webapp" -> "@kie-tools-core/react-hooks" [ style =
"solid", color = "blue" ];
"sonataflow-deployment-webapp" ->
"@kie-tools/runtime-tools-shared-webapp-components" [ style = "solid", color =
"blue" ];
"sonataflow-deployment-webapp" ->
"@kie-tools/runtime-tools-swf-webapp-components" [ style = "solid", color =
"blue" ];
@@ -637,10 +631,10 @@ digraph G {
"@kie-tools/sonataflow-dev-app" -> "@kie-tools/eslint" [ style = "dashed",
color = "black" ];
"@kie-tools/sonataflow-dev-app" -> "@kie-tools/root-env" [ style = "dashed",
color = "black" ];
"@kie-tools/sonataflow-devmode-image" ->
"@kie-tools/maven-m2-repo-via-http-image" [ style = "dashed", color = "black" ];
- "@kie-tools/sonataflow-devmode-image" ->
"@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
"@kie-tools/sonataflow-devmode-image" ->
"@kie-tools/sonataflow-quarkus-devui" [ style = "dashed", color = "black" ];
+ "@kie-tools/sonataflow-devmode-image" -> "@kie/kogito-images-install-helper"
[ style = "dashed", color = "black" ];
+ "@kie-tools/sonataflow-image-common" ->
"@kie-tools/kogito-data-index-webapp" [ style = "solid", color = "black" ];
"@kie-tools/sonataflow-image-common" -> "@kie-tools/python-venv" [ style =
"dashed", color = "black" ];
- "@kie-tools/sonataflow-image-common" -> "@kie-tools/root-env" [ style =
"dashed", color = "black" ];
"@kie-tools/sonataflow-management-console-image" ->
"@kie-tools/image-env-to-json" [ style = "dashed", color = "black" ];
"@kie-tools/sonataflow-management-console-image" ->
"@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
"@kie-tools/sonataflow-management-console-image" ->
"@kie-tools/sonataflow-management-console-image-env" [ style = "dashed", color
= "black" ];
diff --git a/repo/graph.json b/repo/graph.json
index a77841d69aa..ec60734d3f4 100644
--- a/repo/graph.json
+++ b/repo/graph.json
@@ -145,7 +145,6 @@
{ "id": "@kie-tools-core/i18n" },
{ "id": "@kie-tools/dashbuilder-viewer-image" },
{ "id": "@kie-tools/dashbuilder-viewer-image-env" },
- { "id": "@kie-tools/data-index-webapp" },
{ "id": "@kie-tools/dev-deployment-base-image" },
{ "id": "@kie-tools/dev-deployment-upload-service" },
{ "id": "@kie-tools/dev-deployment-dmn-form-webapp" },
@@ -198,11 +197,12 @@
{ "id": "@kie/kogito-jobs-service-ephemeral-image" },
{ "id": "@kie/kogito-jobs-service-postgresql-image" },
{ "id": "@kie/kogito-base-builder-image" },
+ { "id": "@kie/kogito-images-install-helper" },
{ "id": "@kie-tools/sonataflow-image-common" },
- { "id": "@kie-tools/python-venv" },
+ { "id": "@kie-tools/kogito-data-index-webapp" },
{ "id": "@kie-tools/kogito-db-migrator-tool" },
+ { "id": "@kie-tools/python-venv" },
{ "id": "@kie/kogito-jit-runner-image" },
- { "id": "@kie/kogito-jobs-service-allinone-image" },
{ "id": "@kie-tools/unitables" },
{ "id": "pmml-vscode-extension" },
{ "id": "@kie-tools/runtime-tools-components" },
@@ -1499,11 +1499,6 @@
"target": "@kie-tools/root-env",
"weight": 1
},
- {
- "source": "@kie-tools/data-index-webapp",
- "target": "@kie-tools-core/webpack-base",
- "weight": 1
- },
{
"source": "@kie-tools/dev-deployment-base-image",
"target": "@kie-tools/maven-base",
@@ -2081,12 +2076,7 @@
},
{
"source": "@kie-tools/kogito-db-migrator-tool-image",
- "target": "@kie-tools/sonataflow-image-common",
- "weight": 1
- },
- {
- "source": "@kie-tools/sonataflow-builder-image",
- "target": "@kie-tools/maven-base",
+ "target": "@kie/kogito-images-install-helper",
"weight": 1
},
{
@@ -2096,7 +2086,7 @@
},
{
"source": "@kie-tools/sonataflow-builder-image",
- "target": "@kie-tools/sonataflow-image-common",
+ "target": "@kie/kogito-images-install-helper",
"weight": 1
},
{
@@ -2106,57 +2096,52 @@
},
{
"source": "@kie-tools/sonataflow-devmode-image",
- "target": "@kie-tools/sonataflow-image-common",
+ "target": "@kie-tools/sonataflow-quarkus-devui",
"weight": 1
},
{
"source": "@kie-tools/sonataflow-devmode-image",
- "target": "@kie-tools/sonataflow-quarkus-devui",
+ "target": "@kie/kogito-images-install-helper",
"weight": 1
},
{
"source": "@kie/kogito-data-index-ephemeral-image",
- "target": "@kie-tools/maven-base",
- "weight": 1
- },
- {
- "source": "@kie/kogito-data-index-ephemeral-image",
- "target": "@kie-tools/sonataflow-image-common",
+ "target": "@kie/kogito-images-install-helper",
"weight": 1
},
{
"source": "@kie/kogito-data-index-postgresql-image",
- "target": "@kie-tools/maven-base",
+ "target": "@kie/kogito-images-install-helper",
"weight": 1
},
{
- "source": "@kie/kogito-data-index-postgresql-image",
- "target": "@kie-tools/sonataflow-image-common",
+ "source": "@kie/kogito-jobs-service-ephemeral-image",
+ "target": "@kie/kogito-images-install-helper",
"weight": 1
},
{
- "source": "@kie/kogito-jobs-service-ephemeral-image",
- "target": "@kie-tools/maven-base",
+ "source": "@kie/kogito-jobs-service-postgresql-image",
+ "target": "@kie/kogito-images-install-helper",
"weight": 1
},
{
- "source": "@kie/kogito-jobs-service-ephemeral-image",
- "target": "@kie-tools/sonataflow-image-common",
+ "source": "@kie/kogito-base-builder-image",
+ "target": "@kie/kogito-images-install-helper",
"weight": 1
},
{
- "source": "@kie/kogito-jobs-service-postgresql-image",
+ "source": "@kie/kogito-images-install-helper",
"target": "@kie-tools/maven-base",
"weight": 1
},
{
- "source": "@kie/kogito-jobs-service-postgresql-image",
+ "source": "@kie/kogito-images-install-helper",
"target": "@kie-tools/sonataflow-image-common",
"weight": 1
},
{
- "source": "@kie/kogito-base-builder-image",
- "target": "@kie-tools/sonataflow-image-common",
+ "source": "@kie-tools/sonataflow-image-common",
+ "target": "@kie-tools/kogito-data-index-webapp",
"weight": 1
},
{
@@ -2165,8 +2150,8 @@
"weight": 1
},
{
- "source": "@kie-tools/sonataflow-image-common",
- "target": "@kie-tools/root-env",
+ "source": "@kie-tools/kogito-data-index-webapp",
+ "target": "@kie-tools-core/webpack-base",
"weight": 1
},
{
@@ -2176,22 +2161,7 @@
},
{
"source": "@kie/kogito-jit-runner-image",
- "target": "@kie-tools/maven-base",
- "weight": 1
- },
- {
- "source": "@kie/kogito-jit-runner-image",
- "target": "@kie-tools/sonataflow-image-common",
- "weight": 1
- },
- {
- "source": "@kie/kogito-jobs-service-allinone-image",
- "target": "@kie-tools/maven-base",
- "weight": 1
- },
- {
- "source": "@kie/kogito-jobs-service-allinone-image",
- "target": "@kie-tools/sonataflow-image-common",
+ "target": "@kie/kogito-images-install-helper",
"weight": 1
},
{
@@ -2862,7 +2832,6 @@
["@kie-tools/dashbuilder-viewer-deployment-webapp",
"packages/dashbuilder-viewer-deployment-webapp"],
["@kie-tools/dashbuilder-viewer-image",
"packages/dashbuilder-viewer-image"],
["@kie-tools/dashbuilder-viewer-image-env",
"packages/dashbuilder-viewer-image-env"],
- ["@kie-tools/data-index-webapp", "packages/data-index-webapp"],
["@kie-tools/dev-deployment-base-image",
"packages/dev-deployment-base-image"],
["@kie-tools/dev-deployment-dmn-form-webapp",
"packages/dev-deployment-dmn-form-webapp"],
["@kie-tools/dev-deployment-dmn-form-webapp-image",
"packages/dev-deployment-dmn-form-webapp-image"],
@@ -2920,10 +2889,11 @@
["@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-data-index-webapp",
"packages/kogito-data-index-webapp"],
["@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-images-install-helper",
"packages/kogito-images-install-helper"],
["@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"],
["@kie/kogito-jobs-service-postgresql-image",
"packages/kogito-jobs-service-postgresql-image"],
["@kie-tools/kogito-management-console",
"packages/kogito-management-console"],
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]