summaryrefslogtreecommitdiffstats
path: root/.github/scripts/pkg-test.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:04 +0000
commita836a244a3d2bdd4da1ee2641e3e957850668cea (patch)
treecb87c75b3677fab7144f868435243f864048a1e6 /.github/scripts/pkg-test.sh
parentAdding upstream version 1.38.1. (diff)
downloadnetdata-a836a244a3d2bdd4da1ee2641e3e957850668cea.tar.xz
netdata-a836a244a3d2bdd4da1ee2641e3e957850668cea.zip
Adding upstream version 1.39.0.upstream/1.39.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github/scripts/pkg-test.sh')
-rwxr-xr-x.github/scripts/pkg-test.sh36
1 files changed, 33 insertions, 3 deletions
diff --git a/.github/scripts/pkg-test.sh b/.github/scripts/pkg-test.sh
index e3bc3e7d4..45b8c320b 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
@@ -27,8 +28,13 @@ install_fedora_like() {
pkg_version="$(echo "${VERSION}" | tr - .)"
+ if [ "${PKGMGR}" = "dnf" ]; then
+ opts="--allowerasing"
+ fi
+
# 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 +56,29 @@ 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 - .)"
+
+ if [ "${PKGMGR}" = "dnf" ]; then
+ opts="--allowerasing"
+ fi
+
+ # 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 +89,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 +141,9 @@ case "${DISTRO}" in
centos | rockylinux | almalinux)
install_centos
;;
+ amazonlinux)
+ install_amazon_linux
+ ;;
opensuse)
install_suse_like
;;