-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
35 lines (32 loc) · 1.12 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
sudo: false
install:
- git clone https://github.com/sstephenson/bats.git /tmp/bats
- mkdir -p /tmp/local
- bash /tmp/bats/install.sh /tmp/local
- export PATH=$PATH:/tmp/local/bin:$(pwd)
script:
- bats --tap tests
after_success:
- >
if [[ "${TRAVIS_PULL_REQUEST}" = "false" ]] && [[ "${TRAVIS_BRANCH}" = "master" ]]; then
echo -e '\n\nTriggering "platform-configure" build as we are on branch "master".\n\n'
BODY="{ \"request\": {
\"message\": \"Triggered by '$TRAVIS_REPO_SLUG'\",
\"config\": {
\"env\": {
\"SERVICE_TAG\": \"development\",
\"DEVELOPMENT\": \"development\"
}}}}"
URL="https://api.travis-ci.org/repo/experimental-platform%2Fplatform-configure/requests"
echo "URL: $URL"
echo "BODY: $BODY"
curl -f -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token $TRAVIS_TOKEN" \
-d "$BODY" \
$URL
else
echo -e "\n\nNot triggering dependant builds for ${TRANVIS_BRANCH}.\n\n"
fi