This is an automated email from the ASF dual-hosted git repository.

ricardozanini pushed a commit to branch radtriste-fix-pipelines
in repository 
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-images.git


The following commit(s) were added to refs/heads/radtriste-fix-pipelines by 
this push:
     new 8826cff6 [KOGITO-9729] - (fix) Preserve directory structure while 
copying files in builder image
8826cff6 is described below

commit 8826cff6299b49a578a53ae6eaefb8d828764ef2
Author: Ricardo Zanini <[email protected]>
AuthorDate: Mon Nov 27 14:56:45 2023 -0300

    [KOGITO-9729] - (fix) Preserve directory structure while copying files in 
builder image
    
    Signed-off-by: Ricardo Zanini <[email protected]>
---
 kogito-swf-builder-image.yaml                                      | 2 --
 modules/kogito-swf/common/scripts/added/build-app.sh               | 7 +++----
 .../kogito-swf-builder/resources/greet-with-inputschema/Dockerfile | 2 +-
 tests/shell/kogito-swf-builder/resources/greet/Dockerfile          | 2 +-
 4 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/kogito-swf-builder-image.yaml b/kogito-swf-builder-image.yaml
index 4b9ed0be..421d0448 100644
--- a/kogito-swf-builder-image.yaml
+++ b/kogito-swf-builder-image.yaml
@@ -21,8 +21,6 @@
 
     packages:
       manager: microdnf
-      install:
-        - rsync
 
   - name: "quay.io/kiegroup/kogito-swf-builder"
     from: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
diff --git a/modules/kogito-swf/common/scripts/added/build-app.sh 
b/modules/kogito-swf/common/scripts/added/build-app.sh
index b4ead3d5..2f661aed 100755
--- a/modules/kogito-swf/common/scripts/added/build-app.sh
+++ b/modules/kogito-swf/common/scripts/added/build-app.sh
@@ -21,10 +21,9 @@ fi
 log_info "-> Copying files from ${resources_path}, if any..."
 if [ -n "${resources_path}" ]; then
     
destination="${KOGITO_HOME}/serverless-workflow-project/src/main/resources/"
-    cd "${resources_path}" && 
-          rsync -av --remove-source-files --prune-empty-dirs --progress 
--files-from <(find . -regex '.*\.\(yaml\|yml\|json\|properties\)$' -type f) . 
"$destination" && 
-          cd -
-    find "${resources_path}" -name 'jvm.config' -exec echo "--> found {}" \; 
-exec mkdir -p .mvn \; -exec cp -v {} .mvn/ \;
+    log_info "-> Destination folder is ${destination}"
+    cp -vR ${resources_path}/* ${destination}
+    find "${resources_path}" -name 'jvm.config' -exec echo "--> found {}" \; 
-exec mkdir -p  ${destination}/.mvn \; -exec cp -v {} ${destination}/.mvn/ \;
 else
     log_warning "-> Nothing to copy from ${resources_path}"
 fi
diff --git 
a/tests/shell/kogito-swf-builder/resources/greet-with-inputschema/Dockerfile 
b/tests/shell/kogito-swf-builder/resources/greet-with-inputschema/Dockerfile
index a8e4bdd1..3581d31c 100644
--- a/tests/shell/kogito-swf-builder/resources/greet-with-inputschema/Dockerfile
+++ b/tests/shell/kogito-swf-builder/resources/greet-with-inputschema/Dockerfile
@@ -11,7 +11,7 @@ ARG MAVEN_DOWNLOAD_OUTPUT="true"
 ARG MAVEN_OFFLINE_MODE="true"
 
 # Copy from build context to resources directory
-COPY * ./resources/
+COPY --chown=1001 . ./resources
 
 # Build app with given resources
 RUN "${KOGITO_HOME}"/launch/build-app.sh './resources'
diff --git a/tests/shell/kogito-swf-builder/resources/greet/Dockerfile 
b/tests/shell/kogito-swf-builder/resources/greet/Dockerfile
index a8e4bdd1..3581d31c 100644
--- a/tests/shell/kogito-swf-builder/resources/greet/Dockerfile
+++ b/tests/shell/kogito-swf-builder/resources/greet/Dockerfile
@@ -11,7 +11,7 @@ ARG MAVEN_DOWNLOAD_OUTPUT="true"
 ARG MAVEN_OFFLINE_MODE="true"
 
 # Copy from build context to resources directory
-COPY * ./resources/
+COPY --chown=1001 . ./resources
 
 # Build app with given resources
 RUN "${KOGITO_HOME}"/launch/build-app.sh './resources'


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to