added trigger to build docker image on travis
This commit is contained in:
parent
fe6ffb4fc2
commit
ad56a6c983
3 changed files with 22 additions and 2 deletions
|
@ -55,4 +55,6 @@ script:
|
||||||
- ruby -I test/ test/integration/user_device_controller_test.rb
|
- ruby -I test/ test/integration/user_device_controller_test.rb
|
||||||
- ruby -I test/ test/integration/sipgate_controller_test.rb
|
- ruby -I test/ test/integration/sipgate_controller_test.rb
|
||||||
- rake db:drop
|
- 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
|
||||||
|
|
18
contrib/travis-ci.org/trigger-docker-build.sh
Normal file
18
contrib/travis-ci.org/trigger-docker-build.sh
Normal 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
|
|
@ -7,7 +7,7 @@ REPO_USER="zammad"
|
||||||
REPO="zammad-docker-compose"
|
REPO="zammad-docker-compose"
|
||||||
BRANCH="master"
|
BRANCH="master"
|
||||||
|
|
||||||
if [ ${TRAVIS_BRANCH} == 'stable' ]; then
|
if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
|
||||||
curl -X POST \
|
curl -X POST \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-H "Travis-API-Version: 3" \
|
-H "Travis-API-Version: 3" \
|
||||||
|
|
Loading…
Reference in a new issue