trigger_windows_build.sh 498 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. _token=$1
  3. _commit=$2
  4. _buildType=$3
  5. post_data=$(cat <<EOF
  6. {
  7. "accountName": "Torkeldegaard",
  8. "projectSlug": "grafana",
  9. "branch": "master",
  10. "commitId": "${_commit}",
  11. "environmentVariables": {
  12. "buildType": "${_buildType}"
  13. }
  14. }
  15. EOF
  16. )
  17. echo ${post_data}
  18. curl \
  19. --verbose \
  20. --header "Accept: application/json" \
  21. --header "Content-Type: application/json" \
  22. --header "Authorization: Bearer ${_token}" \
  23. --data "${post_data}" \
  24. --request POST https://ci.appveyor.com/api/builds