Skip to content

Commit

Permalink
Revert back db migrator tool package names
Browse files Browse the repository at this point in the history
  • Loading branch information
rhkp committed Jan 22, 2025
1 parent accaa55 commit 18e93a0
Show file tree
Hide file tree
Showing 25 changed files with 61 additions and 59 deletions.
18 changes: 9 additions & 9 deletions .ci/jenkins/Jenkinsfile.daily-dev-publish
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ pipeline {
KOGITO_MANAGEMENT_CONSOLE__name = 'incubator-kie-kogito-management-console'
KOGITO_MANAGEMENT_CONSOLE__buildTag = "${params.BRANCH_NAME}"

KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL__registry = 'docker.io'
KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL__account = 'apache'
KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL__name = 'kogito-postgresql-db-migrator-tool'
KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL__buildTag = "${params.BRANCH_NAME}"
KOGITO_DB_MIGRATOR_TOOL__registry = 'docker.io'
KOGITO_DB_MIGRATOR_TOOL__account = 'apache'
KOGITO_DB_MIGRATOR_TOOL__name = 'kogito-db-migrator-tool'
KOGITO_DB_MIGRATOR_TOOL__buildTag = "${params.BRANCH_NAME}"

SONATAFLOW_BUILDER_IMAGE__registry = 'docker.io'
SONATAFLOW_BUILDER_IMAGE__account = 'apache'
Expand Down Expand Up @@ -555,14 +555,14 @@ pipeline {
}
}

