ricardozanini commented on code in PR #2697:
URL: 
https://github.com/apache/incubator-kie-tools/pull/2697#discussion_r1876826823


##########
packages/kogito-db-migrator-tool-image/package.json:
##########
@@ -0,0 +1,44 @@
+{
+  "private": true,
+  "name": "@kie-tools/kogito-db-migrator-tool-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": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && 
pnpm copy-assets && pnpm image:build && rimraf build && rimraf target && rimraf 
dist-tests-e2e && rimraf 
resources/modules/kogito-postgres-db-migration-deps/quarkus-app",
+    "build:dev": "run-script-os",
+    "build:dev:linux": "pnpm build",
+    "build:dev:win32:darwin": "echo \"Build skipped on Windows and MacOS\"",
+    "build:prod": "run-script-os",
+    "build:prod:linux": "pnpm build",
+    "build:prod:win32:darwin": "echo \"Build skipped on Windows and MacOS\"",
+    "copy-assets": "run-script-os",
+    "copy-assets:linux:darwin": "rimraf build && cp -R 
./node_modules/@kie-tools/sonataflow-image-common/resources build && mkdir -p 
resources/modules/kogito-postgres-db-migration-deps/quarkus-app && cp -R 
./node_modules/@kie-tools/kogito-db-migrator-tool/target/quarkus-app/* 
resources/modules/kogito-postgres-db-migration-deps/quarkus-app && cp -R 
resources/* build ",

Review Comment:
   Why are you copying the artifacts to `resources` and not directly to 
`build`?  We should not modify this directory during build.



##########
packages/kogito-db-migrator-tool-image/resources/modules/kogito-postgres-db-migration-deps/module.yaml:
##########
@@ -0,0 +1,25 @@
+#
+# 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.postgresql.db-migration-deps
+version: "main"
+artifacts:
+  - name: sonataflow-db-migrator-quarkus-app

Review Comment:
   Please add a note here saying that this artifact comes from the package 
`kogito-db-migrator-tool` during the `pnpm build:dev` phase.



##########
packages/kogito-db-migrator-tool-image/resources/incubator-kie-kogito-db-migrator-tool-image.yaml:
##########
@@ -0,0 +1,49 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+name: "docker.io/apache/incubator-kie-kogito-db-migrator-tool"
+version: "main"
+from: registry.access.redhat.com/ubi8/openjdk-17-runtime:1.20
+description: Flyway image for Data Index and Jobs Service database migration
+
+labels:
+  - name: "org.kie.kogito.version"
+    value: "### SET ME DURING BUILD PROCESS ###"
+  - name: "maintainer"
+    value: "Apache KIE <[email protected]>"
+  - name: "io.k8s.description"
+    value: "Kogito DB Migration creates schemas and tables for Data Index and 
Jobs Service for PostgreSQL database"
+  - name: "io.k8s.display-name"
+    value: "Kogito DB Migration for Data Index and Jobs Service - PostgreSQL"
+  - name: "io.openshift.tags"
+    value: "kogito,db-migration"
+
+modules:
+  repositories:
+    - path: modules
+  install:
+    - name: org.kie.kogito.system.user

Review Comment:
   Please also add the "kogito-versions" module. So we will have the 
`KOGITO_VERSION` and `QUARKUS_PLATFORM_VERSION` in the image env context.



##########
packages/kogito-db-migrator-tool-image/package.json:
##########
@@ -0,0 +1,44 @@
+{
+  "private": true,
+  "name": "@kie-tools/kogito-db-migrator-tool-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": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && 
pnpm copy-assets && pnpm image:build && rimraf build && rimraf target && rimraf 
dist-tests-e2e && rimraf 
resources/modules/kogito-postgres-db-migration-deps/quarkus-app",
+    "build:dev": "run-script-os",
+    "build:dev:linux": "pnpm build",
+    "build:dev:win32:darwin": "echo \"Build skipped on Windows and MacOS\"",
+    "build:prod": "run-script-os",
+    "build:prod:linux": "pnpm build",
+    "build:prod:win32:darwin": "echo \"Build skipped on Windows and MacOS\"",
+    "copy-assets": "run-script-os",
+    "copy-assets:linux:darwin": "rimraf build && cp -R 
./node_modules/@kie-tools/sonataflow-image-common/resources build && mkdir -p 
resources/modules/kogito-postgres-db-migration-deps/quarkus-app && cp -R 
./node_modules/@kie-tools/kogito-db-migrator-tool/target/quarkus-app/* 
resources/modules/kogito-postgres-db-migration-deps/quarkus-app && cp -R 
resources/* build ",
+    "format": "prettier --write . --ignore-path=../../.prettierignore 
--ignore-path=../../.gitignore",
+    "image:build": "run-script-os",
+    "image:build:linux": "pnpm setup:env && cekit --descriptor 
build/incubator-kie-kogito-db-migrator-tool-image.yaml -v build docker",
+    "image:build:win32:darwin": "echo \"Build skipped on Windows and MacOS\"",
+    "install": "node install.js && pnpm format",
+    "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && 
cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoDbMigratorToolImage.registry) 
KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoDbMigratorToolImage.account) 
KOGITO_IMAGE_NAME=$(build-env kogitoDbMigratorToolImage.name) 
KOGITO_IMAGE_TAG=$(build-env kogitoDbMigratorToolImage.buildTag) 
QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) 
KOGITO_VERSION=$(build-env versions.kogito)"

Review Comment:
   This action does nothing if we don't use the Makefile from the common 
package.



##########
packages/kogito-db-migrator-tool-image/package.json:
##########
@@ -0,0 +1,44 @@
+{
+  "private": true,
+  "name": "@kie-tools/kogito-db-migrator-tool-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": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && 
pnpm copy-assets && pnpm image:build && rimraf build && rimraf target && rimraf 
dist-tests-e2e && rimraf 
resources/modules/kogito-postgres-db-migration-deps/quarkus-app",
+    "build:dev": "run-script-os",
+    "build:dev:linux": "pnpm build",
+    "build:dev:win32:darwin": "echo \"Build skipped on Windows and MacOS\"",
+    "build:prod": "run-script-os",
+    "build:prod:linux": "pnpm build",
+    "build:prod:win32:darwin": "echo \"Build skipped on Windows and MacOS\"",
+    "copy-assets": "run-script-os",
+    "copy-assets:linux:darwin": "rimraf build && cp -R 
./node_modules/@kie-tools/sonataflow-image-common/resources build && mkdir -p 
resources/modules/kogito-postgres-db-migration-deps/quarkus-app && cp -R 
./node_modules/@kie-tools/kogito-db-migrator-tool/target/quarkus-app/* 
resources/modules/kogito-postgres-db-migration-deps/quarkus-app && cp -R 
resources/* build ",
+    "format": "prettier --write . --ignore-path=../../.prettierignore 
--ignore-path=../../.gitignore",
+    "image:build": "run-script-os",
+    "image:build:linux": "pnpm setup:env && cekit --descriptor 
build/incubator-kie-kogito-db-migrator-tool-image.yaml -v build docker",

Review Comment:
   Why not use our `sonataflow-common-image` Makefile?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to