trigger_docker_image_univention_build.sh 731 B

123456789101112131415161718
  1. #!/bin/bash
  2. #
  3. # trigger build of https://github.com/zammad/zammad-docker-univention on https://travis-ci.org/zammad/zammad-docker-univention and upload it to https://hub.docker.com/r/zammad/zammad-docker-univention
  4. #
  5. REPO_USER="zammad"
  6. REPO="zammad-docker-univention"
  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