diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index b99836d6e4..585312e8d6 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Script to install EESSI pilot software stack (version set through init/eessi_defaults) +# Script to install NESSI software stack (version set through init/eessi_defaults) # see example parsing of command line arguments at # https://wiki.bash-hackers.org/scripting/posparams#using_a_while_loop @@ -188,44 +188,47 @@ fi pr_diff=$(ls [0-9]*.diff | head -1) # use PR patch file to determine in which easystack files stuff was added -for easystack_file in $(cat ${pr_diff} | grep '^+++' | cut -f2 -d' ' | sed 's@^[a-z]/@@g' | grep '^easystacks/.*yml$' | egrep -v 'known-issues|missing'); do - - echo -e "Processing easystack file ${easystack_file}...\n\n" +changed_easystacks=$(cat ${pr_diff} | grep '^+++' | cut -f2 -d' ' | sed 's@^[a-z]/@@g' | grep '^easystacks/.*yml$' | egrep -v 'known-issues|missing') +if [ -z ${changed_easystacks} ]; then + echo "No missing installations, party time!" # Ensure the bot report success, as there was nothing to be build here +else + for easystack_file in ${changed_easystacks}; do - # determine version of EasyBuild module to load based on EasyBuild version included in name of easystack file - eb_version=$(echo ${easystack_file} | sed 's/.*eb-\([0-9.]*\).*/\1/g') + echo -e "Processing easystack file ${easystack_file}...\n\n" - # load EasyBuild module (will be installed if it's not available yet) - source ${TOPDIR}/load_easybuild_module.sh ${eb_version} + # determine version of EasyBuild module to load based on EasyBuild version included in name of easystack file + eb_version=$(echo ${easystack_file} | sed 's/.*eb-\([0-9.]*\).*/\1/g') - ${EB} --show-config + # load EasyBuild module (will be installed if it's not available yet) + source ${TOPDIR}/load_easybuild_module.sh ${eb_version} - echo_green "All set, let's start installing some software with EasyBuild v${eb_version} in ${EASYBUILD_INSTALLPATH}..." + ${EB} --show-config - if [ -f ${easystack_file} ]; then - echo_green "Feeding easystack file ${easystack_file} to EasyBuild..." + echo_green "All set, let's start installing some software with EasyBuild v${eb_version} in ${EASYBUILD_INSTALLPATH}..." - ${EB} --easystack ${TOPDIR}/${easystack_file} --robot - ec=$? + if [ -f ${easystack_file} ]; then + echo_green "Feeding easystack file ${easystack_file} to EasyBuild..." - # copy EasyBuild log file if EasyBuild exited with an error - if [ ${ec} -ne 0 ]; then - eb_last_log=$(unset EB_VERBOSE; eb --last-log) - # copy to current working directory - cp -a ${eb_last_log} . - echo "Last EasyBuild log file copied from ${eb_last_log} to ${PWD}" - # copy to build logs dir (with context added) - copy_build_log "${eb_last_log}" "${build_logs_dir}" - fi + ${EB} --easystack ${TOPDIR}/${easystack_file} --robot + ec=$? - $TOPDIR/check_missing_installations.sh ${TOPDIR}/${easystack_file} - else - fatal_error "Easystack file ${easystack_file} not found!" - fi + # copy EasyBuild log file if EasyBuild exited with an error + if [ ${ec} -ne 0 ]; then + eb_last_log=$(unset EB_VERBOSE; eb --last-log) + # copy to current working directory + cp -a ${eb_last_log} . + echo "Last EasyBuild log file copied from ${eb_last_log} to ${PWD}" + # copy to build logs dir (with context added) + copy_build_log "${eb_last_log}" "${build_logs_dir}" + fi -done + $TOPDIR/check_missing_installations.sh ${TOPDIR}/${easystack_file} + else + fatal_error "Easystack file ${easystack_file} not found!" + fi -### add packages here + done +fi echo ">> Creating/updating Lmod cache..." export LMOD_RC="${EASYBUILD_INSTALLPATH}/.lmod/lmodrc.lua" diff --git a/eessi-2023.06-eb-4.7.2-2021a.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.7.2-2021a.yml similarity index 100% rename from eessi-2023.06-eb-4.7.2-2021a.yml rename to easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.7.2-2021a.yml diff --git a/eessi-2023.06-eb-4.7.2-2021b.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.7.2-2021b.yml similarity index 100% rename from eessi-2023.06-eb-4.7.2-2021b.yml rename to easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.7.2-2021b.yml diff --git a/eessi-2023.06-eb-4.7.2-2022a.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.7.2-2022a.yml similarity index 100% rename from eessi-2023.06-eb-4.7.2-2022a.yml rename to easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.7.2-2022a.yml diff --git a/eessi-2023.06-eb-4.7.2-2022b.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.7.2-2022b.yml similarity index 100% rename from eessi-2023.06-eb-4.7.2-2022b.yml rename to easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.7.2-2022b.yml diff --git a/eessi-2023.06-eb-4.7.2-system.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.7.2-system.yml similarity index 100% rename from eessi-2023.06-eb-4.7.2-system.yml rename to easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.7.2-system.yml diff --git a/eessi-2023.06-eb-4.8.0-system.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.8.0-system.yml similarity index 100% rename from eessi-2023.06-eb-4.8.0-system.yml rename to easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.8.0-system.yml diff --git a/eessi-2023.06-eb-4.8.1-2022a.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.8.1-2022a.yml similarity index 100% rename from eessi-2023.06-eb-4.8.1-2022a.yml rename to easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.8.1-2022a.yml diff --git a/eessi-2023.06-eb-4.8.1-system.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.8.1-system.yml similarity index 100% rename from eessi-2023.06-eb-4.8.1-system.yml rename to easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.8.1-system.yml diff --git a/eessi-2023.06-eb-4.8.2-2022a.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.8.2-2022a.yml similarity index 100% rename from eessi-2023.06-eb-4.8.2-2022a.yml rename to easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.8.2-2022a.yml