From 706108e95c18b57aa4187af9384a5eb452c29455 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 16 Mar 2016 17:01:28 -0700 Subject: [PATCH] [travis] automatically trigger builds of python-mapnik after successful linux build - refs #3366 --- .travis.yml | 4 +++- scripts/travis-common.sh | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6e6666711..d1b6de1b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ env: - PREFIX=/tmp/mapnik - secure: "N3a5nzzsgpuu45k8qWdYsHNxrSnqeAGLTOYpfYoAH7B94vuf7pa7XV1tQjXbxrnx2D6ryTdtUtyRKwy7zXbwXxGt4DpczWEo8f6DUd6+obAp3kdnXABg2Sj4oA7KMs0F0CmoADy0jdUZD5YyOJHu64LCIIgzEQ9q49PFMNbU3IE=" - secure: "iQYPNpMtejcgYeUkWZGIWz1msIco5qydJrhZTSCQOYahAQerdT7q5WZEpEo3G6IWOGgO1eo7GFuY8DvqQjw1+jC9b9mhkRNdo3LhGTKS9Gsbl5Q27k0rjlaFZmmQHrfPlQJwhfAIp+KLugHtQw5bCoLh+95E3j0F0DayF1tuJ3s=" + - secure: "F6ivqDNMBQQnrDGA9+7IX+GDswuIqQQd7YPJdQqa2Ked9jddAQDeJClb05ig3JlwfOlYLGZOd43ZX0pKuMtI2Gbkwz211agGP9S3YunwlRg8iWtJlO5kYFUdKCmJNhjg4icfkGELCgwXn+zuEWFSLpkPcjqAFKFlQrIJeAJJgKM=" addons: postgresql: "9.4" @@ -24,7 +25,7 @@ matrix: - os: linux sudo: false compiler: ": clang" - env: JOBS=8 MASON_PUBLISH=true CXX="ccache clang++-3.5 -Qunused-arguments" CC="clang-3.5" + env: JOBS=8 MASON_PUBLISH=true CXX="ccache clang++-3.5 -Qunused-arguments" CC="clang-3.5" TRIGGER=true addons: apt: sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5' ] @@ -82,6 +83,7 @@ script: - enabled ${BENCH} make bench after_success: + - enabled ${TRIGGER} trigger_downstream - if enabled ${MASON_PUBLISH}; then source ./.mason/mason.sh && ./mason_latest.sh build && diff --git a/scripts/travis-common.sh b/scripts/travis-common.sh index a6953b65a..f4f3ad547 100644 --- a/scripts/travis-common.sh +++ b/scripts/travis-common.sh @@ -100,3 +100,21 @@ coverage () { --exclude fonts \ > /dev/null } + +trigger_downstream() { + body='{ + "request": { + "message": "Triggered build: Mapnik core commit ${TRAVIS_COMMIT}", + "branch":"master" + } + } + ' + + curl -s -X POST \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -H "Travis-API-Version: 3" \ + -H "Authorization: token ${TRAVIS_TRIGGER_TOKEN}" \ + -d "$body" \ + https://api.travis-ci.org/repo/mapnik%2Fpython-mapnik/requests +}