Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Added ping_repository script to trigger CI build of SciView upon succ…
…essful scenery build
- Loading branch information
1 parent
270d8e8
commit 2150f15
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |