You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by ri...@apache.org on 2023/11/21 20:14:26 UTC

(incubator-kie-kogito-images) 35/47: try log everything

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

commit 2338e98d7e438699694d6f39b2cd5e4aa0df2556
Author: jstastny-cz <ja...@ibm.com>
AuthorDate: Thu Nov 16 14:42:02 2023 +0100

    try log everything
---
 .ci/jenkins/Jenkinsfile.build-image | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/.ci/jenkins/Jenkinsfile.build-image b/.ci/jenkins/Jenkinsfile.build-image
index fbce6552..f979091f 100644
--- a/.ci/jenkins/Jenkinsfile.build-image
+++ b/.ci/jenkins/Jenkinsfile.build-image
@@ -188,7 +188,7 @@ pipeline {
                         unstable "Testing error(s) for image ${getBuildImageName()}"
                     } finally {
                         junit testResults: 'target/**/*.xml', allowEmptyResults: true
-                        archiveArtifacts artifacts: 'target/**/*.xml', allowEmptyArchive: true
+                        archiveArtifacts artifacts: 'target/**/*.xml, **/*.txt, **/*.log', allowEmptyArchive: true
                     }
                 }
             }
@@ -199,7 +199,7 @@ pipeline {
             script {
                 updateGithubCommitStatusFromBuildResult()
                 collectContainerLogs()
-                archiveArtifacts artifacts: '**/*-build.log, **/*-container.log', allowEmptyArchive: true
+                archiveArtifacts artifacts: '**/*-build.log, **/containers.log', allowEmptyArchive: true
             }
         }
     }
@@ -207,8 +207,7 @@ pipeline {
 
 void collectContainerLogs() {
     sh '''#!/bin/bash
-        BUILDER_CONTAINER_NAME=$(docker container ls --filter 'name=buildx_buildkit_mybuilder' --format '{{.Names}}')
-        docker exec -it $BUILDER_CONTAINER_NAME bash -c 'for container in $(docker container ls --format "{{.Names}}"); do echo "[$container:START]"; docker logs $container; echo "[$container:END]"; done' &> full.log
+        for container in $(docker container ls --format "{{.Names}}"); do echo "[$container:START]"; docker logs $container; echo "[$container:END]"; done' &> containers.log
     '''
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org