Skip to content

Test for container images #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion .github/workflows/build-publish-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
branches:
- main
paths:
- containers/Dockerfile.EESSI-client*
- containers/Dockerfile.EESSI-*
- containers/build-or-download-cvmfs-rpm.sh

# also rebuild the containers for new releases of filesystem-layer:
Expand Down Expand Up @@ -78,6 +78,35 @@ jobs:
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

- name: Test containers
run: |
CVMFS_VERSION_EXP=$(
grep "ARG cvmfsversion=" containers/${{ env.DOCKERFILE }} | cut -d'=' -f2
)
CVMFS_VERSION_FOUND=$(
docker run ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-${{ matrix.platform }} cvmfs2 --version \
| head -n 1 | cut -d ' ' -f 3
)
FUSEOVERLAYFS_VERSION_EXP=$(
grep "ARG fuseoverlayfsversion=" containers/${{ env.DOCKERFILE }} | cut -d '=' -f 2
)
FUSEOVERLAYFS_VERSION_FOUND=$(
docker run ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-${{ matrix.platform }} fuse-overlayfs --version \
| grep "fuse-overlayfs" | cut -d ' ' -f 3
)
CONTAINER="ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-${{ matrix.platform }}"
if [ "${CVMFS_VERSION_EXP}" = "${CVMFS_VERSION_FOUND}" ] && \
[ "${FUSEOVERLAYFS_VERSION_EXP}" = "${FUSEOVERLAYFS_VERSION_FOUND}" ]
then
echo "Container ${CONTAINER} contains the right versions of CVMFS and fuse-overlayfs!"
exit 0
else
echo "Error for container ${CONTAINER}"
echo "Expected: CVMFS ${CVMFS_VERSION_EXP} and fuse-overlayfs ${FUSEOVERLAYFS_VERSION_EXP}"
echo "Found: CVMFS ${CVMFS_VERSION_FOUND} and fuse-overlayfs ${FUSEOVERLAYFS_VERSION_FOUND}"
exit 1
fi

create_manifest:
name: Create the Docker manifest
needs: build_and_publish
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/test-containers.yml

This file was deleted.

6 changes: 5 additions & 1 deletion containers/Dockerfile.EESSI-build-node-debian10
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
ARG cvmfsversion=2.8.1
# Stick to old version of fuse-overlayfs due to issues with newer versions
# (cfr. https://github.com/containers/fuse-overlayfs/issues/232)
ARG fuseoverlayfsversion=0.3

FROM debian:10.6 AS prepare-deb
ARG cvmfsversion
Expand All @@ -8,6 +11,7 @@ RUN sh /build-or-download-cvmfs-debs.sh ${cvmfsversion}

FROM debian:10.6
ARG cvmfsversion
ARG fuseoverlayfsversion

COPY --from=prepare-deb /root/deb /root/deb

Expand All @@ -17,7 +21,7 @@ RUN dpkg -i /root/deb/cvmfs_${cvmfsversion}~1+debian10_$(dpkg --print-architectu
/root/deb/cvmfs-fuse3_${cvmfsversion}~1+debian10_$(dpkg --print-architecture).deb \
/root/deb/cvmfs-config-default_latest_all.deb \
/root/deb/cvmfs-config-eessi_latest_all.deb
RUN apt-get install -y fuse-overlayfs
RUN apt-get install -y fuse-overlayfs=${fuseoverlayfsversion}-1

RUN echo 'CVMFS_QUOTA_LIMIT=10000' > /etc/cvmfs/default.local \
&& echo 'CVMFS_CLIENT_PROFILE="single"' >> /etc/cvmfs/default.local
Expand Down