summaryrefslogtreecommitdiffstats
path: root/.travis/trigger_docker_build.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:49:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 12:42:05 +0000
commit2e85f9325a797977eea9dfea0a925775ddd211d9 (patch)
tree452c7f30d62fca5755f659b99e4e53c7b03afc21 /.travis/trigger_docker_build.sh
parentReleasing debian version 1.19.0-4. (diff)
downloadnetdata-2e85f9325a797977eea9dfea0a925775ddd211d9.tar.xz
netdata-2e85f9325a797977eea9dfea0a925775ddd211d9.zip
Merging upstream version 1.29.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.travis/trigger_docker_build.sh')
-rwxr-xr-x.travis/trigger_docker_build.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/.travis/trigger_docker_build.sh b/.travis/trigger_docker_build.sh
new file mode 100755
index 000000000..7a3dd5088
--- /dev/null
+++ b/.travis/trigger_docker_build.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+token="${1}"
+version="${2}"
+
+resp="$(curl -X POST \
+ -H 'Accept: application/vnd.github.v3+json' \
+ -H "Authorization: Bearer ${token}" \
+ "https://api.github.com/repos/netdata/netdata/actions/workflows/docker.yml/dispatches" \
+ -d "{\"ref\": \"master\", \"inputs\": {\"version\": \"${version}\"}}")"
+
+if [ -z "${resp}" ]; then
+ echo "Successfully triggered Docker image build."
+ exit 0
+else
+ echo "Failed to trigger Docker image build. Output:"
+ echo "${resp}"
+ exit 1
+fi