summaryrefslogtreecommitdiffstats
path: root/.github/scripts
diff options
context:
space:
mode:
authormaneamarius <locomotion.itservices@gmail.com>2022-06-14 14:17:21 +0300
committerGitHub <noreply@github.com>2022-06-14 14:17:21 +0300
commitf5e999b45b636394d97d9448cfe53508c536b9e2 (patch)
tree5f7dabaf3aa0ff4138f35ee22fd419d229daec39 /.github/scripts
parent05689dfbeecc35368fca2b9d726c7bb520c04c30 (diff)
Ci coverage (#13118)
* add check to verify autoupdate is still enabled after netdata update * add script to install CI support packages before installing netdata
Diffstat (limited to '.github/scripts')
-rwxr-xr-x.github/scripts/check-updater.sh13
-rwxr-xr-x.github/scripts/ci-support-pkgs.sh14
-rwxr-xr-x.github/scripts/run-updater-check.sh2
3 files changed, 28 insertions, 1 deletions
diff --git a/.github/scripts/check-updater.sh b/.github/scripts/check-updater.sh
index 1051f1eee4..3df0c9de48 100755
--- a/.github/scripts/check-updater.sh
+++ b/.github/scripts/check-updater.sh
@@ -17,7 +17,18 @@ check_successful_update() {
) >&2
}
-steps="check_successful_update"
+check_autoupdate_enabled() {
+ progress "Check autoupdate still enabled after update"
+ (
+ if [ -f /etc/periodic/daily/netdata-updater ] || [ -f /etc/cron.daily/netdata-updater ]; then
+ echo "Update successful!"
+ else
+ exit 1
+ fi
+ ) >&2
+}
+
+steps="check_successful_update check_autoupdate_enabled"
_main() {
for step in $steps; do
diff --git a/.github/scripts/ci-support-pkgs.sh b/.github/scripts/ci-support-pkgs.sh
new file mode 100755
index 0000000000..bfa9c83a55
--- /dev/null
+++ b/.github/scripts/ci-support-pkgs.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# This script installs supporting packages needed for CI, which provide following:
+# cron, pidof
+
+set -e
+
+if [ -f /etc/centos-release ] || [ -f /etc/redhat-release ] || [ -f /etc/fedora-release ] || [ -f /etc/almalinux-release ]; then
+ # Alma, Fedora, CentOS, Redhat
+ dnf install -y procps-ng cronie cronie-anacron || yum install -y procps-ng cronie cronie-anacron
+elif [ -f /etc/arch-release ]; then
+ # Arch
+ pacman -S --noconfirm cronie
+fi
diff --git a/.github/scripts/run-updater-check.sh b/.github/scripts/run-updater-check.sh
index d8961f8b4d..31ab71de80 100755
--- a/.github/scripts/run-updater-check.sh
+++ b/.github/scripts/run-updater-check.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+echo ">>> Installing CI support packages..."
+/netdata/.github/scripts/ci-support-pkgs.sh
echo ">>> Installing Netdata..."
/netdata/packaging/installer/kickstart.sh --dont-wait --build-only --disable-telemetry || exit 1
echo "::group::Environment File Contents"