@@ -359,14 +359,14 @@ ARG JOBS=16
359
359
#RUN bazel build --jobs $JOBS ${CAPI_FLAGS} //src:ovms_shared
360
360
361
361
RUN mkdir -p /tmp/bazel-output && \
362
- bazel --output_base=/tmp/bazel-output \
363
- ${CAPI_FLAGS} \
364
- build --jobs=${JOBS} //src:ovms_shared && \
365
- find /tmp/bazel-output -name libovms_shared.so && \
366
- LIB_PATH=$(find /tmp/bazel-output -name libovms_shared.so | head -n1) && \
367
- echo "Found built file: $LIB_PATH" && \
368
- mkdir -p /ovms_release/lib && \
369
- cp -v "$LIB_PATH" /ovms_release/lib/
362
+ bash -c ' \
363
+ set -euo pipefail && \
364
+ bazel --output_base=/tmp/bazel-output \
365
+ build --jobs=$JOBS ${CAPI_FLAGS} //src:ovms_shared && \
366
+ LIB_PATH=$(find /tmp/bazel-output -name libovms_shared.so | head -n1) && \
367
+ echo "Found built file: $LIB_PATH" && \
368
+ mkdir -p /ovms_release/lib && \
369
+ cp -v "$LIB_PATH" /ovms_release/lib/'
370
370
371
371
# C api app with bazel
372
372
# hadolint ignore=DL3059
@@ -383,12 +383,14 @@ RUN bazel build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && \
383
383
find $(bazel info bazel-bin)/src -type f -name capi_benchmark
384
384
385
385
RUN mkdir -p /tmp/bazel-output && \
386
- bazel --output_base=/tmp/bazel-output \
387
- build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && \
388
- CAPI_BIN=$(find /tmp/bazel-output -type f -name capi_benchmark | head -n1) && \
389
- echo "Found built capi_benchmark: $CAPI_BIN" && \
390
- chmod +x "$CAPI_BIN" && \
391
- "$CAPI_BIN" --niter 2 --nstreams 1 --servable_name "dummy"
386
+ bash -c '\
387
+ set -euo pipefail && \
388
+ bazel --output_base=/tmp/bazel-output \
389
+ build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && \
390
+ CAPI_BIN=$(find /tmp/bazel-output -type f -name capi_benchmark | head -n1) && \
391
+ echo "Found built capi_benchmark: $CAPI_BIN" && \
392
+ chmod +x "$CAPI_BIN" && \
393
+ "$CAPI_BIN" --niter 2 --nstreams 1 --servable_name "dummy"'
392
394
393
395
# C-api C/C++ app with gcc
394
396
COPY MakefileCapi /ovms/
0 commit comments