Skip to content

Commit

Permalink
Fix jobs-service-allinone, copy files before running docker build
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo Zanini <[email protected]>
  • Loading branch information
ricardozanini committed Feb 5, 2024
1 parent fe34e61 commit 06fe925
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 36 deletions.
8 changes: 1 addition & 7 deletions kogito-jobs-service-allinone-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ schema_version: 1

name: "quay.io/kiegroup/kogito-jobs-service-allinone"
version: "999-SNAPSHOT"
from: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18"
description: "Runtime image for Kogito Jobs Service with all available jdbc providers"

labels:
Expand Down Expand Up @@ -48,18 +48,12 @@ envs:
example: "postgresql"
description: "The all in one image contains all the supported jdbc plugins for Jobs Service, ephemeral and postgresql, if empty, defaults to ephemeral"

packages:
manager: microdnf

modules:
repositories:
- path: modules
install:
- name: org.kie.kogito.image.dependencies
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.openjdk.headless
version: "17"
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.jobs.service.allinone
Expand Down
4 changes: 0 additions & 4 deletions modules/kogito-data-index-ephemeral/community/configure
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@
#
set -e

SOURCES_DIR=/tmp/artifacts
SCRIPT_DIR=$(dirname "${0}")
ADDED_DIR="${SCRIPT_DIR}"/added

mkdir -p "${KOGITO_HOME}"/bin/
cp -vr ${SOURCES_DIR}/quarkus-app "${KOGITO_HOME}"/bin/

cp -v "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}"
chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh
1 change: 1 addition & 0 deletions modules/kogito-data-index-ephemeral/community/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ version: "999-SNAPSHOT"
# called by the Makefile before builds
artifacts:
- path: /tmp/build/data-index-service-inmemory
dest: /home/kogito/bin
name: quarkus-app

execute:
Expand Down
4 changes: 0 additions & 4 deletions modules/kogito-data-index-postgresql/configure
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@
#
set -e

SOURCES_DIR=/tmp/artifacts
SCRIPT_DIR=$(dirname "${0}")
ADDED_DIR="${SCRIPT_DIR}"/added

mkdir -p "${KOGITO_HOME}"/bin/
cp -vr ${SOURCES_DIR}/quarkus-app "${KOGITO_HOME}"/bin/

cp -v "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}"
chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh
1 change: 1 addition & 0 deletions modules/kogito-data-index-postgresql/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ version: "999-SNAPSHOT"
# called by the Makefile before builds
artifacts:
- path: /tmp/build/data-index-service-postgresql
dest: /home/kogito/bin
name: quarkus-app

execute:
Expand Down
5 changes: 0 additions & 5 deletions modules/kogito-jobs-service-all-in-one/configure
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,9 @@
#
set -e

SOURCES_DIR=/tmp/artifacts
SCRIPT_DIR=$(dirname "${0}")
ADDED_DIR="${SCRIPT_DIR}"/added

unzip "${SOURCES_DIR}"/jobs-service-inmemory-quarkus-app.zip -d "${KOGITO_HOME}"/bin/ephemeral
unzip "${SOURCES_DIR}"/jobs-service-postgresql-quarkus-app.zip -d "${KOGITO_HOME}"/bin/postgresql


mkdir "${KOGITO_HOME}"/bin/shared-libs/

mv "${KOGITO_HOME}"/bin/ephemeral/quarkus-app/lib/* "${KOGITO_HOME}"/bin/shared-libs/
Expand Down
14 changes: 6 additions & 8 deletions modules/kogito-jobs-service-all-in-one/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ name: org.kie.kogito.jobs.service.allinone
version: "999-SNAPSHOT"

artifacts:
- path: /tmp/build/jobs-service-inmemory-all-in-one/jobs-service-inmemory-quarkus-app.zip
name: jobs-service-inmemory-quarkus-app.zip
- path: /tmp/build/jobs-service-postgresql-all-in-one/jobs-service-postgresql-quarkus-app.zip
name: jobs-service-postgresql-quarkus-app.zip

packages:
install:
- pam
- path: /tmp/build/jobs-service-inmemory-all-in-one
name: jobs-service-inmemory-all-in-one
dest: /home/kogito/bin/ephemeral
- path: /tmp/build/jobs-service-postgresql-all-in-one
name: jobs-service-postgresql-all-in-one
dest: /home/kogito/bin/postgresql

execute:
- script: configure
4 changes: 0 additions & 4 deletions modules/kogito-jobs-service-ephemeral/configure
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@
#
set -e

SOURCES_DIR=/tmp/artifacts
SCRIPT_DIR=$(dirname "${0}")
ADDED_DIR="${SCRIPT_DIR}"/added

mkdir -p "${KOGITO_HOME}"/bin/ephemeral
cp -vr ${SOURCES_DIR}/quarkus-app "${KOGITO_HOME}"/bin/ephemeral

cp "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}"
chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh
1 change: 1 addition & 0 deletions modules/kogito-jobs-service-ephemeral/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ version: "999-SNAPSHOT"
# called by the Makefile before builds
artifacts:
- path: /tmp/build/jobs-service-inmemory
dest: /home/kogito/bin/ephemeral
name: quarkus-app

execute:
Expand Down
4 changes: 0 additions & 4 deletions modules/kogito-jobs-service-postgresql/configure
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@
#
set -e

SOURCES_DIR=/tmp/artifacts
SCRIPT_DIR=$(dirname "${0}")
ADDED_DIR="${SCRIPT_DIR}"/added

mkdir -p "${KOGITO_HOME}"/bin/postgresql
cp -vr ${SOURCES_DIR}/quarkus-app "${KOGITO_HOME}"/bin/postgresql

cp "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}"
chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh
1 change: 1 addition & 0 deletions modules/kogito-jobs-service-postgresql/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ version: "999-SNAPSHOT"
# called by the Makefile before builds
artifacts:
- path: /tmp/build/jobs-service-postgresql
dest: /home/kogito/bin/postgresql
name: quarkus-app

execute:
Expand Down

0 comments on commit 06fe925

Please sign in to comment.