Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
trigger travis to deploy app to instance
#!/bin/bash
set -e
set -o nounset
# usage: sh travis_flow_app_build.sh instace branch token
# example sh travis_flow_app_build.sh akvoflow-uat1 release/2.7.1 xxx
# get your token from Travis website, in your user settings
# for a deploy in production use the master branch
instance=$1
branch=$2
token=$3
body='{
"request": {
"message": "deploy to '$instance'",
"branch": "'$branch'",
"config": {
"script": "./travis/deploy_release.sh '$instance'",
"before_script": "echo skipped",
"after_success": "echo skipped"
}
}}'
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token "$token \
-d "$body" \
https://api.travis-ci.org/repo/akvo%2Fakvo-flow-mobile/requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.