Skip to content
Merged
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
9 changes: 9 additions & 0 deletions .github/workflows/test_eessi_container_script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- help
- listrepos_default
- listrepos_custom
- no_cvmfs_mounts
- run
- shell
- container
Expand Down Expand Up @@ -70,6 +71,14 @@ jobs:
./eessi_container.sh --verbose --list-repos | tee ${outfile2}
grep "EESSI/20AB.CD" ${outfile2}

# test use of --repository None
elif [[ ${{matrix.SCRIPT_TEST}} == 'no_cvmfs_mounts' ]]; then
outfile=out_nocvmfs.txt
./eessi_container.sh --verbose --repository None --mode run mount | tee ${outfile}
# make sure that there are no CVMFS mounts in the container, i.e. mount does not have any lines line:
# cvmfs2 on /cvmfs/...
! grep "^cvmfs" ${outfile}

# test use of --mode run
elif [[ ${{matrix.SCRIPT_TEST}} == 'run' ]]; then
outfile=out_run.txt
Expand Down
11 changes: 10 additions & 1 deletion eessi_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ display_help() {
echo " -r | --repository CFG - configuration file or identifier defining the"
echo " repository to use; can be given multiple times;"
echo " CFG may include suffixes ',access={ro,rw},mode={bind,fuse}' to"
echo " overwrite the global access and/or mount mode for this repository"
echo " overwrite the global access and/or mount mode for this repository;"
echo " use 'None' to not mount any repositories"
echo " [default: software.eessi.io via CVMFS config available"
echo " via default container, see --container]"
echo " -u | --resume DIR/TGZ - resume a previous run from a directory or tarball,"
Expand Down Expand Up @@ -353,6 +354,14 @@ if [[ ${#REPOSITORIES[@]} -eq 0 ]]; then
REPOSITORIES+=(${eessi_default_cvmfs_repo})
fi

# if the first element of REPOSITORIES is "none" (case-insensitive),
# make sure it is an empty list from here on, i.e. no repositories will be mounted
if [[ ${REPOSITORIES[0],,} == "none" ]]; then
REPOSITORIES=()
# also prevent the cvmfs-config repo from being mounted
EESSI_DO_NOT_MOUNT_CVMFS_CONFIG_CERN_CH=1
fi

# 1. check if argument values are valid
# (arg -a|--access) check if ACCESS is supported
# use the value as global setting, suffix to --repository can specify an access mode per repository
Expand Down