diff --git a/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/AbstractPreprocessor.java b/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/AbstractPreprocessor.java index 9a3076f9a..050d1a30c 100644 --- a/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/AbstractPreprocessor.java +++ b/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/AbstractPreprocessor.java @@ -189,7 +189,7 @@ private String getContainerFile() { ENV PROXY_URL=$PROXY_URL COPY .jbs/run-build.sh /var/workdir COPY . /var/workdir/workspace/source/ - RUN /var/workdir/run-build.sh + RUN /var/workdir/run-build.sh 2>&1 | tee /var/workdir/build.log """.formatted(recipeImage); if (type == ToolType.ANT) { @@ -203,12 +203,14 @@ private String getContainerFile() { RUN /opt/jboss/container/java/run/run-java.sh copy-artifacts --source-path=/var/workdir/workspace/source --deploy-path=/var/workdir/workspace/artifacts FROM scratch COPY --from=1 /var/workdir/workspace/artifacts /deployment/ + COPY --from=0 /var/workdir/build.log /log/ """.formatted(buildRequestProcessorImage); } else { containerFile += """ FROM scratch COPY --from=0 /var/workdir/workspace/artifacts /deployment/ + COPY --from=0 /var/workdir/build.log /log/ """; }