summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml27
-rwxr-xr-xhealth/notifications/alarm-notify.sh.in2
-rwxr-xr-xtests/updater_checks.sh25
3 files changed, 50 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index e1b89dfa1c..c69182c887 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,4 @@
+dist: xenial
sudo: true
language: c
services:
@@ -29,6 +30,8 @@ stages:
- name: Code quality, linting, syntax, code style
- name: Build process
- name: Artifacts validation
+- name: Artifacts validation on bare OS, stable to current lifecycle checks
+ if: branch = master AND (type = pull_request OR type = cron)
# Nightly operations
- name: Nightly operations
@@ -135,6 +138,30 @@ jobs:
+ - stage: "Artifacts validation on bare OS, stable to current lifecycle checks"
+
+ name: Run netdata lifecycle on Ubuntu 16.04 (xenial)
+ script: sudo -E tests/updater_checks.sh
+ after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Ubuntu 16.04"
+
+ - name: Run netdata lifecycle on CentOS 7 (Containerized)
+ script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "centos:7" tests/updater_checks.sh
+ after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare CentOS 7"
+
+ - name: Run netdata lifecycle, on Debian 9 (Containerized)
+ script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "debian:stretch" tests/updater_checks.sh
+ after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Debian 9 (stretch)"
+
+ - name: Run netdata lifecycle, on Ubuntu 19.04 (Containerized)
+ script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "ubuntu:19.04" tests/updater_checks.sh
+ after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Ubuntu 19.04"
+
+ - name: Run netdata lifecycle, on Fedora 30 (Containerized)
+ script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "fedora:30" tests/updater_checks.sh
+ after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Fedora 30"
+
+
+
- stage: Packaging for release
name: Generate changelog and TAG the release (only on special commit msg)
diff --git a/health/notifications/alarm-notify.sh.in b/health/notifications/alarm-notify.sh.in
index 4b0ccf3026..6b2284662d 100755
--- a/health/notifications/alarm-notify.sh.in
+++ b/health/notifications/alarm-notify.sh.in
@@ -1790,7 +1790,7 @@ if [ "${NETDATA_REGISTRY_URL}" == "https://registry.my-netdata.io" ]; then
NETDATA_REGISTRY_UNIQUE_ID="$(cat "@registrydir_POST@/netdata.public.unique.id")"
fi
fi
- if [ ! -z "${NETDATA_REGISTRY_UNIQUE_ID}" ]; then
+ if [ -n "${NETDATA_REGISTRY_UNIQUE_ID}" ]; then
GOTOCLOUD=1
fi
fi
diff --git a/tests/updater_checks.sh b/tests/updater_checks.sh
index dce136853f..6d5aeabf31 100755
--- a/tests/updater_checks.sh
+++ b/tests/updater_checks.sh
@@ -8,9 +8,28 @@
# Author : Pavlos Emm. Katsoulakis <paul@netdata.cloud)
#
-echo "Installing extra dependencies.."
-yum install -y epel-release
-yum install -y git bats
+echo "Syncing/updating repository.."
+running_os="$(cat /etc/os-release |grep '^ID=' | cut -d'=' -f2 | sed -e 's/"//g')"
+
+case "${running_os}" in
+"centos"|"fedora")
+ echo "Running on CentOS, updating YUM repository.."
+ yum clean all
+ yum update -y
+
+ echo "Installing extra dependencies.."
+ yum install -y epel-release
+ yum install -y git bats curl
+ ;;
+"debian"|"ubuntu")
+ echo "Running ${running_os}, updating APT repository"
+ apt-get update -y
+ apt-get install -y git bats curl
+ ;;
+*)
+ echo "Running on ${running_os}, no repository preparation done"
+ ;;
+esac
echo "Running BATS file.."
bats --tap tests/updater_checks.bats