From 86da191ea97036e5304fe04ae70111ff861c58c1 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sat, 8 Jul 2023 11:21:10 -0500 Subject: [PATCH 1/2] feat: add logging groups This adds folding groups in the logging output. --- setup-cvmfs.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/setup-cvmfs.sh b/setup-cvmfs.sh index 1050159..92dd7a7 100755 --- a/setup-cvmfs.sh +++ b/setup-cvmfs.sh @@ -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 "::end group::" 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 @@ -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 @@ -50,7 +58,7 @@ 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 @@ -58,6 +66,7 @@ if [ $retCongif -ne 0 ]; then echo "cvmfs_config setup exited with ${retCongif}" exit $retCongif fi +echo "::endgroup::" if [ "$(uname)" == "Darwin" ]; then From 93984f6d47d7a4007b053d23698f51a6c524109f Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sat, 8 Jul 2023 11:24:01 -0500 Subject: [PATCH 2/2] fix: typo --- setup-cvmfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-cvmfs.sh b/setup-cvmfs.sh index 92dd7a7..9ac8863 100755 --- a/setup-cvmfs.sh +++ b/setup-cvmfs.sh @@ -9,7 +9,7 @@ if [ "$(uname)" == "Linux" ]; then 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 "::end group::" + echo "::endgroup::" fi # install cvmfs release package echo "::group::Installing cvmfs-release"