trigger-docker-compose-build.sh 720 B

123456789101112131415161718
  1. #!/bin/bash
  2. #
  3. # trigger build of https://github.com/zammad/zammad-docker-compose on https://travis-ci.org/zammad/zammad-docker-compose and upload it to https://hub.docker.com/r/zammad/zammad-docker-compose/
  4. #
  5. REPO_USER="zammad"
  6. REPO="zammad-docker-compose"
  7. BRANCH="master"
  8. if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
  9. curl -X POST \
  10. -H "Content-Type: application/json" \
  11. -H "Travis-API-Version: 3" \
  12. -H "Accept: application/json" \
  13. -H "Authorization: token ${TRAVIS_API_TOKEN}" \
  14. -d '{"request":{ "message": "'"${TRAVIS_COMMIT_MESSAGE}"'","branch":"'${BRANCH}'","config":{"env":{"ZAMMAD_VERSION":"'${ZAMMAD_VERSION}'"}}}}' \
  15. "https://api.travis-ci.org/repo/${REPO_USER}%2F${REPO}/requests"
  16. fi