summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2023-03-13 07:35:07 -0400
committerGitHub <noreply@github.com>2023-03-13 07:35:07 -0400
commitcd8c7a26b6dbbbc3da6b603e0c6e2c50439ff598 (patch)
tree222c9e8fe94d613239da9c0eb9f040b65d57a9af /.github
parentbb3cbfcb41505b3cd77abccdecfe548f8ebd0f7f (diff)
Add Amazon Linux 2 to CI and platform support. (#14599)
* Add Amazon Linux 2 to CI and platform support. * Fix conditional in repoconfig spec file. * Fix package testing script. * Add support to kickstart.sh. * Fix pkg-test.sh typo. * Fix CI support package handling. * Make updater log to stderr if running under CI. * Fix broken sed expressions in installer. * Fix updater CI check WRT auto-update checking. * Update .github/scripts/pkg-test.sh Co-authored-by: Tasos Katsoulas <12612986+tkatsoulas@users.noreply.github.com> * Clean up package testing code. * Fix filename matching for package testing. --------- Co-authored-by: Tasos Katsoulas <12612986+tkatsoulas@users.noreply.github.com>
Diffstat (limited to '.github')
-rw-r--r--.github/data/distros.yml11
-rwxr-xr-x.github/scripts/ci-support-pkgs.sh17
-rwxr-xr-x.github/scripts/pkg-test.sh28
-rwxr-xr-x.github/scripts/run-updater-check.sh1
4 files changed, 47 insertions, 10 deletions
diff --git a/.github/data/distros.yml b/.github/data/distros.yml
index 72dd6ab79c..9822535e84 100644
--- a/.github/data/distros.yml
+++ b/.github/data/distros.yml
@@ -74,6 +74,17 @@ include:
- el/8Server
- el/8Client
+ - distro: amazonlinux
+ version: "2"
+ packages:
+ type: rpm
+ repo_distro: amazonlinux/2
+ arches:
+ - x86_64
+ - aarch64
+ test:
+ ebpf-core: false
+
- distro: centos
version: "7"
eol_check: false
diff --git a/.github/scripts/ci-support-pkgs.sh b/.github/scripts/ci-support-pkgs.sh
index bfa9c83a55..9ba11b68ee 100755
--- a/.github/scripts/ci-support-pkgs.sh
+++ b/.github/scripts/ci-support-pkgs.sh
@@ -5,10 +5,13 @@
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
+. /etc/os-release
+
+case "${ID}" in
+ amzn|almalinux|centos|fedora)
+ dnf install -y procps-ng cronie cronie-anacron || yum install -y procps-ng cronie cronie-anacron
+ ;;
+ arch)
+ pacman -S --noconfirm cronie
+ ;;
+esac
diff --git a/.github/scripts/pkg-test.sh b/.github/scripts/pkg-test.sh
index e3bc3e7d46..6e6e64f486 100755
--- a/.github/scripts/pkg-test.sh
+++ b/.github/scripts/pkg-test.sh
@@ -13,6 +13,7 @@ install_debian_like() {
apt-get update
# Install Netdata
+ # Strange quoting is required here so that glob matching works.
apt-get install -y /netdata/artifacts/netdata_"${VERSION}"*_*.deb || exit 1
# Install testing tools
@@ -28,7 +29,8 @@ install_fedora_like() {
pkg_version="$(echo "${VERSION}" | tr - .)"
# Install Netdata
- "$PKGMGR" install -y /netdata/artifacts/netdata-"${pkg_version}"-*.rpm
+ # Strange quoting is required here so that glob matching works.
+ "$PKGMGR" install -y /netdata/artifacts/netdata-"${pkg_version}"-*.rpm || exit 1
# Install testing tools
"$PKGMGR" install -y curl nc jq || exit 1
@@ -50,9 +52,25 @@ install_centos() {
"$PKGMGR" install -y epel-release || exit 1
# Install Netdata
- "$PKGMGR" install -y /netdata/artifacts/netdata-"${pkg_version}"-*.rpm
+ # Strange quoting is required here so that glob matching works.
+ "$PKGMGR" install -y /netdata/artifacts/netdata-"${pkg_version}"-*.rpm || exit 1
# Install testing tools
+ # shellcheck disable=SC2086
+ "$PKGMGR" install -y ${opts} curl nc jq || exit 1
+}
+
+install_amazon_linux() {
+ PKGMGR="$( (command -v dnf > /dev/null && echo "dnf") || echo "yum")"
+
+ pkg_version="$(echo "${VERSION}" | tr - .)"
+
+ # Install Netdata
+ # Strange quoting is required here so that glob matching works.
+ "$PKGMGR" install -y /netdata/artifacts/netdata-"${pkg_version}"-*.rpm || exit 1
+
+ # Install testing tools
+ # shellcheck disable=SC2086
"$PKGMGR" install -y ${opts} curl nc jq || exit 1
}
@@ -63,7 +81,8 @@ install_suse_like() {
pkg_version="$(echo "${VERSION}" | tr - .)"
# Install Netdata
- zypper install -y --allow-unsigned-rpm /netdata/artifacts/netdata-"${pkg_version}"-*.rpm
+ # Strange quoting is required here so that glob matching works.
+ zypper install -y --allow-unsigned-rpm /netdata/artifacts/netdata-"${pkg_version}"-*.rpm || exit 1
# Install testing tools
zypper install -y --no-recommends curl netcat-openbsd jq || exit 1
@@ -114,6 +133,9 @@ case "${DISTRO}" in
centos | rockylinux | almalinux)
install_centos
;;
+ amazonlinux)
+ install_amazon_linux
+ ;;
opensuse)
install_suse_like
;;
diff --git a/.github/scripts/run-updater-check.sh b/.github/scripts/run-updater-check.sh
index a96a1d6ef9..1224d8f674 100755
--- a/.github/scripts/run-updater-check.sh
+++ b/.github/scripts/run-updater-check.sh
@@ -2,6 +2,7 @@
echo ">>> Installing CI support packages..."
/netdata/.github/scripts/ci-support-pkgs.sh
+mkdir -p /etc/cron.daily # Needed to make auto-update checking work correctly on some platforms.
echo ">>> Installing Netdata..."
/netdata/packaging/installer/kickstart.sh --dont-wait --build-only --disable-telemetry || exit 1
echo "::group::>>> Pre-Update Environment File Contents"