Skip to content

Commit

Permalink
Merge pull request #2327 from ruhan1/main-log
Browse files Browse the repository at this point in the history
Save and copy build.log
  • Loading branch information
rnc authored Dec 17, 2024
2 parents 908d8a5 + 95c1f1c commit 43cb638
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private String getContainerFile() {
ENV HTTPS_PROXY=${http_proxy}
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) {
Expand All @@ -212,12 +212,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/
""";
}

Expand Down

0 comments on commit 43cb638

Please sign in to comment.