Skip to content

Commit

Permalink
Save and copy build.log
Browse files Browse the repository at this point in the history
  • Loading branch information
ruhan1 committed Dec 17, 2024
1 parent be23096 commit bc9f774
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 | tee /var/workdir/build.log
""".formatted(recipeImage);

if (type == ToolType.ANT) {
Expand All @@ -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/
""";
}

Expand Down

0 comments on commit bc9f774

Please sign in to comment.