@cryptotaxi247 / netdata-1 / commits / 04f7154fc

Adds GHA Workflow to actually Build the Agent across all the OS/Distro(s) we support today (#7969)

* Fixed shellcheck warnings/errors and some legitimate bugs in ./packaging/installer/install-required-packages.sh * Fixed erroneous \ * Removed accidentally committed test.sh :D * Remove redundant redirection on grep commands * Fixed erroneous trailing gon search/replace expression * Fixed incorrect expansion of in apt-get invocation * Fixed incorrect expanasion of on other package managers too * Fixed insistent prompt search/replace (adding space) :D * Fixed (properly) handling of opts to pakage managers using a proper array and array expansion * Re-fixed: echo * Bah humbug :D * Rebased on master * Fixed erroneous \ * Added support for CentOS 8.x * Removed extra space * Rebased on centos8_deps_2 * Added GHA workflor for testing install-required-packages * Rebased on centos8_deps_3 * Only test on archlinux:latest * Add Ubuntu 16.04 and 19.04 to the matrix * Remove test.sh :) * Added GHA Workflow to actually Build the Agent across all the OS/Distro(s) we support today * Added option --netdta-all which seems to tell install-required-pacakges to install all dependencies * Fixed the netdata-all argument * Disable centos:8 for now * Use all argument * Fix version check for CentOS 8.x * Automatically install Okay repo for CentOS 6.x * Disable opensuse (for now) * Fixed CentOS 6.x version dtection * Remove Debian jessie (unsupported) Added Debian bullseye

James Mills committed Feb 5, 2020 at 06:03 UTC 04f7154fcaabba8f243a5e7838b194d746bbb659
2 files changed +82 -1
.github/workflows/build.yml new
+71
@@ -0,0 +1,71 @@
1 +---
2 +name: Builder
3 +on:
4 + push:
5 + branches:
6 + - master
7 + pull_request:
8 +jobs:
9 + build:
10 + name: Build
11 + strategy:
12 + matrix:
13 + distro:
14 + - 'alpine:3.11'
15 + - 'alpine:3.10'
16 + - 'alpine:3.9'
17 + - 'archlinux:latest'
18 + #- 'centos:8'
19 + - 'centos:7'
20 + - 'centos:6'
21 + - 'debian:bullseye'
22 + - 'debian:buster'
23 + - 'debian:stretch'
24 + - 'fedora:31'
25 + - 'fedora:30'
26 + - 'fedora:29'
27 + #- 'opensuse/leap:15.2'
28 + #- 'opensuse/leap:15.1'
29 + #- 'opensuse/leap:15.0'
30 + #- 'opensuse/tumbleweed:latest'
31 + - 'ubuntu:20.04'
32 + - 'ubuntu:19.10'
33 + - 'ubuntu:19.04'
34 + - 'ubuntu:18.04'
35 + - 'ubuntu:16.04'
36 + include:
37 + - distro: 'alpine:3.11'
38 + pre: 'apk add -U bash'
39 + - distro: 'alpine:3.10'
40 + pre: 'apk add -U bash'
41 + - distro: 'alpine:3.9'
42 + pre: 'apk add -U bash'
43 +
44 + - distro: 'archlinux:latest'
45 + pre: 'pacman --noconfirm -Sy grep'
46 +
47 + - distro: 'debian:bullseye'
48 + pre: 'apt-get update'
49 + - distro: 'debian:buster'
50 + pre: 'apt-get update'
51 + - distro: 'debian:stretch'
52 + pre: 'apt-get update'
53 +
54 + - distro: 'ubuntu:20.04'
55 + pre: 'apt-get update'
56 + - distro: 'ubuntu:19.10'
57 + pre: 'apt-get update'
58 + - distro: 'ubuntu:19.04'
59 + pre: 'apt-get update'
60 + - distro: 'ubuntu:18.04'
61 + pre: 'apt-get update'
62 + - distro: 'ubuntu:16.04'
63 + pre: 'apt-get update'
64 + runs-on: ubuntu-latest
65 + steps:
66 + - uses: actions/checkout@v1
67 + - name: Build on ${{ matrix.distro }}
68 + env:
69 + PRE: ${{ matrix.pre }}
70 + run: |
71 + 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'
packaging/installer/install-required-packages.sh
+11 -1
@@ -1243,6 +1243,8 @@ validate_tree_centos() {
1243 opts="-y"
1244 fi
1245
1246 + echo >&2 " > CentOS Version: ${version} ..."
1247 +
1248 echo >&2 " > Checking for epel ..."
1249 if ! rpm -qa | grep epel > /dev/null; then
1250 if prompt "epel not found, shall I install it?"; then
@@ -1250,7 +1252,7 @@ validate_tree_centos() {
1252 fi
1253 fi
1254
1253 - if [ "$VERSION_ID" -eq 8 ]; then
1255 + if [ "$version" -eq 8 ]; then
1256 echo >&2 " > Checking for config-manager ..."
1257 if ! run yum ${sudo} config-manager; then
1258 if prompt "config-manager not found, shall I install it?"; then
@@ -1271,6 +1273,14 @@ validate_tree_centos() {
1273 run ${sudo} yum ${opts} install https://extras.getpagespeed.com/release-el8-latest.rpm
1274 fi
1275 fi
1276 + elif [[ "${version}" =~ ^6\..*$ ]]; then
1277 + echo >&2 " > Detected CentOS 6.x ..."
1278 + echo >&2 " > Checking for Okay ..."
1279 + if ! rpm -qa | grep okay > /dev/null; then
1280 + if prompt "okay not found, shall I install it?"; then
1281 + run ${sudo} yum ${opts} install http://repo.okay.com.mx/centos/6/x86_64/release/okay-release-1-3.el6.noarch.rpm
1282 + fi
1283 + fi
1284 fi
1285 }
1286