summaryrefslogtreecommitdiffstats
path: root/.travis/trigger_artifact_build.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-12-01 06:15:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-12-01 06:15:11 +0000
commit483926a283e118590da3f9ecfa75a8a4d62143ce (patch)
treecb77052778df9a128a8cd3ff5bf7645322a13bc5 /.travis/trigger_artifact_build.sh
parentReleasing debian version 1.31.0-4. (diff)
downloadnetdata-483926a283e118590da3f9ecfa75a8a4d62143ce.tar.xz
netdata-483926a283e118590da3f9ecfa75a8a4d62143ce.zip
Merging upstream version 1.32.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.travis/trigger_artifact_build.sh')
-rwxr-xr-x.travis/trigger_artifact_build.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/.travis/trigger_artifact_build.sh b/.travis/trigger_artifact_build.sh
new file mode 100755
index 000000000..3ec5d02d0
--- /dev/null
+++ b/.travis/trigger_artifact_build.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+token="${1}"
+version="${2}"
+type="${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/build.yml/dispatches" \
+ -d "{\"ref\": \"master\", \"inputs\": {\"version\": \"${version}\", \"type\": \"${type}\"}}")"
+
+if [ -z "${resp}" ]; then
+ echo "Successfully triggered release artifact build."
+ exit 0
+else
+ echo "Failed to trigger release artifact build. Output:"
+ echo "${resp}"
+ exit 1
+fi