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


##########
packages/sonataflow-image-common/resources/scripts/build-kogito-apps-components.sh:
##########
@@ -56,6 +56,9 @@ if [ ! -z "${CYPRESS_BINARY_URL}" ]; then
 fi
 
 case ${imageName} in
+    "incubator-kie-kogito-db-migrator-tool")
+        contextDir="db-migrator-tool/image"
+        ;;

Review Comment:
   Do we still need this? I thought this file was only used when we still had 
the build happening inside the images @ricardozanini 



##########
packages/kogito-db-migrator-tool/README.md:
##########
@@ -0,0 +1,31 @@
+# Kogito Postgres DB Migrator Tool

Review Comment:
   Postgres mentioned here but not in the package name. Why is that please?



##########
packages/kogito-db-migrator-tool/env/index.js:
##########
@@ -0,0 +1,31 @@
+/*
+ * 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 } = require("@kie-tools-scripts/build-env");
+
+module.exports = composeEnv([require("@kie-tools/root-env/env"), 
require("@kie-tools/maven-base/env")], {
+  vars: varsWithName({}),
+  get env() {
+    return {
+      kogitoDBMigratorTool: {

Review Comment:
   ```suggestion
         kogitoDbMigratorTool: {
   ```



##########
packages/maven-base/pom.xml:
##########
@@ -408,6 +409,25 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.jacoco</groupId>
+        <artifactId>jacoco-maven-plugin</artifactId>
+        <version> ${version.jacoco.maven.plugin} </version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>prepare-agent</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>report</id>
+            <phase>prepare-package</phase>
+            <goals>
+              <goal>report</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>

Review Comment:
   Configuring this here will enable this plugin for all Maven-based packages 
of `kie-tools`. I guess we need to move this under `<pluginManagement>` and 
configure its execution only in the packages that want to execute it as part of 
its build.



##########
packages/kogito-db-migrator-tool-image/README.md:
##########
@@ -0,0 +1,116 @@
+<!--
+   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.
+-->
+
+# Kogito Postgres DB Migrator Tool Image
+
+This package contains the `Containerfile/Dockerfile` and scripts to build a 
container image for Kogito Postgres DB Migrator Tool. Details about the Kogito 
Postgres DB Migrator Tool can be found 
[here](../kogito-db-migrator-tool/README.md)
+
+## Additional requirements
+
+- docker
+
+## Build
+
+_NOTE_: Before performing this step, be sure that the Kogito Postgres DB 
Migrator Tool jar has been built and available for inclusion in the image.
+
+- Enable the image to be built:
+
+  ```bash
+  export KIE_TOOLS_BUILD__buildContainerImages=true
+  ```
+
+Run the following in the root folder of the repository to build the package:
+
+```bash
+pnpm -F @kie-tools/kogito-db-migrator-tool-image... build:prod
+```
+
+- Then check if the image is correctly stored:
+
+  ```bash
+  docker images
+  ```
+
+## Run
+
+- Start up a clean container with:
+
+  ```bash
+    docker run 
docker.io/apache/incubator-kie-kogito-service-db-migration-postgresql:latest

Review Comment:
   `latest` is not the correct tag version here. It should be `main`.



##########
packages/kogito-db-migrator-tool-image/resources/incubator-kie-kogito-db-migrator-tool-image.yaml:
##########
@@ -0,0 +1,50 @@
+#
+# 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: DBMigratorTool 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"

Review Comment:
   ```suggestion
       value: "Kogito DB Migration Tool for Data Index and Jobs Service - 
PostgreSQL"
   ```



##########
packages/kogito-db-migrator-tool-image/README.md:
##########
@@ -0,0 +1,116 @@
+<!--
+   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.
+-->
+

Review Comment:
   Please focus the README on describing and using, leaving build instructions 
at the end. README files are targeted towards consumers, not developers.



##########
.gitignore:
##########
@@ -347,6 +347,7 @@ turbo.json
 packages/*/.idea
 examples/*/.idea
 
-
+# Jar files
+**/*.jar

Review Comment:
   If this is specific to the new package, please use its .gitignore for adding 
this rule.



##########
packages/kogito-db-migrator-tool/README.md:
##########
@@ -0,0 +1,31 @@
+# Kogito Postgres DB Migrator Tool
+
+This is a Java, Quarkus-based PostgreSQL database migrator application for 
Data-Index and Jobs Service applications for use by SonataFlow Operator.
+
+_NOTE_: This postgres database migrator application and its corresponding 
images are only envisaged to be made use of by SonataFlow Operator, Data Index 
and Jobs Service internally. Conversely this application is of no use outside 
the usecases involved with SonataFlow Operator, Data Index and Jobs Service 
applications.

Review Comment:
   Same here.. Postgres is mentioned.



-- 
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