update bats to alpine:3.20

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2024-06-19 17:33:04 -07:00
parent 181d5de6ff
commit 6d7ca78654
2 changed files with 5 additions and 3 deletions

View File

@@ -1,7 +1,9 @@
#syntax=docker/dockerfile:1.8
#check=error=true
FROM --platform=$BUILDPLATFORM alpine AS build
ARG ALPINE_VERSION=3.20
FROM --platform=$BUILDPLATFORM alpine:${ALPINE_VERSION} AS build
RUN apk add --no-cache git
WORKDIR /work
RUN git clone --bare https://github.com/ztombol/bats-support && \
@@ -19,7 +21,7 @@ RUN echo 'source "$(dirname "${BASH_SOURCE[0]}")/bats-support/load.bash"' > /out
FROM scratch AS release
COPY --from=build /out /
FROM alpine:3.19 AS test-gen
FROM alpine:${ALPINE_VERSION} AS test-gen
RUN apk add --no-cache bats
WORKDIR /work
COPY --from=release . .

View File

@@ -27,5 +27,5 @@ not ok 5 run-fail
The following warnings were encountered during tests:
BW01: `run`'s command `./foobar` exited with code 127, indicating 'Command not found'. Use run's return code checks, e.g. `run -127`, to fix this message.
(from function `run' in file /usr/lib/bats-core/test_functions.bash, line 421,
(from function `run' in file /usr/lib/bats-core/test_functions.bash, line 426,
in test file test.bats, line 15)