diff --git a/packages/kogito-base-builder-image/env/index.js b/packages/kogito-base-builder-image/env/index.js index c9e804e2c1a..b81f7a5e9ac 100644 --- a/packages/kogito-base-builder-image/env/index.js +++ b/packages/kogito-base-builder-image/env/index.js @@ -20,8 +20,9 @@ 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], { +module.exports = composeEnv([rootEnv, sonataflowImageCommonEnv], { vars: varsWithName({ KOGITO_BASE_BUILDER_IMAGE__registry: { default: "docker.io", diff --git a/packages/kogito-base-builder-image/package.json b/packages/kogito-base-builder-image/package.json index 806db506377..da44bf68816 100644 --- a/packages/kogito-base-builder-image/package.json +++ b/packages/kogito-base-builder-image/package.json @@ -25,7 +25,7 @@ "image:test:darwin:linux": "pnpm setup:env make -C ./build test-image", "image:test:win32": "echo \"Tests skipped on Windows\"", "install": "node install.js && pnpm format", - "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoBaseBuilderImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoBaseBuilderImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoBaseBuilderImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoBaseBuilderImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)" + "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoBaseBuilderImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoBaseBuilderImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoBaseBuilderImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoBaseBuilderImage.buildTag) QUARKUS_PLATFORM_GROUPID=$(build-env kogitoImagesCekitModules.quarkusGroupId) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)" }, "devDependencies": { "@kie-tools/python-venv": "workspace:*", diff --git a/packages/kogito-data-index-ephemeral-image/env/index.js b/packages/kogito-data-index-ephemeral-image/env/index.js index ea84bbde4e6..dac66a5d91b 100644 --- a/packages/kogito-data-index-ephemeral-image/env/index.js +++ b/packages/kogito-data-index-ephemeral-image/env/index.js @@ -20,8 +20,9 @@ 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], { +module.exports = composeEnv([rootEnv, sonataflowImageCommonEnv], { vars: varsWithName({ KOGITO_DATA_INDEX_EPHEMERAL_IMAGE__registry: { default: "docker.io", diff --git a/packages/kogito-data-index-ephemeral-image/package.json b/packages/kogito-data-index-ephemeral-image/package.json index 6cc2887dec4..08f12e9cba1 100644 --- a/packages/kogito-data-index-ephemeral-image/package.json +++ b/packages/kogito-data-index-ephemeral-image/package.json @@ -30,7 +30,7 @@ "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 kogitoDataIndexEphemeralImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoDataIndexEphemeralImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoDataIndexEphemeralImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoDataIndexEphemeralImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)" + "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoDataIndexEphemeralImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoDataIndexEphemeralImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoDataIndexEphemeralImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoDataIndexEphemeralImage.buildTag) QUARKUS_PLATFORM_GROUPID=$(build-env kogitoImagesCekitModules.quarkusGroupId) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)" }, "devDependencies": { "@kie-tools/maven-base": "workspace:*", diff --git a/packages/kogito-data-index-postgresql-image/env/index.js b/packages/kogito-data-index-postgresql-image/env/index.js index 2b6e41af30d..a886932bd53 100644 --- a/packages/kogito-data-index-postgresql-image/env/index.js +++ b/packages/kogito-data-index-postgresql-image/env/index.js @@ -20,8 +20,9 @@ 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], { +module.exports = composeEnv([rootEnv, sonataflowImageCommonEnv], { vars: varsWithName({ KOGITO_DATA_INDEX_POSTGRESQL_IMAGE__registry: { default: "docker.io", diff --git a/packages/kogito-data-index-postgresql-image/package.json b/packages/kogito-data-index-postgresql-image/package.json index 92fbd5c800e..f1dfdc58d14 100644 --- a/packages/kogito-data-index-postgresql-image/package.json +++ b/packages/kogito-data-index-postgresql-image/package.json @@ -30,7 +30,7 @@ "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 kogitoDataIndexPostgresqlImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoDataIndexPostgresqlImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoDataIndexPostgresqlImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoDataIndexPostgresqlImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)" + "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoDataIndexPostgresqlImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoDataIndexPostgresqlImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoDataIndexPostgresqlImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoDataIndexPostgresqlImage.buildTag) QUARKUS_PLATFORM_GROUPID=$(build-env kogitoImagesCekitModules.quarkusGroupId) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)" }, "devDependencies": { "@kie-tools/maven-base": "workspace:*", diff --git a/packages/kogito-jit-runner-image/env/index.js b/packages/kogito-jit-runner-image/env/index.js index a7772148f10..c5429d19a4d 100644 --- a/packages/kogito-jit-runner-image/env/index.js +++ b/packages/kogito-jit-runner-image/env/index.js @@ -20,8 +20,9 @@ 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], { +module.exports = composeEnv([rootEnv, sonataflowImageCommonEnv], { vars: varsWithName({ KOGITO_JIT_RUNNER_IMAGE__registry: { default: "docker.io", diff --git a/packages/kogito-jit-runner-image/package.json b/packages/kogito-jit-runner-image/package.json index dc1def35950..ce4b3dbb953 100644 --- a/packages/kogito-jit-runner-image/package.json +++ b/packages/kogito-jit-runner-image/package.json @@ -30,7 +30,7 @@ "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 kogitoJitRunnerImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoJitRunnerImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoJitRunnerImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoJitRunnerImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)" + "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoJitRunnerImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoJitRunnerImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoJitRunnerImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoJitRunnerImage.buildTag) QUARKUS_PLATFORM_GROUPID=$(build-env kogitoImagesCekitModules.quarkusGroupId) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)" }, "devDependencies": { "@kie-tools/maven-base": "workspace:*", diff --git a/packages/kogito-jobs-service-allinone-image/env/index.js b/packages/kogito-jobs-service-allinone-image/env/index.js index dd1f166123d..5cd647c4bc8 100644 --- a/packages/kogito-jobs-service-allinone-image/env/index.js +++ b/packages/kogito-jobs-service-allinone-image/env/index.js @@ -20,8 +20,9 @@ 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], { +module.exports = composeEnv([rootEnv, sonataflowImageCommonEnv], { vars: varsWithName({ KOGITO_JOBS_SERVICE_ALLINONE_IMAGE__registry: { default: "docker.io", diff --git a/packages/kogito-jobs-service-allinone-image/package.json b/packages/kogito-jobs-service-allinone-image/package.json index 132b3b59afd..9dbfbdcfd20 100644 --- a/packages/kogito-jobs-service-allinone-image/package.json +++ b/packages/kogito-jobs-service-allinone-image/package.json @@ -30,7 +30,7 @@ "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_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)" + "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=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)" }, "devDependencies": { "@kie-tools/maven-base": "workspace:*", diff --git a/packages/kogito-jobs-service-ephemeral-image/env/index.js b/packages/kogito-jobs-service-ephemeral-image/env/index.js index fdd58dfdd07..bd8561dea8f 100644 --- a/packages/kogito-jobs-service-ephemeral-image/env/index.js +++ b/packages/kogito-jobs-service-ephemeral-image/env/index.js @@ -20,8 +20,9 @@ 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], { +module.exports = composeEnv([rootEnv, sonataflowImageCommonEnv], { vars: varsWithName({ KOGITO_JOBS_SERVICE_EPHEMERAL_IMAGE__registry: { default: "docker.io", diff --git a/packages/kogito-jobs-service-ephemeral-image/package.json b/packages/kogito-jobs-service-ephemeral-image/package.json index bf9c76b7c8a..e6296250270 100644 --- a/packages/kogito-jobs-service-ephemeral-image/package.json +++ b/packages/kogito-jobs-service-ephemeral-image/package.json @@ -30,7 +30,7 @@ "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 kogitoJobsServiceEphemeralImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoJobsServiceEphemeralImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoJobsServiceEphemeralImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoJobsServiceEphemeralImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)" + "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoJobsServiceEphemeralImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoJobsServiceEphemeralImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoJobsServiceEphemeralImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoJobsServiceEphemeralImage.buildTag) QUARKUS_PLATFORM_GROUPID=$(build-env kogitoImagesCekitModules.quarkusGroupId) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)" }, "devDependencies": { "@kie-tools/maven-base": "workspace:*", diff --git a/packages/kogito-jobs-service-postgresql-image/env/index.js b/packages/kogito-jobs-service-postgresql-image/env/index.js index 538378a7353..f4f843b1e06 100644 --- a/packages/kogito-jobs-service-postgresql-image/env/index.js +++ b/packages/kogito-jobs-service-postgresql-image/env/index.js @@ -20,8 +20,9 @@ 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], { +module.exports = composeEnv([rootEnv, sonataflowImageCommonEnv], { vars: varsWithName({ KOGITO_JOBS_SERVICE_POSTGRESQL_IMAGE__registry: { default: "docker.io", diff --git a/packages/kogito-jobs-service-postgresql-image/package.json b/packages/kogito-jobs-service-postgresql-image/package.json index cb22dbfa6f1..1f55b59fd8f 100644 --- a/packages/kogito-jobs-service-postgresql-image/package.json +++ b/packages/kogito-jobs-service-postgresql-image/package.json @@ -30,7 +30,7 @@ "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 kogitoJobsServicePostgresqlImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoJobsServicePostgresqlImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoJobsServicePostgresqlImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoJobsServicePostgresqlImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)" + "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoJobsServicePostgresqlImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoJobsServicePostgresqlImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoJobsServicePostgresqlImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoJobsServicePostgresqlImage.buildTag) QUARKUS_PLATFORM_GROUPID=$(build-env kogitoImagesCekitModules.quarkusGroupId) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)" }, "devDependencies": { "@kie-tools/maven-base": "workspace:*", diff --git a/packages/sonataflow-builder-image/env/index.js b/packages/sonataflow-builder-image/env/index.js index 4ff09d9fc35..3b70dfa6780 100644 --- a/packages/sonataflow-builder-image/env/index.js +++ b/packages/sonataflow-builder-image/env/index.js @@ -24,8 +24,9 @@ const { } = require("@kie-tools/maven-m2-repo-via-http-image/env"); const rootEnv = require("@kie-tools/root-env/env"); +const sonataflowImageCommonEnv = require("@kie-tools/sonataflow-image-common/env"); -module.exports = composeEnv([rootEnv], { +module.exports = composeEnv([rootEnv, sonataflowImageCommonEnv], { vars: varsWithName({ SONATAFLOW_BUILDER_IMAGE__registry: { default: "docker.io", diff --git a/packages/sonataflow-builder-image/package.json b/packages/sonataflow-builder-image/package.json index a0378e31d7a..c2bb075a731 100644 --- a/packages/sonataflow-builder-image/package.json +++ b/packages/sonataflow-builder-image/package.json @@ -33,7 +33,7 @@ "install": "node install.js && pnpm format", "m2-repo-via-http:container:kill": "(docker container kill m2-repo-via-http || true) && (docker container rm m2-repo-via-http || true)", "m2-repo-via-http:container:run": "(pnpm m2-repo-via-http:container:kill || true) && docker run --name m2-repo-via-http -v \"$(mvn help:evaluate -Dexpression=settings.localRepository -q -DforceStdout):/var/www/html\" -dit $(build-env sonataflowBuilderImage.dev.mavenM2RepoViaHttpImage)", - "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env sonataflowBuilderImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env sonataflowBuilderImage.account) KOGITO_IMAGE_NAME=$(build-env sonataflowBuilderImage.name) KOGITO_IMAGE_TAG=$(build-env sonataflowBuilderImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)", + "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env sonataflowBuilderImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env sonataflowBuilderImage.account) KOGITO_IMAGE_NAME=$(build-env sonataflowBuilderImage.name) KOGITO_IMAGE_TAG=$(build-env sonataflowBuilderImage.buildTag) QUARKUS_PLATFORM_GROUPID=$(build-env kogitoImagesCekitModules.quarkusGroupId) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito)", "test": "run-script-os", "test:cleanup": "mv dist-tests/report.xml dist-tests/junit-report.xml || true", "test:linux:darwin": "run-script-if --bool \"$(build-env tests.run)\" --then \"pnpm test:setup\" \"pnpm test:run\" --finally \"pnpm test:cleanup\"", diff --git a/packages/sonataflow-devmode-image/env/index.js b/packages/sonataflow-devmode-image/env/index.js index 2d22f206f0d..1b2d617fda1 100644 --- a/packages/sonataflow-devmode-image/env/index.js +++ b/packages/sonataflow-devmode-image/env/index.js @@ -19,6 +19,7 @@ const { varsWithName, composeEnv, getOrDefault } = require("@kie-tools-scripts/build-env"); const sonataFlowQuarkusDevUiEnv = require("@kie-tools/sonataflow-quarkus-devui/env"); +const sonataflowImageCommonEnv = require("@kie-tools/sonataflow-image-common/env"); const { env: { mavenM2RepoViaHttpImage: mavenM2RepoViaHttpImageEnv }, @@ -26,7 +27,7 @@ const { const rootEnv = require("@kie-tools/root-env/env"); -module.exports = composeEnv([rootEnv], { +module.exports = composeEnv([rootEnv, sonataflowImageCommonEnv], { vars: varsWithName({ SONATAFLOW_DEVMODE_IMAGE__registry: { default: "docker.io", diff --git a/packages/sonataflow-devmode-image/package.json b/packages/sonataflow-devmode-image/package.json index f34cd49c846..3c420448732 100644 --- a/packages/sonataflow-devmode-image/package.json +++ b/packages/sonataflow-devmode-image/package.json @@ -34,7 +34,7 @@ "m2-repo-via-http:container:kill": "(docker container kill m2-repo-via-http || true) && (docker container rm m2-repo-via-http || true)", "m2-repo-via-http:container:prepare-m2-repo-volume": "node -e 'require(`@kie-tools/maven-base`).prepareHardLinkedM2ForPackage(`./dist/tmp-m2/repository`, `./node_modules/@kie-tools/sonataflow-quarkus-devui`)'", "m2-repo-via-http:container:run": "(pnpm m2-repo-via-http:container:kill || true) && pnpm m2-repo-via-http:container:prepare-m2-repo-volume && docker run --name m2-repo-via-http -v \"./dist/tmp-m2/repository:/var/www/html\" -dit $(build-env sonataflowDevModeImage.dev.mavenM2RepoViaHttpImage)", - "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env sonataflowDevModeImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env sonataflowDevModeImage.account) KOGITO_IMAGE_NAME=$(build-env sonataflowDevModeImage.name) KOGITO_IMAGE_TAG=$(build-env sonataflowDevModeImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito) SONATAFLOW_QUARKUS_DEVUI_VERSION=$(build-env sonataflowDevModeImage.sonataflowQuarkusDevUiVersion)" + "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env sonataflowDevModeImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env sonataflowDevModeImage.account) KOGITO_IMAGE_NAME=$(build-env sonataflowDevModeImage.name) KOGITO_IMAGE_TAG=$(build-env sonataflowDevModeImage.buildTag) QUARKUS_PLATFORM_GROUPID=$(build-env kogitoImagesCekitModules.quarkusGroupId) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito) SONATAFLOW_QUARKUS_DEVUI_VERSION=$(build-env sonataflowDevModeImage.sonataflowQuarkusDevUiVersion)" }, "devDependencies": { "@kie-tools/image-builder": "workspace:*", diff --git a/packages/sonataflow-image-common/README.md b/packages/sonataflow-image-common/README.md index d6bf1235a9c..8a44393bcb6 100644 --- a/packages/sonataflow-image-common/README.md +++ b/packages/sonataflow-image-common/README.md @@ -43,6 +43,7 @@ To build and tests the images the package provides a convenient `Makefile` that - `KOGITO_IMAGE_REGISTRY_ACCOUNT`: Image registry account to use, defaults to 'apache' - `KOGITO_IMAGE_TAG`: Custom tag for the image. If not provided it will use the version in the image descriptor. +- `QUARKUS_PLATFORM_GROUPID`: (required) Quarkus platform groupdId to use inside the image. - `QUARKUS_PLATFORM_VERSION`: (required) Quarkus platform version to use inside the image. - `KOGITO_VERSION`: (required) Kogito platform version to use inside the image. diff --git a/packages/sonataflow-image-common/env/index.js b/packages/sonataflow-image-common/env/index.js index 61bc742bd66..90987933577 100644 --- a/packages/sonataflow-image-common/env/index.js +++ b/packages/sonataflow-image-common/env/index.js @@ -17,11 +17,20 @@ * under the License. */ -const { varsWithName, composeEnv } = require("@kie-tools-scripts/build-env"); +const { varsWithName, getOrDefault, composeEnv } = require("@kie-tools-scripts/build-env"); module.exports = composeEnv([require("@kie-tools/root-env/env")], { - vars: varsWithName({}), + vars: varsWithName({ + KOGITO_IMAGES_CEKIT_MODULES__quarkusGroupId: { + default: "io.quarkus.platform", + description: "Quarkus platform group id.", + }, + }), get env() { - return {}; + return { + kogitoImagesCekitModules: { + quarkusGroupId: getOrDefault(this.vars.KOGITO_IMAGES_CEKIT_MODULES__quarkusGroupId), + }, + }; }, }); diff --git a/packages/sonataflow-image-common/resources/Makefile b/packages/sonataflow-image-common/resources/Makefile index 7f72573fb18..7cd4147877c 100644 --- a/packages/sonataflow-image-common/resources/Makefile +++ b/packages/sonataflow-image-common/resources/Makefile @@ -41,6 +41,9 @@ endif # Check if there are Quarkus and Kogito version envs _check_versions: +ifndef QUARKUS_PLATFORM_GROUPID + $(error Cannot build image, please provide a valid Quarkus groupId using the QUARKUS_PLATFORM_GROUPID env) +endif ifndef QUARKUS_PLATFORM_VERSION $(error Cannot build image, please provide a valid Quarkus version using the QUARKUS_PLATFORM_VERSION env) endif @@ -51,9 +54,9 @@ endif # Upgrade Quarkus & Kogito versions in the images and modules _run_version_manager: ifneq ($(SONATAFLOW_QUARKUS_DEVUI_VERSION),) - python3 scripts/versions_manager.py --quarkus-version ${QUARKUS_PLATFORM_VERSION} --kogito-version ${KOGITO_VERSION} --sonataflow-quarkus-devui-version ${SONATAFLOW_QUARKUS_DEVUI_VERSION} + python3 scripts/versions_manager.py --quarkus-groupid ${QUARKUS_PLATFORM_GROUPID} --quarkus-version ${QUARKUS_PLATFORM_VERSION} --kogito-version ${KOGITO_VERSION} --sonataflow-quarkus-devui-version ${SONATAFLOW_QUARKUS_DEVUI_VERSION} else - python3 scripts/versions_manager.py --quarkus-version ${QUARKUS_PLATFORM_VERSION} --kogito-version ${KOGITO_VERSION} + python3 scripts/versions_manager.py --quarkus-groupid ${QUARKUS_PLATFORM_GROUPID} --quarkus-version ${QUARKUS_PLATFORM_VERSION} --kogito-version ${KOGITO_VERSION} endif _fix_platform_versions: _check_versions _run_version_manager diff --git a/packages/sonataflow-image-common/resources/modules/kogito-project-versions/module.yaml b/packages/sonataflow-image-common/resources/modules/kogito-project-versions/module.yaml index b710330fb63..61896281975 100644 --- a/packages/sonataflow-image-common/resources/modules/kogito-project-versions/module.yaml +++ b/packages/sonataflow-image-common/resources/modules/kogito-project-versions/module.yaml @@ -25,6 +25,9 @@ envs: - name: "KOGITO_VERSION" value: "### SET ME DURING BUILD PROCESS ###" description: Defines the Kogito version to be used by the builder images. Not intended to be changed by end user. + - name: "QUARKUS_PLATFORM_GROUPID" + value: "### SET ME DURING BUILD PROCESS ###" + description: Defines the Quarkus Platform groupId to be used by the builder images. Not intended to be changed by end user. - name: "QUARKUS_PLATFORM_VERSION" value: "### SET ME DURING BUILD PROCESS ###" description: Defines the Quarkus Platform version to be used by the builder images. Not intended to be changed by end user. diff --git a/packages/sonataflow-image-common/resources/modules/sonataflow/common/scripts/added/add-extension.sh b/packages/sonataflow-image-common/resources/modules/sonataflow/common/scripts/added/add-extension.sh index dc4ab3e7928..fcddc18727b 100755 --- a/packages/sonataflow-image-common/resources/modules/sonataflow/common/scripts/added/add-extension.sh +++ b/packages/sonataflow-image-common/resources/modules/sonataflow/common/scripts/added/add-extension.sh @@ -47,4 +47,4 @@ fi -DplatformVersion="${QUARKUS_PLATFORM_VERSION}" \ -Dextensions="${extensions}" \ ${QUARKUS_ADD_EXTENSION_ARGS} \ - io.quarkus.platform:quarkus-maven-plugin:"${QUARKUS_PLATFORM_VERSION}":add-extension + "${QUARKUS_PLATFORM_GROUPID}":quarkus-maven-plugin:"${QUARKUS_PLATFORM_VERSION}":add-extension diff --git a/packages/sonataflow-image-common/resources/modules/sonataflow/common/scripts/added/create-app.sh b/packages/sonataflow-image-common/resources/modules/sonataflow/common/scripts/added/create-app.sh index 5dedc599f2d..b29179b2cef 100755 --- a/packages/sonataflow-image-common/resources/modules/sonataflow/common/scripts/added/create-app.sh +++ b/packages/sonataflow-image-common/resources/modules/sonataflow/common/scripts/added/create-app.sh @@ -38,7 +38,7 @@ source "${script_dir_path}"/configure-jvm-mvn.sh -nsu \ -B \ -s "${MAVEN_SETTINGS_PATH}" \ - io.quarkus.platform:quarkus-maven-plugin:"${QUARKUS_PLATFORM_VERSION}":create ${QUARKUS_CREATE_ARGS} \ + "${QUARKUS_PLATFORM_GROUPID}":quarkus-maven-plugin:"${QUARKUS_PLATFORM_VERSION}":create ${QUARKUS_CREATE_ARGS} \ -DprojectGroupId="${PROJECT_GROUP_ID}" \ -DprojectArtifactId="${PROJECT_ARTIFACT_ID}" \ -DprojectVersionId="${PROJECT_VERSION}" \ @@ -135,7 +135,7 @@ fi -s "${MAVEN_SETTINGS_PATH}" \ -DskipTests=true \ -Dmaven.javadoc.skip=true \ - clean dependency:go-offline io.quarkus.platform:quarkus-maven-plugin:"${QUARKUS_PLATFORM_VERSION}":go-offline install + clean dependency:go-offline "${QUARKUS_PLATFORM_GROUPID}":quarkus-maven-plugin:"${QUARKUS_PLATFORM_VERSION}":go-offline install # clean up "${MAVEN_HOME}"/bin/mvn -B ${MAVEN_ARGS_APPEND} \ diff --git a/packages/sonataflow-image-common/resources/scripts/common.py b/packages/sonataflow-image-common/resources/scripts/common.py index 35ce2c44462..aed15c274fd 100644 --- a/packages/sonataflow-image-common/resources/scripts/common.py +++ b/packages/sonataflow-image-common/resources/scripts/common.py @@ -11,6 +11,8 @@ KOGITO_VERSION_ENV_KEY = "KOGITO_VERSION" KOGITO_VERSION_LABEL_NAME = "org.kie.kogito.version" +QUARKUS_PLATFORM_GROUPID_ENV_KEY = "QUARKUS_PLATFORM_GROUPID" + QUARKUS_PLATFORM_VERSION_ENV_KEY = "QUARKUS_PLATFORM_VERSION" QUARKUS_PLATFORM_VERSION_LABEL_NAME = "io.quarkus.platform.version" @@ -151,6 +153,14 @@ def update_kogito_platform_version(kogito_platform_version): update_env_value(KOGITO_VERSION_ENV_KEY, kogito_platform_version) update_label_value(KOGITO_VERSION_LABEL_NAME, kogito_platform_version) +def update_quarkus_platform_groupid(quarkus_platform_groupid): + """ + Update quarkus_platform_groupid into images/modules + :param quarkus_platform_groupid: quarkus groupid to set + """ + print("Setting Quarkus groupid: " + quarkus_platform_groupid) + update_env_value(QUARKUS_PLATFORM_GROUPID_ENV_KEY, quarkus_platform_groupid) + def update_quarkus_platform_version(quarkus_platform_version): """ Update quarkus_platform_version version into images/modules diff --git a/packages/sonataflow-image-common/resources/scripts/versions_manager.py b/packages/sonataflow-image-common/resources/scripts/versions_manager.py index d71f18a8917..adea4df7571 100644 --- a/packages/sonataflow-image-common/resources/scripts/versions_manager.py +++ b/packages/sonataflow-image-common/resources/scripts/versions_manager.py @@ -33,6 +33,7 @@ parser = argparse.ArgumentParser(description='Kie Tools - SWF Image Version Manager') parser.add_argument('--bump-to', dest='bump_to', help='Bump all images and yamls to the next version') parser.add_argument('--source-folder', dest='source_folder') + parser.add_argument('--quarkus-groupid', dest='quarkus_groupid', help='Sets the image Quarkus groupId') parser.add_argument('--quarkus-version', dest='quarkus_version', help='Sets the image Quarkus Version') parser.add_argument('--kogito-version', dest='kogito_version', help='Sets the image Kogito Version') parser.add_argument('--sonataflow-quarkus-devui-version', dest='sonataflow_quarkus_devui_version', help='Sets the image SonataFlow Quarkus DevUI Version', required=False) @@ -46,6 +47,8 @@ common.update_image_and_modules_version(args.bump_to, args.source_folder) if args.kogito_version is not None: common.update_kogito_platform_version(args.kogito_version) + if args.quarkus_groupid is not None: + common.update_quarkus_platform_groupid(args.quarkus_groupid) if args.quarkus_version is not None: common.update_quarkus_platform_version(args.quarkus_version) if args.sonataflow_quarkus_devui_version is not None: diff --git a/packages/sonataflow-management-console-image/env/index.js b/packages/sonataflow-management-console-image/env/index.js index 50f80317fdc..54010f1b7d4 100644 --- a/packages/sonataflow-management-console-image/env/index.js +++ b/packages/sonataflow-management-console-image/env/index.js @@ -20,14 +20,18 @@ const { varsWithName, composeEnv } = 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, require("@kie-tools/sonataflow-management-console-image-env/env")], { - vars: varsWithName({}), - get env() { - return { - sonataflowManagementConsoleImage: { - version: require("../package.json").version, - }, - }; - }, -}); +module.exports = composeEnv( + [rootEnv, sonataflowImageCommonEnv, require("@kie-tools/sonataflow-management-console-image-env/env")], + { + vars: varsWithName({}), + get env() { + return { + sonataflowManagementConsoleImage: { + version: require("../package.json").version, + }, + }; + }, + } +); diff --git a/packages/sonataflow-management-console-image/package.json b/packages/sonataflow-management-console-image/package.json index 04933271fc7..c2617e19429 100644 --- a/packages/sonataflow-management-console-image/package.json +++ b/packages/sonataflow-management-console-image/package.json @@ -28,7 +28,7 @@ "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: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_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito) SONATAFLOW_MANAGEMENT_CONSOLE_PORT=$(build-env sonataflowManagementConsoleImageEnv.port)" + "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) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito) SONATAFLOW_MANAGEMENT_CONSOLE_PORT=$(build-env sonataflowManagementConsoleImageEnv.port)" }, "devDependencies": { "@kie-tools/image-env-to-json": "workspace:*",