added trigger to build docker image on travis

This commit is contained in:
André Bauer 2017-09-17 02:15:22 +02:00
parent fe6ffb4fc2
commit ad56a6c983
3 changed files with 22 additions and 2 deletions

View file

@ -55,4 +55,6 @@ script:
- ruby -I test/ test/integration/user_device_controller_test.rb
- ruby -I test/ test/integration/sipgate_controller_test.rb
- rake db:drop
after_success: contrib/travis-ci.org/trigger-docker-compose-build.sh
after_success:
- contrib/travis-ci.org/trigger-docker-build.sh
- contrib/travis-ci.org/trigger-docker-compose-build.sh

View file

@ -0,0 +1,18 @@
#!/bin/bash
#
# trigger build of https://github.com/zammad/zammad on https://travis-ci.org/zammad/zammad and upload it to https://hub.docker.com/r/zammad/zammad
#
REPO_USER="zammad"
REPO="zammad"
BRANCH="develop"
if [ "${TRAVIS_BRANCH}" == 'develop' ]; then
curl -X POST \
-H "Content-Type: application/json" \
-H "Travis-API-Version: 3" \
-H "Accept: application/json" \
-H "Authorization: token ${TRAVIS_API_TOKEN}" \
-d '{"request": {"branch":"'${BRANCH}'"}}' \
"https://api.travis-ci.org/repo/${REPO_USER}%2F${REPO}/requests"
fi

View file

@ -7,7 +7,7 @@ REPO_USER="zammad"
REPO="zammad-docker-compose"
BRANCH="master"
if [ ${TRAVIS_BRANCH} == 'stable' ]; then
if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
curl -X POST \
-H "Content-Type: application/json" \
-H "Travis-API-Version: 3" \