Permalink
Browse files

Added ping_repository script to trigger CI build of SciView upon succ…

…essful scenery build
  • Loading branch information...
skalarproduktraum committed Nov 2, 2017
1 parent 270d8e8 commit 2150f15346da6ea9576d49a09c3fc948611092b2
Showing with 24 additions and 0 deletions.
  1. +4 −0 .travis.yml
  2. +20 −0 ping_repository.sh
@@ -6,6 +6,7 @@ env:
- secure: "huqdNK62/ncK/lhlAFmkDgSCcAWL8IT3QYyaIw54WvQ35cYCht1qBK0HLqwYNqwhq4t2PSSggH7UQoiiD64nOlb/HQ+pB63NAL6Quq8p+3jsgoQBG7ejg7Bz5kIXWMxGx7OHJYHrcYJKVsh5J3hG1yjy487c7sg56WzXoWzsSioZXp5/DwsJcMtJjtDkNF4gp5DZp+j9ggMvXhY9cqwHcXKws6VGO3pN6Vkg8SYf2vHImhr/R9V7xLgKmvMxgb6K0aKP4XGZ/LbGzE6T2UvZBnZhKy5c2T5fSvDwwqV54UJkS26dWVlwus7rBRFSc4rXFMdzS+IU9NDOPn698Gc5BOXnCG+Gar5jg36MG54F9SWqUwhydQj1jCXNTiDbteLliDWSbGXZB+xBJlI2qP/47ZejmqXPfW1329i4b2RZlAd8CrAEGvysyHWJqT1RCqf8F3mv+9M9fyaj5PVEw0sbbQ8UBR1XZSzhRfOV2nYMcXzd3yP2AR7YMV/027YzW5CfVjsyle+KlVN8rNol8+OMctcYH32FyYI+nDUuEpJ7T3XefOMEY4IkZHFOW3/KL9mOjT0dMKgIphxU9gEZQJPSFaVFB0hym2j7yAwPZrbuh1eFkRhCT0fkiGA6sMR6h9dagoNyQGDWWuxT8qdZcSMxiS/1hEgQOVPopziJ8jcDo5E="
- secure: "LcBYmfL7Ak8Yh8Gfar8uX4OlraSpWmCmu+e3O0ZqQ7uuHDM0e1SwI7x0rrzEJJgmTyyly3hWjVE6rH/EEzo7moWL0u+aE6cgn8nPBRT56lIGZCIIN+EPiMLDkPQD5PZqBASwxwxFap+YK9ijbvyK8Q389K83/snMZpXHsZvkFHZ6RrJvv4v2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UXwV4cyEJo44iUNIwo8MGHxKS+AEUUc8VpdazUxhxcBx5OKSS9oKy3EAwOy77xrWyQAVhZnelYKEn1BlwuRaKzrz64X4m40CzpFw="
- secure: "Auf8QuEupXTJIvNIhe+nrlzgMTkNrcwU8X4VRBaDYlEvxhZ0USBQvcYfBBRigoyJXdGhF+Ny+NGtzXy40Q33oaa9+pa1Ju/H5Iy9m4PGnX3n/Qug3vSuzt/jXqYIOGROec7/3EZ5iWVyQ7EbbtPHT894uLx2mWv9Mb1BEhVIs4D/SV+KsMbOwPCRkRCMPISXxx4ue/bpeiMA5Pz/9p13ixeNImIZ9Nn52i0krhGpQdhGV73cAmHiPhoHLHOSRej7pQe1JTSppGzVCYOQysBBZTk5kA/avPBrKciMNa+JjFLXR8B8/LM9JtsRSEVU0963u4zx/0DzFS985OTt1TY9iZKMvlOPeos+9Cnxk378gmYcHAQRdOra0/zuDXlkQ5xj/Ar9Os4M9Zd9wn8lXFBDsNDeLtqZfq0vkJynvdoBt5Ah38tM/ytzdj4d4RbB62Lia1Qd7cnpWNEjShm2pMFRCwfkMTxxaE4Iac8sZMnOggaNLeXoFjJC1p/cnsXRYR1N5uqIjd78ON5ZT8J8WFjflRf2g5EpN3I8rW9rOJrcHpU+qTVc2scL5Z5QVCVDyhwwtcWOIIfXmBx/gjvgF4Pasy6ugH8VZp5SejdSG5ySfDimz9VkYMpKvYagj4brsV741Sqofacb8unlrs4kUC2mgX8AK5RcLH3MQChfmP5t6AE="

matrix:
include:
@@ -33,5 +34,8 @@ script:
- mvn clean package -Dmaven.test.skip=true
- mvn test

# deploy on success, but only if we are on master
# then, ping the SciView repository for a rebuild
after_success:
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && mvn deploy --settings settings.xml
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && test $TRAVIS_OS_NAME == "linux" && ./ping_repository.sh scenerygraphics/SciView $SCIVIEW_API_TOKEN
@@ -0,0 +1,20 @@
#!/bin/bash
repo_param=$1
repo="${repo_param//\//%2F}"
api_token=$2

echo "Pinging repository $repo_param ($repo) for rebuild ..."

body='{
"request": {
"branch":"master",
"message":"Triggered CI build from scenerygraphics/scenery"
}}'

curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token $api_token" \
-d "$body" \
https://api.travis-ci.org/repo/$repo/requests

0 comments on commit 2150f15

Please sign in to comment.