Skip to content

Commit

Permalink
kie-tools#2753: Parametrize the groupId of quarkus-maven-plugin in th…
Browse files Browse the repository at this point in the history
…e images
  • Loading branch information
rgdoliveira committed Nov 21, 2024
1 parent 7bc2985 commit bd61169
Show file tree
Hide file tree
Showing 29 changed files with 267 additions and 77 deletions.
3 changes: 2 additions & 1 deletion packages/kogito-base-builder-image/env/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/kogito-base-builder-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:*",
Expand Down
3 changes: 2 additions & 1 deletion packages/kogito-data-index-ephemeral-image/env/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/kogito-data-index-ephemeral-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:*",
Expand Down
3 changes: 2 additions & 1 deletion packages/kogito-data-index-postgresql-image/env/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/kogito-data-index-postgresql-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:*",
Expand Down
3 changes: 2 additions & 1 deletion packages/kogito-jit-runner-image/env/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/kogito-jit-runner-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:*",
Expand Down
3 changes: 2 additions & 1 deletion packages/kogito-jobs-service-allinone-image/env/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/kogito-jobs-service-allinone-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:*",
Expand Down
3 changes: 2 additions & 1 deletion packages/kogito-jobs-service-ephemeral-image/env/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/kogito-jobs-service-ephemeral-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:*",
Expand Down
3 changes: 2 additions & 1 deletion packages/kogito-jobs-service-postgresql-image/env/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/kogito-jobs-service-postgresql-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:*",
Expand Down
3 changes: 2 additions & 1 deletion packages/sonataflow-builder-image/env/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/sonataflow-builder-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
3 changes: 2 additions & 1 deletion packages/sonataflow-devmode-image/env/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@

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 },
} = require("@kie-tools/maven-m2-repo-via-http-image/env");

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",
Expand Down
2 changes: 1 addition & 1 deletion packages/sonataflow-devmode-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:*",
Expand Down
1 change: 1 addition & 0 deletions packages/sonataflow-image-common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
15 changes: 12 additions & 3 deletions packages/sonataflow-image-common/env/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
},
};
},
});
7 changes: 5 additions & 2 deletions packages/sonataflow-image-common/resources/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading

0 comments on commit bd61169

Please sign in to comment.