From 2caca42b9eee97b6cd6da24c29d1d731eb3e894c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 4 Mar 2019 11:12:21 +0400 Subject: [PATCH] :construction_worker: Trigger Docker images build on Travis (#65) --- .travis.yml | 6 ++++++ scripts/trigger-docker.sh | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 scripts/trigger-docker.sh diff --git a/.travis.yml b/.travis.yml index a6dc5a675..3789a151c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,3 +15,9 @@ script: after_script: - bash <(curl -s https://codecov.io/bash) + +deploy: + provider: script + script: bash scripts/trigger-docker.sh +# on: +# branch: master diff --git a/scripts/trigger-docker.sh b/scripts/trigger-docker.sh new file mode 100755 index 000000000..660b1a153 --- /dev/null +++ b/scripts/trigger-docker.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -e +set -x + +body='{ +"request": { +"branch":"master" +}}' + +curl -s -X POST \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -H "Travis-API-Version: 3" \ + -H "Authorization: token $TRAVIS_TOKEN" \ + -d "$body" \ + https://api.travis-ci.org/repo/tiangolo%2Fuvicorn-gunicorn-fastapi-docker/requests