ricardozanini commented on code in PR #1791:
URL: 
https://github.com/apache/incubator-kie-kogito-images/pull/1791#discussion_r1705722652


##########
RELEASE_NOTES.md:
##########
@@ -19,6 +19,7 @@
 
 <!-- Keep them in alphabetical order -->
 ## Enhancements
+Added Data Index and Jobs Service database migration image for use by a 
Kubernetes/OpenShift Job, before the Data Index and Jobs Service are deployed.

Review Comment:
   Thanks, but this is unnecessary. You can remove this file, actually. We use 
GH releases now.



##########
modules/kogito-postgres-db-migration-deps/install:
##########
@@ -0,0 +1,45 @@
+#!/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.
+#
+
+mkdir -p /home/default
+cd /home/default
+
+microdnf install --nodocs tar gzip wget unzip
+
+wget 
https://repository.apache.org/content/groups/snapshots/org/kie/kogito/kogito-ddl/10.0.999-SNAPSHOT/kogito-ddl-10.0.999-20240726.011627-10-db-scripts.zip
+unzip kogito-ddl-10.0.999-20240726.011627-10-db-scripts.zip
+
+wget 
https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/10.17.0/flyway-commandline-10.17.0-linux-x64.tar.gz

Review Comment:
   Same thing here.



##########
tests/features/kogito-postgres-db-migration-image.feature:
##########
@@ -0,0 +1,34 @@
+#
+# 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-service-db-migration-postgresql
+Feature: kogito-postgres-db-migration DB migration for postgresql feature.
+
+  Scenario: verify if all labels are correctly set on 
kogito-postgres-db-migration-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.k8s.description with value Kogito 
DB Migration creates schemas and tables for Data Index and Jobs Service for 
PostgreSQL database
+      And the image should contain label io.k8s.display-name with value Kogito 
DB Migration for Data Index and Jobs Service - PostgreSQL
+      And the image should contain label io.openshift.tags with value 
kogito,db-migration
+
+  Scenario: Verify log entries
+    When container is started with command bash -c '/home/default/migration.sh'
+    Then container log should contain LISTING SQL DIR
+    And container log should contain V1.44.0__data_index_definitions.sql
+    And container log should contain 
V2.0.1__job_details_increase_job_id_size.sql

Review Comment:
   Avoid using version names to avoid errors in the CI testing when this 
changes.



##########
modules/kogito-postgres-db-migration-deps/install:
##########
@@ -0,0 +1,45 @@
+#!/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.
+#
+
+mkdir -p /home/default
+cd /home/default
+
+microdnf install --nodocs tar gzip wget unzip
+
+wget 
https://repository.apache.org/content/groups/snapshots/org/kie/kogito/kogito-ddl/10.0.999-SNAPSHOT/kogito-ddl-10.0.999-20240726.011627-10-db-scripts.zip

Review Comment:
   This URL should be an ENV VAR that would be set during the image build. 



##########
modules/kogito-postgres-db-migration-deps/module.yaml:
##########
@@ -0,0 +1,27 @@
+#
+# 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: kogito-postgres-db-migration-deps
+version: "1.0"
+artifacts:
+  - name: migration.sh
+    path: artifacts/migration.sh
+    dest: /home/default
+execute:
+  - script: install

Review Comment:
   This module can set versions/URLs for flyway and kogito DDL scripts.



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