summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yml71
-rwxr-xr-xpackaging/installer/install-required-packages.sh12
2 files changed, 82 insertions, 1 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000000..9b91588145
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,71 @@
+---
+name: Builder
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+jobs:
+ build:
+ name: Build
+ strategy:
+ matrix:
+ distro:
+ - 'alpine:3.11'
+ - 'alpine:3.10'
+ - 'alpine:3.9'
+ - 'archlinux:latest'
+ #- 'centos:8'
+ - 'centos:7'
+ - 'centos:6'
+ - 'debian:bullseye'
+ - 'debian:buster'
+ - 'debian:stretch'
+ - 'fedora:31'
+ - 'fedora:30'
+ - 'fedora:29'
+ #- 'opensuse/leap:15.2'
+ #- 'opensuse/leap:15.1'
+ #- 'opensuse/leap:15.0'
+ #- 'opensuse/tumbleweed:latest'
+ - 'ubuntu:20.04'
+ - 'ubuntu:19.10'
+ - 'ubuntu:19.04'
+ - 'ubuntu:18.04'
+ - 'ubuntu:16.04'
+ include:
+ - distro: 'alpine:3.11'
+ pre: 'apk add -U bash'
+ - distro: 'alpine:3.10'
+ pre: 'apk add -U bash'
+ - distro: 'alpine:3.9'
+ pre: 'apk add -U bash'
+
+ - distro: 'archlinux:latest'
+ pre: 'pacman --noconfirm -Sy grep'
+
+ - distro: 'debian:bullseye'
+ pre: 'apt-get update'
+ - distro: 'debian:buster'
+ pre: 'apt-get update'
+ - distro: 'debian:stretch'
+ pre: 'apt-get update'
+
+ - distro: 'ubuntu:20.04'
+ pre: 'apt-get update'
+ - distro: 'ubuntu:19.10'
+ pre: 'apt-get update'
+ - distro: 'ubuntu:19.04'
+ pre: 'apt-get update'
+ - distro: 'ubuntu:18.04'
+ pre: 'apt-get update'
+ - distro: 'ubuntu:16.04'
+ pre: 'apt-get update'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+ - name: Build on ${{ matrix.distro }}
+ env:
+ PRE: ${{ matrix.pre }}
+ run: |
+ docker run --rm -e PRE -v $PWD:/netdata -w /netdata ${{ matrix.distro }} /bin/sh -c '[ -n "${PRE}" ] && ${PRE}; ./packaging/installer/install-required-packages.sh --dont-wait --non-interactive all && ./netdata-installer.sh -u --dont-wait --dont-start-it --disable-go'
diff --git a/packaging/installer/install-required-packages.sh b/packaging/installer/install-required-packages.sh
index b0ce127de3..60d84797ae 100755
--- a/packaging/installer/install-required-packages.sh
+++ b/packaging/installer/install-required-packages.sh
@@ -1243,6 +1243,8 @@ validate_tree_centos() {
opts="-y"
fi
+ echo >&2 " > CentOS Version: ${version} ..."
+
echo >&2 " > Checking for epel ..."
if ! rpm -qa | grep epel > /dev/null; then
if prompt "epel not found, shall I install it?"; then
@@ -1250,7 +1252,7 @@ validate_tree_centos() {
fi
fi
- if [ "$VERSION_ID" -eq 8 ]; then
+ if [ "$version" -eq 8 ]; then
echo >&2 " > Checking for config-manager ..."
if ! run yum ${sudo} config-manager; then
if prompt "config-manager not found, shall I install it?"; then
@@ -1271,6 +1273,14 @@ validate_tree_centos() {
run ${sudo} yum ${opts} install https://extras.getpagespeed.com/release-el8-latest.rpm
fi
fi
+ elif [[ "${version}" =~ ^6\..*$ ]]; then
+ echo >&2 " > Detected CentOS 6.x ..."
+ echo >&2 " > Checking for Okay ..."
+ if ! rpm -qa | grep okay > /dev/null; then
+ if prompt "okay not found, shall I install it?"; then
+ run ${sudo} yum ${opts} install http://repo.okay.com.mx/centos/6/x86_64/release/okay-release-1-3.el6.noarch.rpm
+ fi
+ fi
fi
}