Add lantern stage/task_begin/end directives to make output pretty
continuous-integration/laminar-eldarion Build failed with exit code 123 after 5 seconds Details

This commit is contained in:
Starbeamrainbowlabs 2021-11-26 22:05:50 +00:00
parent bcb8a1c6c3
commit 3cfc950335
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
2 changed files with 34 additions and 1 deletions

View File

@ -93,6 +93,7 @@ task_begin "Setting initial state";
cat apt-packages.txt >"${temp_dir}/apt-packages.txt";
queue_preinstall_step "10-apt-update.sh";
queue_preinstall_step "15-ufw.sh";
queue_postinstall_step "100-ssh-cluster-config.sh";
task_end "$?";
@ -109,6 +110,8 @@ step_current="1";
stage_begin "Configuring software choices";
# TODO: hostname
if ask_yesno "Use apt cache?"; then
source ./steps-config/10-apt-cache.sh;
fi
@ -117,6 +120,13 @@ if ask_yesno "Install Docker?"; then
source ./steps-config/10-docker.sh;
fi
###
# Autonomous config tasks
###
source ./steps-config/50-avahi-daemon.sh
stage_end "$?";
###############################################################################
@ -125,10 +135,12 @@ stage_end "$?";
# Pre-install tasks
###
stage_begin "Executing pre-install tasks";
while read -r preinstall_step; do
#shellcheck disable=SC1090
source "steps-preinstall/${preinstall_step}";
done < <(cat "${temp_dir}/steps-preinstall.txt");
stage_end "$?" "1 or more pre-install tasks failed";
###############################################################################
@ -136,7 +148,9 @@ done < <(cat "${temp_dir}/steps-preinstall.txt");
# Install packages
###
apt-get install "$(cat "${temp_dir}/apt-packages.txt")";
stage_begin "Installing apt packages";
apt-get install --no-install-recommends --yes "$(cat "${temp_dir}/apt-packages.txt")";
stage_end "$?" "Failed to install apt packages";
###############################################################################
@ -144,10 +158,12 @@ apt-get install "$(cat "${temp_dir}/apt-packages.txt")";
# Post-install tasks
###
stage_begin "Running post-install tasks";
while read -r postinstall_step; do
#shellcheck disable=SC1090
source "steps-postinstall/${postinstall_step}";
done < <(cat "${temp_dir}/steps-postinstall.txt");
stage_begin "$?" "Failed to run 1 or more post-install tasks";
###############################################################################
@ -156,3 +172,20 @@ done < <(cat "${temp_dir}/steps-postinstall.txt");
###
source "steps-last/15-ufw.sh";
echo "
██████ ██████ ██████ ██ ██ ██ ███████ ██ ██████ ███ ██ ██ ███ ██ ██████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██
██████ ██████ ██ ██ ██ ██ ██ ███████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██████ ████ ██ ███████ ██ ██████ ██ ████ ██ ██ ████ ██████
██████ ██████ ███ ███ ██████ ██ ███████ ████████ ███████ ██
██ ██ ██ ████ ████ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ████ ██ ██████ ██ █████ ██ █████ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██████ ██████ ██ ██ ██ ███████ ███████ ██ ███████ ██
This host is now ready for use.
";