Skip to content
Snippets Groups Projects
Commit b28d3c63 authored by Nicolas Richart's avatar Nicolas Richart
Browse files

Creating new squashfs after step

parent c4cc2f97
No related branches found
No related tags found
1 merge request!2CI update to use squashfs
Pipeline #201433 failed
......@@ -78,8 +78,10 @@ variables:
--bind ${CI_DATA}/spack-mirror:${MOUNT_POINT}/spack-mirror
--bind ${CI_DATA}/squashfs-cache/:/squashfs-cache \
--bind ${CI_DATA}/overlayfs:/overlayfs \
--fusermount "host:/usr/libexec/apptainer/bin/squashfuse_ll ${CI_DATA}/squashfs-cache/${stack}-${environment}-${SQUASHFS_ID}.sqfs /squashfs"
--fusermount "container:fuse-overlayfs -o squash_to_uid=$(id -n) -o squash_to_gid=$(id -g) -o lowerdir=/squashfs -o upperdir=/overlayfs/upper -o workdir=/overlayfs/wd ${MOUNT_POINT}/${stack}/${environment}/${STACK_VERSION}"
--fusemount "host:/usr/libexec/apptainer/bin/squashfuse_ll ${CI_DATA}/squashfs-cache/${stack}-${environment}-${SQUASHFS_ID}.sqfs /squashfs"
--fusemount "container:fuse-overlayfs -o squash_to_uid=$(id -n) -o squash_to_gid=$(id -g) -o lowerdir=/squashfs -o upperdir=/overlayfs/upper -o workdir=/overlayfs/wd ${MOUNT_POINT}/${stack}/${environment}/${STACK_VERSION}"
after_scripts:
- ./ci/update_squashfs.sh
.spack_cache:
cache:
......
#!/usr/bin/env sh
set -o pipefail
set -o nounset
source ${CI_PROJECT_DIR}/ci/stack_env.sh
if [ "x${CI_DEFAULT_BRANCH}" != "x" ]
then
squash_base=${CI_DEFAULT_BRANCH}
else
squash_base=main
fi
if [ "x${CI_MERGE_REQUEST_IID}" != "x" ]
then
squash_id=${CI_MERGE_REQUEST_IID}
elif [ "x${CI_COMMIT_BRANCH}" != "x" ]
then
squash_id=${CI_MERGE_REQUEST_IID}
else
squash_id="local"
fi
set -o nounset
if [ ! -d /squashfs-cache ]
then
mkdir -p /squashfs-cache
......
......@@ -23,3 +23,21 @@ echo "STACK_LOCATION: ${STACK_LOCATION}"
echo "SPACK_SYSTEM_CONFIG_PATH: ${SPACK_SYSTEM_CONFIG_PATH}"
# echo "SPACK_USER_CACHE_PATH: ${SPACK_USER_CACHE_PATH}"
# echo "SPACK_USER_CONFIG_PATH: ${SPACK_USER_CONFIG_PATH}"
if [ "x${CI_DEFAULT_BRANCH}" != "x" ]
then
squash_base=${CI_DEFAULT_BRANCH}
else
squash_base=main
fi
if [ "x${CI_MERGE_REQUEST_IID}" != "x" ]
then
squash_id=${CI_MERGE_REQUEST_IID}
elif [ "x${CI_COMMIT_BRANCH}" != "x" ]
then
squash_id=${CI_MERGE_REQUEST_IID}
else
squash_id="local"
fi
#!/usr/bin/env sh
set -o errexit
set -o pipefail
set -o nounset
source ${CI_PROJECT_DIR}/ci/stack_env.sh
cd /squashfs-cache
mksquashfs ${STACK_LOCATION} ${stack}-${environment}-${squash_id}-$(date +'%Y%m%d_%H%M').sqfs
ln -sf ${stack}-${environment}-${squash_id}-$(date +'%Y%m%d_%H%M').sqfs ${stack}-${environment}-${squash_id}.sqfs
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment