From ce599014253a410eaf95604fbd853648d1c9648e Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Dec 29 2023 03:57:20 +0000 Subject: Save system output in test_highstate - store log files in a subdirectory - add journal output to this directory - add informational message informing the administrator where to go Signed-off-by: Georg Pfuetzenreuter --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 865019a..cdf13ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,6 +63,7 @@ test_haproxy: when: always paths: - '*.txt' + - 'system/*.txt' rules: - if: $CI_COMMIT_BRANCH diff --git a/bin/test_highstate.sh b/bin/test_highstate.sh index 2c2614a..9c4595e 100755 --- a/bin/test_highstate.sh +++ b/bin/test_highstate.sh @@ -115,12 +115,16 @@ for role in $(bin/get_roles.py | sed -n "$1 p"); do echo "END OF $role" >> "$out" done -cp /var/log/salt/minion minion_log.txt -cp /var/log/salt/master master_log.txt +mkdir system +cp /var/log/salt/minion system/minion_log.txt +cp /var/log/salt/master system/master_log.txt +journalctl --no-pager > system/journal.txt echo "succeeded roles ($(echo $succeeded_roles | wc -w)): $succeeded_roles" echo echo "failed roles ($(echo $failed_roles | wc -w)): $failed_roles" +echo +echo 'Output and logs can be found in the job artifacts!' exit $STATUS vim:expandtab