Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kie-tools#2621: Remove build-kogito-app stage from Kogito images #2682

Merged
merged 6 commits into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devbox.lock
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@
},
"[email protected]": {
"last_modified": "2024-03-22T11:26:23Z",
"plugin_version": "0.0.4",
"plugin_version": "0.0.3",
"resolved": "github:NixOS/nixpkgs/a3ed7406349a9335cb4c2a71369b697cecd9d351#python312",
"source": "devbox-search",
"version": "3.12.2",
Expand Down
8 changes: 6 additions & 2 deletions packages/kogito-data-index-ephemeral-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,27 @@
"url": "https://github.com/apache/incubator-kie-tools/issues"
},
"scripts": {
"build:dev": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy-assets\" \"pnpm image:build\"",
"build:dev": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm mvn-build-app\" \"pnpm copy-assets\" \"pnpm image:build\"",
"build:prod": "pnpm build:dev && pnpm image:test",
"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",
"copy-test-assets": "run-script-os",
"copy-test-assets:linux:darwin": "cp -R test-resources/. build",
"format": "prettier --write . --ignore-path=../../.prettierignore --ignore-path=../../.gitignore",
"image:build": "run-script-os",
"image:build:darwin:linux": "pnpm setup:env make -C ./build build-kogito-app build",
"image:build:darwin:linux": "pnpm setup:env make -C ./build build",
"image:build:win32": "echo \"Build skipped on Windows\"",
"image:test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"mkdir -p build/target/test/results\" \"run-script-os\" --finally \"mkdir -p build/target/test/results && cp -R build/target/test/results dist-tests-e2e/\"",
"image:test:darwin:linux": "pnpm copy-test-assets && pnpm setup:env make -C ./build test-image",
"image:test:win32": "echo \"Tests skipped on Windows\"",
"install": "node install.js && pnpm format",
"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)"
},
"devDependencies": {
"@kie-tools/maven-base": "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
@@ -0,0 +1,63 @@
<?xml version="1.0" ?>
<!--
~ 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.
-->
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.kie</groupId>
<artifactId>kie-tools-maven-base</artifactId>
<version>${revision}</version>
<relativePath>../../node_modules/@kie-tools/maven-base/pom.xml</relativePath>
</parent>

<artifactId>kogito-data-index-ephemeral-image-app</artifactId>
<version>${revision}</version>

<name>KIE Tools :: Kogito Data Index Ephemeral Image :: App</name>
<description>Kogito Data Index Ephemeral Image Quarkus App</description>

<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>data-index-service-inmemory</artifactId>
<version>${version.org.kie.kogito}</version>
</dependency>
</dependencies>

<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,23 @@
# specific language governing permissions and limitations
# under the License.
#
schema_version: 1

name: "docker.io/apache/incubator-kie-kogito-data-index-ephemeral"
version: "main"
from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.19"
from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.20"
description: "Runtime image for Kogito Data Index Service for ephemeral PostgreSQL persistence provider"

labels:
- name: "org.kie.kogito.version"
- name: org.kie.kogito.version
value: "### SET ME DURING BUILD PROCESS ###"
- name: "maintainer"
- name: maintainer
value: "Apache KIE <[email protected]>"
- name: "io.k8s.description"
- name: io.k8s.description
value: "Runtime image for Kogito Data Index Service for ephemeral PostgreSQL persistence provider"
- name: "io.k8s.display-name"
- name: io.k8s.display-name
value: "Kogito Data Index Service - ephemeral PostgreSQL"
- name: "io.openshift.tags"
- name: io.openshift.tags
value: "kogito,data-index,data-index-ephemeral"
- name: "io.openshift.expose-services"
- name: io.openshift.expose-services
value: "8080:http"

envs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ schema_version: 1
name: org.kie.kogito.dataindex.ephemeral
version: "main"

# see build-kogito-apps-components.sh script, responsible for build it.
# called by the Makefile before builds
# Relative to build/target/image/modules/, that's why the four `../`
artifacts:
- path: /tmp/build/data-index-service-inmemory
dest: /home/kogito/bin
name: quarkus-app
- path: ../../../../app/target/quarkus-app
dest: /home/kogito/bin/quarkus-app

execute:
- script: configure
8 changes: 6 additions & 2 deletions packages/kogito-data-index-postgresql-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,27 @@
"url": "https://github.com/apache/incubator-kie-tools/issues"
},
"scripts": {
"build:dev": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy-assets\" \"pnpm image:build\"",
"build:dev": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm mvn-build-app\" \"pnpm copy-assets\" \"pnpm image:build\"",
"build:prod": "pnpm build:dev && pnpm image:test",
"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",
"copy-test-assets": "run-script-os",
"copy-test-assets:linux:darwin": "cp -R test-resources/. build",
"format": "prettier --write . --ignore-path=../../.prettierignore --ignore-path=../../.gitignore",
"image:build": "run-script-os",
"image:build:darwin:linux": "pnpm setup:env make -C ./build build-kogito-app build",
"image:build:darwin:linux": "pnpm setup:env make -C ./build build",
"image:build:win32": "echo \"Build skipped on Windows\"",
"image:test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"mkdir -p build/target/test/results\" \"run-script-os\" --finally \"mkdir -p build/target/test/results && cp -R build/target/test/results dist-tests-e2e/\"",
"image:test:darwin:linux": "pnpm copy-test-assets && pnpm setup:env make -C ./build test-image",
"image:test:win32": "echo \"Tests skipped on Windows\"",
"install": "node install.js && pnpm format",
"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)"
},
"devDependencies": {
"@kie-tools/maven-base": "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
@@ -0,0 +1,63 @@
<?xml version="1.0" ?>
<!--
~ 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.
-->
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.kie</groupId>
<artifactId>kie-tools-maven-base</artifactId>
<version>${revision}</version>
<relativePath>../../node_modules/@kie-tools/maven-base/pom.xml</relativePath>
</parent>

<artifactId>kogito-data-index-postgresql-image-app</artifactId>
<version>${revision}</version>

<name>KIE Tools :: Kogito Data Index PostgreSQL Image :: App</name>
<description>Kogito Data Index PostgreSQL Image Quarkus App</description>

<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>data-index-service-postgresql</artifactId>
<version>${version.org.kie.kogito}</version>
</dependency>
</dependencies>

<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ schema_version: 1

name: "docker.io/apache/incubator-kie-kogito-data-index-ephemeral"
version: "main"
from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.19"
from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.20"
description: "Runtime image for Kogito Data Index Service for PostgreSQL persistence provider"

labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ schema_version: 1
name: org.kie.kogito.dataindex.postgresql
version: "main"

# see build-kogito-apps-components.sh script, responsible for build it.
# called by the Makefile before builds
# Relative to build/target/image/modules/, that's why the four `../`
artifacts:
- path: /tmp/build/data-index-service-postgresql
dest: /home/kogito/bin
name: quarkus-app
- path: ../../../../app/target/quarkus-app
dest: /home/kogito/bin/quarkus-app

execute:
- script: configure
8 changes: 6 additions & 2 deletions packages/kogito-jit-runner-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,27 @@
"url": "https://github.com/apache/incubator-kie-tools/issues"
},
"scripts": {
"build:dev": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy-assets\" \"pnpm image:build\"",
"build:dev": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm mvn-build-app\" \"pnpm copy-assets\" \"pnpm image:build\"",
"build:prod": "pnpm build:dev && pnpm image:test",
"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",
"copy-test-assets": "run-script-os",
"copy-test-assets:linux:darwin": "cp -R test-resources/. build",
"format": "prettier --write . --ignore-path=../../.prettierignore --ignore-path=../../.gitignore",
"image:build": "run-script-os",
"image:build:darwin:linux": "pnpm setup:env make -C ./build build-kogito-app build",
"image:build:darwin:linux": "pnpm setup:env make -C ./build build",
"image:build:win32": "echo \"Build skipped on Windows\"",
"image:test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"mkdir -p build/target/test/results\" \"run-script-os\" --finally \"mkdir -p build/target/test/results && cp -R build/target/test/results dist-tests-e2e/\"",
"image:test:darwin:linux": "pnpm copy-test-assets && pnpm setup:env make -C ./build test-image",
"image:test:win32": "echo \"Tests skipped on Windows\"",
"install": "node install.js && pnpm format",
"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)"
},
"devDependencies": {
"@kie-tools/maven-base": "workspace:*",
"@kie-tools/python-venv": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/sonataflow-image-common": "workspace:*",
Expand Down
63 changes: 63 additions & 0 deletions packages/kogito-jit-runner-image/resources/app/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" ?>
<!--
~ 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.
-->
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.kie</groupId>
<artifactId>kie-tools-maven-base</artifactId>
<version>${revision}</version>
<relativePath>../../node_modules/@kie-tools/maven-base/pom.xml</relativePath>
</parent>

<artifactId>kogito-jit-runner-image-app</artifactId>
<version>${revision}</version>

<name>KIE Tools :: Kogito JIT Runner Image :: App</name>
<description>Kogito JIT Runner Image Quarkus App</description>

<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jitexecutor-runner</artifactId>
<version>${version.org.kie.kogito}</version>
</dependency>
</dependencies>

<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ schema_version: 1

name: "docker.io/apache/incubator-kie-kogito-jit-runner"
version: "main"
from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.19"
from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.20"
description: "Runtime image for Kogito JIT Runner"

labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ schema_version: 1
name: org.kie.kogito.jit-runner
version: "main"

# see build-kogito-apps-components.sh script, responsible for build it.
# called by the Makefile before builds
# Relative to build/target/image/modules/, that's why the four `../`
artifacts:
- path: /tmp/build/jitexecutor-runner
dest: /home/kogito/bin
name: quarkus-app
- path: ../../../../app/target/quarkus-app
dest: /home/kogito/bin/quarkus-app

execute:
- script: configure
Loading
Loading