Created
May 8, 2020 06:54
-
-
Save valllllll2000/9b7430263dd63608ed3a47f5758674d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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