@cryptotaxi247 / netdata-1 / commits / f5e999b45

Ci coverage (#13118)

* add check to verify autoupdate is still enabled after netdata update * add script to install CI support packages before installing netdata

maneamarius committed Jun 14, 2022 at 14:17 UTC f5e999b45b636394d97d9448cfe53508c536b9e2
3 files changed +28 -1
.github/scripts/check-updater.sh
+12 -1
@@ -17,7 +17,18 @@ check_successful_update() {
17 ) >&2
18 }
19
20 -steps="check_successful_update"
20 +check_autoupdate_enabled() {
21 + progress "Check autoupdate still enabled after update"
22 + (
23 + if [ -f /etc/periodic/daily/netdata-updater ] || [ -f /etc/cron.daily/netdata-updater ]; then
24 + echo "Update successful!"
25 + else
26 + exit 1
27 + fi
28 + ) >&2
29 +}
30 +
31 +steps="check_successful_update check_autoupdate_enabled"
32
33 _main() {
34 for step in $steps; do
.github/scripts/ci-support-pkgs.sh new
+14
@@ -0,0 +1,14 @@
1 +#!/bin/sh
2 +
3 +# This script installs supporting packages needed for CI, which provide following:
4 +# cron, pidof
5 +
6 +set -e
7 +
8 +if [ -f /etc/centos-release ] || [ -f /etc/redhat-release ] || [ -f /etc/fedora-release ] || [ -f /etc/almalinux-release ]; then
9 + # Alma, Fedora, CentOS, Redhat
10 + dnf install -y procps-ng cronie cronie-anacron || yum install -y procps-ng cronie cronie-anacron
11 +elif [ -f /etc/arch-release ]; then
12 + # Arch
13 + pacman -S --noconfirm cronie
14 +fi
.github/scripts/run-updater-check.sh
+2
@@ -1,5 +1,7 @@
1 #!/bin/sh
2
3 +echo ">>> Installing CI support packages..."
4 +/netdata/.github/scripts/ci-support-pkgs.sh
5 echo ">>> Installing Netdata..."
6 /netdata/packaging/installer/kickstart.sh --dont-wait --build-only --disable-telemetry || exit 1
7 echo "::group::Environment File Contents"