Skip to content

Instantly share code, notes, and snippets.

@valllllll2000
Created May 8, 2020 06:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valllllll2000/9b7430263dd63608ed3a47f5758674d5 to your computer and use it in GitHub Desktop.
Save valllllll2000/9b7430263dd63608ed3a47f5758674d5 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
[[ -n "${APP_SLUG}" ]] || { echo "APP_SLUG env var needs to be set"; exit 1; }
[[ -n "${ACCESS_TOKEN}" ]] || { echo "ACCESS_TOKEN env var needs to be set"; exit 1; }
INSTANCE="akvoflow-uat1"
curl -X POST -H "Authorization: ${ACCESS_TOKEN}" "https://api.bitrise.io/v0.1/apps/${APP_SLUG}/builds" -d \
'{
"hook_info": {
"type": "bitrise"
},
"build_params": {
"branch": "master",
"skip_git_status_report": "true",
"workflow_id": "DeployInstance",
"environments":[
{"mapped_to":"INSTANCE","value":"'${INSTANCE}'","is_expand":false}
]
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment