Skip to content

Commit

Permalink
Merge pull request #24 from cvmfs-contrib/wdconinc-patch-1
Browse files Browse the repository at this point in the history
feat: add logging groups
  • Loading branch information
wdconinc authored Jul 10, 2023
2 parents d4641d0 + 93984f6 commit 880c9e4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion setup-cvmfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@
if [ "$(uname)" == "Linux" ]; then
# download from cache
if [ -n "${APT_CACHE}" ]; then
echo "::group::Using cache"
echo "Copying cache from ${APT_CACHE} to system locations..."
mkdir -p ${APT_CACHE}/archives/ ${APT_CACHE}/lists/
sudo cp -r ${APT_CACHE}/archives /var/cache/apt
sudo cp -r ${APT_CACHE}/lists /var/lib/apt
echo "::endgroup::"
fi
# install cvmfs release package
echo "::group::Installing cvmfs-release"
APT_ARCHIVES=/var/cache/apt/archives/
if [ ! -f ${APT_ARCHIVES}/cvmfs-release-latest_all.deb ] ; then
sudo curl -L -o ${APT_ARCHIVES}/cvmfs-release-latest_all.deb ${CVMFS_UBUNTU_DEB_LOCATION}
fi
sudo dpkg -i ${APT_ARCHIVES}/cvmfs-release-latest_all.deb
echo "::endgroup::"
# install cvmfs package
echo "::group::Installing cvmfs"
sudo apt-get -q update
sudo apt-get -q -y install cvmfs
# install cvmfs config package
Expand All @@ -25,12 +30,15 @@ if [ "$(uname)" == "Linux" ]; then
sudo curl -L -o ${APT_ARCHIVES}/cvmfs-config.deb ${CVMFS_CONFIG_PACKAGE}
sudo dpkg -i ${APT_ARCHIVES}/cvmfs-config.deb
fi
echo "::endgroup::"
# update cache (avoid restricted partial directories)
if [ -n "${APT_CACHE}" ]; then
echo "::group::Updating cache"
echo "Copying cache from system locations to ${APT_CACHE}..."
mkdir -p ${APT_CACHE}/archives/ ${APT_CACHE}/lists/
cp /var/cache/apt/archives/*.deb ${APT_CACHE}/archives/
cp /var/lib/apt/lists/*_dists_* ${APT_CACHE}/lists/
echo "::endgroup::"
fi
elif [ "$(uname)" == "Darwin" ]; then
# Warn about the phasing out of MacOS support for this action
Expand All @@ -50,14 +58,15 @@ fi

${ACTION_PATH}/createConfig.sh

echo "Run cvmfs_config setup"
echo "::group::Running cvmfs_config setup"
sudo cvmfs_config setup
retCongif=$?
if [ $retCongif -ne 0 ]; then
echo "!!! github-action-cvmfs FAILED !!!"
echo "cvmfs_config setup exited with ${retCongif}"
exit $retCongif
fi
echo "::endgroup::"


if [ "$(uname)" == "Darwin" ]; then
Expand Down

0 comments on commit 880c9e4

Please sign in to comment.