ci: run ci-details.sh

This script collects useful information about CI runners.
This commit is contained in:
Jakub Rusz 2022-04-08 14:40:35 +02:00 committed by Ondřej Budai
parent 62f2bf608c
commit 008d013e1c
2 changed files with 18 additions and 0 deletions

View file

@ -5,10 +5,17 @@ stages:
- finish
.terraform:
before_script:
- schutzbot/ci_details.sh > ci-details-before-run
after_script:
- schutzbot/ci_details.sh > ci-details-after-run
- schutzbot/update_github_status.sh update
tags:
- terraform
artifacts:
paths:
- ci-details-before-run
- ci-details-after-run
init:
stage: init

View file

@ -8,6 +8,9 @@ CPUS=$(nproc)
MEM=$(free -m | grep -oP '\d+' | head -n 1)
DISK=$(df --output=size -h / | sed '1d;s/[^0-9]//g')
HOSTNAME=$(uname -n)
USER=$(whoami)
ARCH=$(uname -m)
KERNEL=$(uname -r)
echo -e "\033[0;36m"
cat << EOF
@ -16,17 +19,25 @@ CI MACHINE SPECS
------------------------------------------------------------------------------
Hostname: ${HOSTNAME}
User: ${USER}
Primary IP: ${PRIMARY_IP}
External IP: ${EXTERNAL_IP}
Reverse DNS: ${PTR}
CPUs: ${CPUS}
RAM: ${MEM} GB
DISK: ${DISK} GB
ARCH: ${ARCH}
KERNEL: ${KERNEL}
------------------------------------------------------------------------------
EOF
echo -e "\033[0m"
echo "List of system repositories:"
yum repolist -v
echo "------------------------------------------------------------------------------"
echo "List of installed packages:"
rpm -qa | sort
echo "------------------------------------------------------------------------------"