Ocelot-Social/scripts/trigger_build.sh
Robert Schäfer 4489bbe662 Use export for Travis variable for convenience
This way, we don't need to set the environment variable in the
`trigger_build.sh` script.
2018-12-10 00:28:56 +01:00

26 lines
542 B
Bash

#!/usr/bin/env bash
body=$(cat<< EOF
{
"request": {
"branch":"e2e",
"message": "Triggered by \`$TRAVIS_REPO_SLUG\` on \`$TRAVIS_BRANCH\`",
"config": {
"merge_mode": "deep_merge",
"env": {
"COMMON_BRANCH": "$TRAVIS_BRANCH"
}
}
}
}
EOF
)
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token $TRAVIS_TOKEN" \
-d "$body" \
https://api.travis-ci.com/repo/Human-Connection%2FHuman-Connection/requests