[travis] automatically trigger builds of python-mapnik after successful linux build - refs #3366

This commit is contained in:
Dane Springmeyer 2016-03-16 17:01:28 -07:00
parent 9ab832d792
commit 706108e95c
2 changed files with 21 additions and 1 deletions

View file

@ -12,6 +12,7 @@ env:
- PREFIX=/tmp/mapnik - PREFIX=/tmp/mapnik
- secure: "N3a5nzzsgpuu45k8qWdYsHNxrSnqeAGLTOYpfYoAH7B94vuf7pa7XV1tQjXbxrnx2D6ryTdtUtyRKwy7zXbwXxGt4DpczWEo8f6DUd6+obAp3kdnXABg2Sj4oA7KMs0F0CmoADy0jdUZD5YyOJHu64LCIIgzEQ9q49PFMNbU3IE=" - secure: "N3a5nzzsgpuu45k8qWdYsHNxrSnqeAGLTOYpfYoAH7B94vuf7pa7XV1tQjXbxrnx2D6ryTdtUtyRKwy7zXbwXxGt4DpczWEo8f6DUd6+obAp3kdnXABg2Sj4oA7KMs0F0CmoADy0jdUZD5YyOJHu64LCIIgzEQ9q49PFMNbU3IE="
- secure: "iQYPNpMtejcgYeUkWZGIWz1msIco5qydJrhZTSCQOYahAQerdT7q5WZEpEo3G6IWOGgO1eo7GFuY8DvqQjw1+jC9b9mhkRNdo3LhGTKS9Gsbl5Q27k0rjlaFZmmQHrfPlQJwhfAIp+KLugHtQw5bCoLh+95E3j0F0DayF1tuJ3s=" - secure: "iQYPNpMtejcgYeUkWZGIWz1msIco5qydJrhZTSCQOYahAQerdT7q5WZEpEo3G6IWOGgO1eo7GFuY8DvqQjw1+jC9b9mhkRNdo3LhGTKS9Gsbl5Q27k0rjlaFZmmQHrfPlQJwhfAIp+KLugHtQw5bCoLh+95E3j0F0DayF1tuJ3s="
- secure: "F6ivqDNMBQQnrDGA9+7IX+GDswuIqQQd7YPJdQqa2Ked9jddAQDeJClb05ig3JlwfOlYLGZOd43ZX0pKuMtI2Gbkwz211agGP9S3YunwlRg8iWtJlO5kYFUdKCmJNhjg4icfkGELCgwXn+zuEWFSLpkPcjqAFKFlQrIJeAJJgKM="
addons: addons:
postgresql: "9.4" postgresql: "9.4"
@ -24,7 +25,7 @@ matrix:
- os: linux - os: linux
sudo: false sudo: false
compiler: ": clang" 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: addons:
apt: apt:
sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5' ] sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5' ]
@ -82,6 +83,7 @@ script:
- enabled ${BENCH} make bench - enabled ${BENCH} make bench
after_success: after_success:
- enabled ${TRIGGER} trigger_downstream
- if enabled ${MASON_PUBLISH}; then - if enabled ${MASON_PUBLISH}; then
source ./.mason/mason.sh && source ./.mason/mason.sh &&
./mason_latest.sh build && ./mason_latest.sh build &&

View file

@ -100,3 +100,21 @@ coverage () {
--exclude fonts \ --exclude fonts \
> /dev/null > /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
}