mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-16 12:45:13 +01:00
CI: Add a debian-stable-i386 CI image
This is identical to the debian-stable image, except that it uses packages from the i386 dpkg architecture (i686-linux-gnu) instead of amd64 (x86_64-linux-gnu). x86_64 Docker hosts with x86_64 kernels can run i386 Docker images, so we can use our existing CI workers. Instead of duplicating the content of the Dockerfile, add a layer of architecture-switching so we can build essentially the same image from a different base. Signed-off-by: Simon McVittie <smcv@debian.org>
This commit is contained in:
parent
f8ecf25975
commit
630930a60b
@ -1,4 +1,5 @@
|
|||||||
FROM debian:bookworm
|
ARG ARCHITECTURE_PREFIX=
|
||||||
|
FROM ${ARCHITECTURE_PREFIX}debian:bookworm
|
||||||
|
|
||||||
RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \
|
RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \
|
||||||
bindfs \
|
bindfs \
|
||||||
|
@ -85,6 +85,8 @@ if [ $list == 1 ]; then
|
|||||||
|
|
||||||
echo -e " \\e[1;39m$basename\\e[0m"
|
echo -e " \\e[1;39m$basename\\e[0m"
|
||||||
done
|
done
|
||||||
|
# Special cases that don't have their own Dockerfile
|
||||||
|
echo -e " \\e[1;39mdebian-stable-i386\\e[0m"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -94,8 +96,25 @@ if [ -z "${base}" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "$base.Dockerfile" ]; then
|
case "$base" in
|
||||||
echo -e "\\e[1;31mERROR\\e[0m: Dockerfile for '$base' not found"
|
(debian-stable-i386)
|
||||||
|
dockerfile=debian-stable
|
||||||
|
arch=386
|
||||||
|
if [ "$DOCKER_CMD" = "podman" ]; then
|
||||||
|
arch_prefix=docker.io/i386/
|
||||||
|
else
|
||||||
|
arch_prefix=i386/
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
(*)
|
||||||
|
dockerfile="$base"
|
||||||
|
arch=""
|
||||||
|
arch_prefix=""
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ ! -f "$dockerfile.Dockerfile" ]; then
|
||||||
|
echo -e "\\e[1;31mERROR\\e[0m: Dockerfile for '$dockerfile' not found"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -113,8 +132,10 @@ if [ $build == 1 ]; then
|
|||||||
--build-arg HOST_USER_ID="$UID" \
|
--build-arg HOST_USER_ID="$UID" \
|
||||||
--build-arg COVERITY_SCAN_PROJECT_NAME="${COVERITY_SCAN_PROJECT_NAME}" \
|
--build-arg COVERITY_SCAN_PROJECT_NAME="${COVERITY_SCAN_PROJECT_NAME}" \
|
||||||
--build-arg COVERITY_SCAN_TOKEN="${COVERITY_SCAN_TOKEN}" \
|
--build-arg COVERITY_SCAN_TOKEN="${COVERITY_SCAN_TOKEN}" \
|
||||||
|
${arch_prefix+--build-arg ARCHITECTURE_PREFIX="${arch_prefix}"} \
|
||||||
|
${arch+--arch="$arch"} \
|
||||||
--tag "${TAG}" \
|
--tag "${TAG}" \
|
||||||
--file "${base}.Dockerfile" .
|
--file "${dockerfile}.Dockerfile" .
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -132,6 +153,7 @@ fi
|
|||||||
if [ $run == 1 ]; then
|
if [ $run == 1 ]; then
|
||||||
echo -e "\\e[1;32mRUNNING\\e[0m: ${base} as ${TAG}"
|
echo -e "\\e[1;32mRUNNING\\e[0m: ${base} as ${TAG}"
|
||||||
$DOCKER_CMD run \
|
$DOCKER_CMD run \
|
||||||
|
${arch+--arch="$arch"} \
|
||||||
--rm \
|
--rm \
|
||||||
--volume "$(pwd)/..:/home/user/app" \
|
--volume "$(pwd)/..:/home/user/app" \
|
||||||
--workdir "/home/user/app" \
|
--workdir "/home/user/app" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user