summaryrefslogtreecommitdiffstats
path: root/.travis/trigger_package_build.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-03-31 12:58:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-03-31 12:58:11 +0000
commitf99c4526d94d3e04124c5c48ab4a3da6ca53a458 (patch)
treea2ed8860030cc49f492b09b3222d593c65619800 /.travis/trigger_package_build.sh
parentAdding upstream version 1.29.3. (diff)
downloadnetdata-f99c4526d94d3e04124c5c48ab4a3da6ca53a458.tar.xz
netdata-f99c4526d94d3e04124c5c48ab4a3da6ca53a458.zip
Adding upstream version 1.30.0.upstream/1.30.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.travis/trigger_package_build.sh')
-rwxr-xr-x.travis/trigger_package_build.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/.travis/trigger_package_build.sh b/.travis/trigger_package_build.sh
new file mode 100755
index 000000000..d1ecd48ca
--- /dev/null
+++ b/.travis/trigger_package_build.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+token="${1}"
+version="${2}"
+pkgtype="${3}"
+
+resp="$(curl -X POST \
+ -H 'Accept: application/vnd.github.v3+json' \
+ -H "Authorization: Bearer ${token}" \
+ "https://api.github.com/repos/netdata/netdata/actions/workflows/packaging.yml/dispatches" \
+ -d "{\"ref\": \"master\", \"inputs\": {\"version\": \"${version}\", \"type\": \"${pkgtype}\"}}")"
+
+if [ -z "${resp}" ]; then
+ echo "Successfully triggered binary package builds."
+ exit 0
+else
+ echo "Failed to trigger binary package builds. Output:"
+ echo "${resp}"
+ exit 1
+fi