forked from openmrs/openmrs-distro-referenceapplication
-
Notifications
You must be signed in to change notification settings - Fork 0
/
travis_trigger.sh
executable file
·23 lines (19 loc) · 1 KB
/
travis_trigger.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
# Triggers a build of https://travis-ci.org/openmrs/openmrs-distro-referenceapplication
# In order to use the script you have to set the TRAVIS_ACCESS_TOKEN and TRAVIS_MESSAGE environment variable.
response=$(curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token $TRAVIS_ACCESS_TOKEN" \
-d "{ \"request\": { \"branch\": \"master\", \"message\": \"$TRAVIS_MESSAGE\" } }" \
https://api.travis-ci.org/repo/openmrs%2Fopenmrs-distro-referenceapplication/requests)
echo "$response";
# Uncomment to trigger the build of the platform-2.1.x branch.
#curl -s -X POST \
# -H "Content-Type: application/json" \
# -H "Accept: application/json" \
# -H "Travis-API-Version: 3" \
# -H "Authorization: token $TRAVIS_ACCESS_TOKEN" \
# -d "{ \"request\": { \"branch\": \"platform-2.1.x\", \"message\": \"$TRAVIS_MESSAGE\" } }" \
# https://api.travis-ci.org/repo/openmrs%2Fopenmrs-distro-referenceapplication/requests