Skip to content

Commit bc9f774

Browse files
committed
Save and copy build.log
1 parent be23096 commit bc9f774

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/AbstractPreprocessor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ private String getContainerFile() {
189189
ENV PROXY_URL=$PROXY_URL
190190
COPY .jbs/run-build.sh /var/workdir
191191
COPY . /var/workdir/workspace/source/
192-
RUN /var/workdir/run-build.sh
192+
RUN /var/workdir/run-build.sh | tee /var/workdir/build.log
193193
""".formatted(recipeImage);
194194

195195
if (type == ToolType.ANT) {
@@ -203,12 +203,14 @@ private String getContainerFile() {
203203
RUN /opt/jboss/container/java/run/run-java.sh copy-artifacts --source-path=/var/workdir/workspace/source --deploy-path=/var/workdir/workspace/artifacts
204204
FROM scratch
205205
COPY --from=1 /var/workdir/workspace/artifacts /deployment/
206+
COPY --from=0 /var/workdir/build.log /log/
206207
""".formatted(buildRequestProcessorImage);
207208
} else {
208209
containerFile +=
209210
"""
210211
FROM scratch
211212
COPY --from=0 /var/workdir/workspace/artifacts /deployment/
213+
COPY --from=0 /var/workdir/build.log /log/
212214
""";
213215
}
214216

0 commit comments

Comments
 (0)