Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added auto trigger hospitalrun-server refresh script on successful build #26

Merged
merged 1 commit into from
Mar 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ script:
- npm test
deploy:
provider: npm
email: mofesola.babalola@ehealthafrica.org
email: devops@ehealthafrica.org
api_key:
secure: G13Wfjt+5lzPmc/4M4669Q+htK389oglI/JDTYDDH1v0ZaWOtvAc2Zvu2BvMGy9IMJ5f66ICJLxcWIg0gP2SMxvkQgUYaGFkVCRbaAwxfhcbSLJ2H/AGaanV1qRFeLQQRmNXg/yK0tW+biOsLXKvDXqazaueh/hP64uJmzAr3L1Y26q6QjL2iMEczEUi9Z02Gl5u5rCWsdM8c0oZ872FR8QWkSR4fb6vaKIyItfcUCN0nbJ4RhIncCCJLja7NHbeaxGh9rXVaO6F6oTiuuuJj863ATSBO670dmWGbscZQWxIRJPko3IAn6dQD4Q9FaJZR1pyS2+pkGSuGbjdYjMfj0vh73Hf6wmCwve/i9cA8du0qDEKqMetdsMIAS4XKoR2jQyWCivGOhOHizjoH7xezyj9K469IEugTFoyENoASW3ADYL3YGFpKn0Xs2i0MuSS8MGmSLw6QfEDzLvmxJeGnNQFXKtXyOOJlmyoTcIcviMr26jOmWINBWzNFp6B1wqcWpPy2TJyoQFL8Fnd4uadc5i4mxv9hPKLbbpV72+EuWiPqNX+rvgMxuFfMogIVB6R7GIMrk+MVmLlr9O4jYcsNcEW5Pw5rcxw/OCSw/mReMNFyRWhscpgpWcYwOzQHXMFKusSzITJLNjtwL40JH4i90U2jDwEZTUXT8E/IJVuYmY=
on:
tags: true
repo: eHealthAfrica/hospitalrun-frontend
branch: master
after_deploy:
- script/server_build.sh
16 changes: 16 additions & 0 deletions script/server_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

BRANCH="${TRAVIS_BRANCH}"

body='{
"request": {
"branch":"${BRANCH}"
}}'

curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token ${BUILD_TRIGGER_TOKEN}" \
-d "$body" \
https://api.travis-ci.org/repo/eHealthAfrica%2Fhospitalrun-server/requests