summaryrefslogtreecommitdiffstats
path: root/.github/scripts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-x.github/scripts/build-static.sh2
-rwxr-xr-x.github/scripts/deb-sign.sh16
-rwxr-xr-x.github/scripts/gen-docker-tags.py2
-rwxr-xr-x.github/scripts/gen-matrix-eol-check.py3
-rwxr-xr-x.github/scripts/gen-matrix-packaging.py3
-rwxr-xr-x.github/scripts/get-go-version.py2
-rwxr-xr-x.github/scripts/package-upload.sh13
-rwxr-xr-x.github/scripts/pkg-test.sh21
-rwxr-xr-x.github/scripts/platform-impending-eol.py15
-rwxr-xr-x.github/scripts/prepare-release-base.sh5
-rwxr-xr-x.github/scripts/run-updater-check.sh2
-rwxr-xr-x.github/scripts/upload-new-version-tags.sh3
12 files changed, 71 insertions, 16 deletions
diff --git a/.github/scripts/build-static.sh b/.github/scripts/build-static.sh
index e81051438..9b29a3d99 100755
--- a/.github/scripts/build-static.sh
+++ b/.github/scripts/build-static.sh
@@ -22,7 +22,7 @@ prepare_build() {
build_static() {
progress "Building static ${BUILDARCH}"
(
- USER="" ./packaging/makeself/build-static.sh "${BUILDARCH}"
+ EXTRA_INSTALL_FLAGS="${EXTRA_INSTALL_FLAGS}" USER="" ./packaging/makeself/build-static.sh "${BUILDARCH}"
) >&2
}
diff --git a/.github/scripts/deb-sign.sh b/.github/scripts/deb-sign.sh
new file mode 100755
index 000000000..3858411d4
--- /dev/null
+++ b/.github/scripts/deb-sign.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+pkgdir="${1}"
+keyid="${2}"
+
+echo "::group::Installing Dependencies"
+sudo apt-get update
+sudo apt-get upgrade -y
+sudo apt-get install -y debsigs
+echo "::endgroup::"
+
+echo "::group::Signing packages"
+debsigs --sign=origin --default-key="${keyid}" "${pkgdir}"/*.{,d}deb
+echo "::endgroup::"
diff --git a/.github/scripts/gen-docker-tags.py b/.github/scripts/gen-docker-tags.py
index c45b991d9..f60e1cd41 100755
--- a/.github/scripts/gen-docker-tags.py
+++ b/.github/scripts/gen-docker-tags.py
@@ -31,4 +31,6 @@ match version:
)
])
+ tags = tags + tuple([f'{r}:stable' for r in REPOS])
+
print(','.join(tags))
diff --git a/.github/scripts/gen-matrix-eol-check.py b/.github/scripts/gen-matrix-eol-check.py
index 638527284..f080e0b56 100755
--- a/.github/scripts/gen-matrix-eol-check.py
+++ b/.github/scripts/gen-matrix-eol-check.py
@@ -21,7 +21,8 @@ for item in data['include']:
entries.append({
'distro': distro,
'release': item['version'],
- 'full_name': f'{ item["distro"] } { item["version"] }'
+ 'full_name': f'{ item["distro"] } { item["version"] }',
+ 'lts': 1 if 'eol_lts' in item and item['eol_lts'] else 0,
})
entries.sort(key=lambda k: (k['distro'], k['release']))
diff --git a/.github/scripts/gen-matrix-packaging.py b/.github/scripts/gen-matrix-packaging.py
index b695e33ab..c00ff3181 100755
--- a/.github/scripts/gen-matrix-packaging.py
+++ b/.github/scripts/gen-matrix-packaging.py
@@ -27,8 +27,9 @@ for i, v in enumerate(data['include']):
'repo_distro': data['include'][i]['packages']['repo_distro'],
'format': data['include'][i]['packages']['type'],
'base_image': data['include'][i]['base_image'] if 'base_image' in data['include'][i] else ':'.join([data['include'][i]['distro'], data['include'][i]['version']]),
+ 'builder_rev': data['include'][i]['packages']['builder_rev'],
'platform': data['platform_map'][arch],
- 'bundle_sentry': data['include'][i]['bundle_sentry'],
+ 'bundle_sentry': data['include'][i]['bundle_sentry'][arch],
'arch': arch
})
diff --git a/.github/scripts/get-go-version.py b/.github/scripts/get-go-version.py
index 105c537c8..68ca60a2d 100755
--- a/.github/scripts/get-go-version.py
+++ b/.github/scripts/get-go-version.py
@@ -32,7 +32,7 @@ for modfile in GO_SRC.glob('**/go.mod'):
modules.append({
'module': str(modfile.parent),
'version': str(version),
- 'build_target': f'github.com/netdata/netdata/go/{ modfile.parts[-2] }/{ str(mainpath) }/',
+ 'build_target': f'github.com/netdata/netdata/go/plugins/{ str(mainpath) }/',
})
with GITHUB_OUTPUT.open('a') as f:
diff --git a/.github/scripts/package-upload.sh b/.github/scripts/package-upload.sh
index 13d63b4a7..9305ffa67 100755
--- a/.github/scripts/package-upload.sh
+++ b/.github/scripts/package-upload.sh
@@ -2,18 +2,19 @@
set -e
-host="packages.netdata.cloud"
user="netdatabot"
-distro="${1}"
-arch="${2}"
-format="${3}"
-repo="${4}"
+host="${1}"
+distro="${2}"
+arch="${3}"
+format="${4}"
+repo="${5}"
+pkg_src="${6:-./artifacts}"
staging="${TMPDIR:-/tmp}/package-staging"
prefix="/home/netdatabot/incoming/${repo}/"
-packages="$(find artifacts -name "*.${format}")"
+packages="$(find "${pkg_src}" -name "*.${format}")"
mkdir -p "${staging}"
diff --git a/.github/scripts/pkg-test.sh b/.github/scripts/pkg-test.sh
index 6120d3fc3..d58b37304 100755
--- a/.github/scripts/pkg-test.sh
+++ b/.github/scripts/pkg-test.sh
@@ -21,7 +21,9 @@ install_debian_like() {
! -name '*dbgsym*' ! -name '*cups*' ! -name '*freeipmi*') || exit 3
# Install testing tools
- apt-get install -y --no-install-recommends curl "${netcat}" jq || exit 1
+ apt-get install -y --no-install-recommends curl dpkg-dev "${netcat}" jq || exit 1
+
+ dpkg-architecture --equal amd64 || NETDATA_SKIP_EBPF=1
}
install_fedora_like() {
@@ -40,6 +42,8 @@ install_fedora_like() {
# Install testing tools
"${PKGMGR}" install -y curl nc jq || exit 1
+
+ [ "$(rpm --eval '%{_build_arch}')" = "x86_64" ] || NETDATA_SKIP_EBPF=1
}
install_centos() {
@@ -62,6 +66,8 @@ install_centos() {
# Install testing tools
# shellcheck disable=SC2086
"${PKGMGR}" install -y ${opts} curl nc jq || exit 1
+
+ [ "$(rpm --eval '%{_build_arch}')" = "x86_64" ] || NETDATA_SKIP_EBPF=1
}
install_amazon_linux() {
@@ -78,6 +84,8 @@ install_amazon_linux() {
# Install testing tools
# shellcheck disable=SC2086
"${PKGMGR}" install -y ${opts} curl nc jq || exit 1
+
+ [ "$(rpm --eval '%{_build_arch}')" = "x86_64" ] || NETDATA_SKIP_EBPF=1
}
install_suse_like() {
@@ -90,6 +98,8 @@ install_suse_like() {
# Install testing tools
zypper install -y --allow-downgrade --no-recommends curl netcat-openbsd jq || exit 1
+
+ [ "$(rpm --eval '%{_build_arch}')" = "x86_64" ] || NETDATA_SKIP_EBPF=1
}
dump_log() {
@@ -103,7 +113,7 @@ case "${DISTRO}" in
fedora | oraclelinux)
install_fedora_like
;;
- centos| centos-stream | rockylinux | almalinux)
+ centos | centos-stream | rockylinux | almalinux)
install_centos
;;
amazonlinux)
@@ -120,6 +130,13 @@ esac
trap dump_log EXIT
+export NETDATA_LIBEXEC_PREFIX=/usr/libexec/netdata
+export NETDATA_SKIP_LIBEXEC_PARTS="freeipmi|xenstat|nfacct|cups"
+
+if [ -n "${NETDATA_SKIP_EBPF}" ]; then
+ export NETDATA_SKIP_LIBEXEC_PARTS="${NETDATA_SKIP_LIBEXEC_PARTS}|ebpf"
+fi
+
/usr/sbin/netdata -D > ./netdata.log 2>&1 &
"${SCRIPT_DIR}/../../packaging/runtime-check.sh" || exit 1
diff --git a/.github/scripts/platform-impending-eol.py b/.github/scripts/platform-impending-eol.py
index c57e5edde..5b379a4d3 100755
--- a/.github/scripts/platform-impending-eol.py
+++ b/.github/scripts/platform-impending-eol.py
@@ -16,6 +16,7 @@ LEAD_DAYS = datetime.timedelta(days=30)
DISTRO = sys.argv[1]
RELEASE = sys.argv[2]
+LTS = sys.argv[3]
EXIT_NOT_IMPENDING = 0
EXIT_IMPENDING = 1
@@ -47,12 +48,22 @@ except urllib.error.HTTPError as e:
)
sys.exit(EXIT_FAILURE)
-eol = datetime.date.fromisoformat(data['eol'])
+if LTS == '1' and 'extendedSupport' in data:
+ ref = 'extendedSupport'
+else:
+ ref = 'eol'
+ LTS = False
+
+eol = datetime.date.fromisoformat(data[ref])
offset = abs(eol - NOW)
if offset <= LEAD_DAYS:
- print(data['eol'])
+ if LTS:
+ print(data['extendedSupport'])
+ else:
+ print(data['eol'])
+
sys.exit(EXIT_IMPENDING)
else:
sys.exit(EXIT_NOT_IMPENDING)
diff --git a/.github/scripts/prepare-release-base.sh b/.github/scripts/prepare-release-base.sh
index 06a2da160..85bcb7a31 100755
--- a/.github/scripts/prepare-release-base.sh
+++ b/.github/scripts/prepare-release-base.sh
@@ -166,6 +166,11 @@ elif [ "${EVENT_TYPE}" = 'major' ] && [ "${EVENT_VERSION}" != "nightly" ]; then
patch_is_zero || exit 1
check_newer_major_version || exit 1
check_for_existing_tag || exit 1
+ branch_name="$(echo "${EVENT_VERSION}" | cut -f 1-2 -d '.')"
+ if [ -n "$(git branch --list "${branch_name}")" ]; then
+ echo "::error::A branch named ${branch_name} already exists in the repository."
+ exit 1
+ fi
echo "${EVENT_VERSION}" > packaging/version || exit 1
# shellcheck disable=SC2129
echo "run=true" >> "${GITHUB_OUTPUT}"
diff --git a/.github/scripts/run-updater-check.sh b/.github/scripts/run-updater-check.sh
index 2e70a10af..456a0e5d0 100755
--- a/.github/scripts/run-updater-check.sh
+++ b/.github/scripts/run-updater-check.sh
@@ -4,7 +4,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
+/netdata/packaging/installer/kickstart.sh --dont-wait --build-only --dont-start-it --disable-telemetry "${EXTRA_INSTALL_FLAGS:+--local-build-options "${EXTRA_INSTALL_FLAGS}"}" || exit 1
echo "::group::>>> Pre-Update Environment File Contents"
cat /etc/netdata/.environment
echo "::endgroup::"
diff --git a/.github/scripts/upload-new-version-tags.sh b/.github/scripts/upload-new-version-tags.sh
index a9b0cd303..ffdfadfa0 100755
--- a/.github/scripts/upload-new-version-tags.sh
+++ b/.github/scripts/upload-new-version-tags.sh
@@ -2,9 +2,10 @@
set -e
-host="packages.netdata.cloud"
user="netdatabot"
+host="${1}"
+
prefix="/var/www/html/releases"
staging="${TMPDIR:-/tmp}/staging-new-releases"