stage('Push kogito-postgresql-db-migrator-tool to Docker Hub') {
stage('Push kogito-db-migrator-tool to Docker Hub') {
steps {
script {
dockerUtils.pushImageToRegistry(
"${env.KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL__registry}",
"${env.KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL__account}",
"${env.KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL__name}",
"${env.KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL__buildTag}",
"${env.KOGITO_DB_MIGRATOR_TOOL__registry}",
"${env.KOGITO_DB_MIGRATOR_TOOL__account}",
"${env.KOGITO_DB_MIGRATOR_TOOL__name}",
"${env.KOGITO_DB_MIGRATOR_TOOL__buildTag}",
"${pipelineVars.dockerHubUserCredentialsId}",
"${pipelineVars.dockerHubTokenCredentialsId}"
)
Expand Down
24 changes: 12 additions & 12 deletions .ci/jenkins/release-jobs/Jenkinsfile.kogito-db-migrator-tool
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ pipeline {
KIE_TOOLS_BUILD__buildContainerImages = 'true'


KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL__registry = 'docker.io'
KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL__account = 'apache'
KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL__name = 'kogito-postgresql-db-migrator-tool'
KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL__buildTag = "${params.RELEASE_VERSION}"
KOGITO_DB_MIGRATOR_TOOL__registry = 'docker.io'
KOGITO_DB_MIGRATOR_TOOL__account = 'apache'
KOGITO_DB_MIGRATOR_TOOL__name = 'kogito-db-migrator-tool'
KOGITO_DB_MIGRATOR_TOOL__buildTag = "${params.RELEASE_VERSION}"

RELEASE_ARTIFACTS_DIR = "${WORKSPACE}/release-artifacts"

DOCKER_CONFIG = "${WORKSPACE}/.docker"

PNPM_FILTER_STRING = '-F @kie-tools/kogito-postgresql-db-migrator-tool...'
PNPM_FILTER_STRING = '-F @kie-tools/kogito-db-migrator-tool...'
}

stages {
Expand Down Expand Up @@ -137,17 +137,17 @@ pipeline {
}
}

stage('Push kogito-postgresql-db-migrator-tool to Docker Hub') {
stage('Push kogito-db-migrator-tool to Docker Hub') {
when {
expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' }
}
steps {
script {
dockerUtils.pushImageToRegistry(
"${env.KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL__registry}",
"${env.KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL__account}",
"${env.KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL__name}",
"${env.KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL_buildTag}",
"${env.KOGITO_DB_MIGRATOR_TOOL__registry}",
"${env.KOGITO_DB_MIGRATOR_TOOL__account}",
"${env.KOGITO_DB_MIGRATOR_TOOL__name}",
"${env.KOGITO_DB_MIGRATOR_TOOL_buildTag}",
"${pipelineVars.dockerHubUserCredentialsId}",
"${pipelineVars.dockerHubTokenCredentialsId}"
)
Expand All @@ -161,11 +161,11 @@ pipeline {
}
steps {
script {
env.RELEASE_IMAGE_TAR_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-kogito-postgresql-db-migrator-tool-image.tar.gz"
env.RELEASE_IMAGE_TAR_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-kogito-db-migrator-tool-image.tar.gz"

sh """#!/bin/bash -el
mkdir ${env.RELEASE_ARTIFACTS_DIR}
docker save "${env.KOGITO_POSTGRESQL_DB_MIGRATOR_TOOL__registry}/${env.KOGITO_MANAGEMENT_CONSOLE__account}/${env.KOGITO_MANAGEMENT_CONSOLE__name}:${params.RELEASE_VERSION}" | gzip > "${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}"
docker save "${env.KOGITO_DB_MIGRATOR_TOOL__registry}/${env.KOGITO_MANAGEMENT_CONSOLE__account}/${env.KOGITO_MANAGEMENT_CONSOLE__name}:${params.RELEASE_VERSION}" | gzip > "${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}"
""".trim()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# Kogito PostgreSQL DB Migrator Tool Image

This package contains the `Containerfile/Dockerfile` and scripts to build a container image for Kogito PostgreSQL DB Migrator Tool. Details about the Kogito PostgreSQL DB Migrator Tool can be found [here](../kogito-postgresql-db-migrator-tool/README.md)
This package contains the `Containerfile/Dockerfile` and scripts to build a container image for Kogito PostgreSQL DB Migrator Tool. Details about the Kogito PostgreSQL DB Migrator Tool can be found [here](../kogito-db-migrator-tool/README.md)

## Additional requirements

Expand Down Expand Up @@ -64,7 +64,7 @@ An example to use diverse environment variables
--env QUARKUS_DATASOURCE_JOBSSERVICE_USERNAME=<jobs-service-db-user> \
--env QUARKUS_DATASOURCE_JOBSSERVICE_PASSWORD=<jobs-service-db-password> \
--env QUARKUS_FLYWAY_JOBSSERVICE_SCHEMAS=jobs-service \
docker.io/apache/incubator-kie-kogito-postgresql-db-migrator-tool:main
docker.io/apache/incubator-kie-kogito-db-migrator-tool:main
```

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = composeEnv([rootEnv, sonataflowImageCommonEnv], {
description: "The image registry account.",
},
KOGITO_DB_MIGRATOR_TOOL_IMAGE__name: {
default: "incubator-kie-kogito-postgresql-db-migrator-tool",
default: "incubator-kie-kogito-db-migrator-tool",
description: "The image name.",
},
KOGITO_DB_MIGRATOR_TOOL_IMAGE__buildTag: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ let imageYaml = fs.readFileSync(originalYamlPath, "utf8");
const imageUrl = `${env.kogitoDbMigratorToolImage.registry}/${env.kogitoDbMigratorToolImage.account}/${env.kogitoDbMigratorToolImage.name}`;

// Replace the whole string between quotes ("") with the image name
imageYaml = imageYaml.replace(/(?<=")(.*kie-kogito-postgresql-db-migrator-tool.*)(?=")/gm, imageUrl);
imageYaml = imageYaml.replace(/(?<=")(.*kie-kogito-db-migrator-tool.*)(?=")/gm, imageUrl);

// Write file and then rename it to match the image name
fs.writeFileSync(originalYamlPath, imageYaml);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"name": "@kie-tools/kogito-postgresql-db-migrator-tool-image",
"name": "@kie-tools/kogito-db-migrator-tool-image",
"version": "0.0.0",
"description": "",
"license": "Apache-2.0",
Expand All @@ -21,7 +21,7 @@
"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 && cp -R resources/* build && mkdir -p build/modules/kogito-postgres-db-migration-deps/quarkus-app && cp -R ./node_modules/@kie-tools/kogito-postgresql-db-migrator-tool/target/quarkus-app/* build/modules/kogito-postgres-db-migration-deps/quarkus-app",
"copy-assets:linux:darwin": "rimraf build && cp -R ./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R resources/* build && mkdir -p build/modules/kogito-postgres-db-migration-deps/quarkus-app && cp -R ./node_modules/@kie-tools/kogito-db-migrator-tool/target/quarkus-app/* build/modules/kogito-postgres-db-migration-deps/quarkus-app",
"format": "prettier --write . --ignore-path=../../.prettierignore --ignore-path=../../.gitignore",
"image:build": "run-script-os",
"image:build:linux": "pnpm setup:env make -C ./build build",
Expand All @@ -31,7 +31,7 @@
"venv-activate": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate"
},
"dependencies": {
"@kie-tools/kogito-postgresql-db-migrator-tool": "workspace:*",
"@kie-tools/kogito-db-migrator-tool": "workspace:*",
"@kie-tools/python-venv": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/sonataflow-image-common": "workspace:*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# specific language governing permissions and limitations
# under the License.
#
name: "docker.io/apache/incubator-kie-kogito-postgresql-db-migrator-tool"
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ schema_version: 1
name: org.kie.kogito.postgresql.db-migration-deps
version: "main"
artifacts:
# The following artifact comes from the package kogito-postgresql-db-migrator-tool during the pnpm build:dev phase
- name: kogito-postgresql-db-migrator-tool-quarkus-app
# The following artifact comes from the package kogito-db-migrator-tool during the pnpm build:dev phase
- name: kogito-db-migrator-tool-quarkus-app
path: ./quarkus-app
dest: /home/kogito/bin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# kogito-postgresql-db-migrator-tool
# kogito-db-migrator-tool
src/main/resources/postgresql
src/main/resources/ansi
src/main/resources/h2
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"name": "@kie-tools/kogito-postgresql-db-migrator-tool",
"name": "@kie-tools/kogito-db-migrator-tool",
"version": "0.0.0",
"description": "",
"license": "Apache-2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<modelVersion>4.0.0</modelVersion>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-postgresql-db-migrator-tool</artifactId>
<artifactId>kogito-db-migrator-tool</artifactId>

<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if [ ! -z "${CYPRESS_BINARY_URL}" ]; then
fi

case ${imageName} in
"incubator-kie-kogito-postgresql-db-migrator-tool")
"incubator-kie-kogito-db-migrator-tool")
contextDir="db-migrator-tool/image"
;;
"incubator-kie-kogito-data-index-ephemeral")
Expand Down
10 changes: 6 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions repo/graph.dot
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ digraph G {
"@kie-tools/sonataflow-image-common" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie/kogito-data-index-ephemeral-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie/kogito-data-index-postgresql-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie-tools/kogito-db-migrator-tool" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie-tools/kogito-db-migrator-tool-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie/kogito-jit-runner-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie/kogito-jobs-service-allinone-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie/kogito-jobs-service-ephemeral-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie/kogito-jobs-service-postgresql-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie-tools/runtime-tools-management-console-webapp" [ color = "blue", fontcolor = "blue", style = "rounded" ];
"@kie-tools/kogito-postgresql-db-migrator-tool" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie-tools/kogito-postgresql-db-migrator-tool-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie-tools-core/kubernetes-bridge" [ color = "purple", fontcolor = "purple", style = "rounded" ];
"@kie-tools-core/workspace" [ color = "purple", fontcolor = "purple", style = "rounded" ];
"@kie-tools/unitables-dmn" [ color = "blue", fontcolor = "blue", style = "rounded" ];
Expand Down Expand Up @@ -473,6 +473,9 @@ digraph G {
"@kie/kogito-data-index-ephemeral-image" -> "@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
"@kie/kogito-data-index-postgresql-image" -> "@kie-tools/maven-base" [ style = "dashed", color = "black" ];
"@kie/kogito-data-index-postgresql-image" -> "@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
"@kie-tools/kogito-db-migrator-tool" -> "@kie-tools/maven-base" [ style = "solid", color = "black" ];
"@kie-tools/kogito-db-migrator-tool-image" -> "@kie-tools/kogito-db-migrator-tool" [ style = "solid", color = "black" ];
"@kie-tools/kogito-db-migrator-tool-image" -> "@kie-tools/sonataflow-image-common" [ style = "solid", color = "black" ];
"@kie/kogito-jit-runner-image" -> "@kie-tools/maven-base" [ style = "dashed", color = "black" ];
"@kie/kogito-jit-runner-image" -> "@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
"@kie/kogito-jobs-service-allinone-image" -> "@kie-tools/maven-base" [ style = "dashed", color = "black" ];
Expand All @@ -484,9 +487,6 @@ digraph G {
"@kie-tools/kogito-management-console" -> "@kie-tools/image-builder" [ style = "dashed", color = "black" ];
"@kie-tools/kogito-management-console" -> "@kie-tools/image-env-to-json" [ style = "dashed", color = "black" ];
"@kie-tools/kogito-management-console" -> "@kie-tools/runtime-tools-management-console-webapp" [ style = "dashed", color = "black" ];
"@kie-tools/kogito-postgresql-db-migrator-tool" -> "@kie-tools/maven-base" [ style = "solid", color = "black" ];
"@kie-tools/kogito-postgresql-db-migrator-tool-image" -> "@kie-tools/kogito-postgresql-db-migrator-tool" [ style = "solid", color = "black" ];
"@kie-tools/kogito-postgresql-db-migrator-tool-image" -> "@kie-tools/sonataflow-image-common" [ style = "solid", color = "black" ];
"@kie-tools-core/kubernetes-bridge" -> "@kie-tools/cors-proxy-api" [ style = "solid", color = "purple" ];
"@kie-tools/maven-base" -> "@kie-tools/root-env" [ style = "dashed", color = "black" ];
"@kie-tools/maven-m2-repo-via-http-image" -> "@kie-tools/image-builder" [ style = "dashed", color = "black" ];
Expand Down
30 changes: 15 additions & 15 deletions repo/graph.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@
{ "id": "@kie/kogito-base-builder-image" },
{ "id": "@kie-tools/sonataflow-image-common" },
{ "id": "@kie-tools/python-venv" },
{ "id": "@kie-tools/kogito-db-migrator-tool" },
{ "id": "@kie-tools/kogito-db-migrator-tool-image" },
{ "id": "@kie/kogito-jit-runner-image" },
{ "id": "@kie/kogito-jobs-service-allinone-image" },
{ "id": "@kie-tools/kogito-postgresql-db-migrator-tool" },
{ "id": "@kie-tools/kogito-postgresql-db-migrator-tool-image" },
{ "id": "@kie-tools/unitables" },
{ "id": "pmml-vscode-extension" },
{ "id": "@kie-tools/runtime-tools-components" },
Expand Down Expand Up @@ -2105,37 +2105,37 @@
"weight": 1
},
{
"source": "@kie/kogito-jit-runner-image",
"source": "@kie-tools/kogito-db-migrator-tool",
"target": "@kie-tools/maven-base",
"weight": 1
},
{
"source": "@kie/kogito-jit-runner-image",
"source": "@kie-tools/kogito-db-migrator-tool-image",
"target": "@kie-tools/kogito-db-migrator-tool",
"weight": 1
},
{
"source": "@kie-tools/kogito-db-migrator-tool-image",
"target": "@kie-tools/sonataflow-image-common",
"weight": 1
},
{
"source": "@kie/kogito-jobs-service-allinone-image",
"source": "@kie/kogito-jit-runner-image",
"target": "@kie-tools/maven-base",
"weight": 1
},
{
"source": "@kie/kogito-jobs-service-allinone-image",
"source": "@kie/kogito-jit-runner-image",
"target": "@kie-tools/sonataflow-image-common",
"weight": 1
},
{
"source": "@kie-tools/kogito-postgresql-db-migrator-tool",
"source": "@kie/kogito-jobs-service-allinone-image",
"target": "@kie-tools/maven-base",
"weight": 1
},
{
"source": "@kie-tools/kogito-postgresql-db-migrator-tool-image",
"target": "@kie-tools/kogito-postgresql-db-migrator-tool",
"weight": 1
},
{
"source": "@kie-tools/kogito-postgresql-db-migrator-tool-image",
"source": "@kie/kogito-jobs-service-allinone-image",
"target": "@kie-tools/sonataflow-image-common",
"weight": 1
},
Expand Down Expand Up @@ -2848,13 +2848,13 @@
["@kie/kogito-base-builder-image", "packages/kogito-base-builder-image"],
["@kie/kogito-data-index-ephemeral-image", "packages/kogito-data-index-ephemeral-image"],
["@kie/kogito-data-index-postgresql-image", "packages/kogito-data-index-postgresql-image"],
["@kie-tools/kogito-db-migrator-tool", "packages/kogito-db-migrator-tool"],
["@kie-tools/kogito-db-migrator-tool-image", "packages/kogito-db-migrator-tool-image"],
["@kie/kogito-jit-runner-image", "packages/kogito-jit-runner-image"],
["@kie/kogito-jobs-service-allinone-image", "packages/kogito-jobs-service-allinone-image"],
["@kie/kogito-jobs-service-ephemeral-image", "packages/kogito-jobs-service-ephemeral-image"],
["@kie/kogito-jobs-service-postgresql-image", "packages/kogito-jobs-service-postgresql-image"],
["@kie-tools/kogito-management-console", "packages/kogito-management-console"],
["@kie-tools/kogito-postgresql-db-migrator-tool", "packages/kogito-postgresql-db-migrator-tool"],
["@kie-tools/kogito-postgresql-db-migrator-tool-image", "packages/kogito-postgresql-db-migrator-tool-image"],
["@kie-tools-core/kubernetes-bridge", "packages/kubernetes-bridge"],
["@kie-tools/maven-base", "packages/maven-base"],
["@kie-tools/maven-m2-repo-via-http-image", "packages/maven-m2-repo-via-http-image"],
Expand Down

0 comments on commit 18e93a0

Please sign in to comment.