From 5da4d8f466cdbd69c53b196b3a0a9eafb96d0528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Thu, 7 Dec 2017 15:55:44 +0100 Subject: [PATCH] added univention docker image build trigger for travis-ci --- .travis.yml | 1 + .../trigger-docker-univention-build.sh | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 contrib/travis-ci.org/trigger-docker-univention-build.sh diff --git a/.travis.yml b/.travis.yml index 98fb8f3c4..7602977d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,3 +62,4 @@ script: after_success: - if [ "${DB}" = "mysql" ]; then contrib/travis-ci.org/trigger-docker-build.sh; fi - if [ "${DB}" = "mysql" ]; then contrib/travis-ci.org/trigger-docker-compose-build.sh; fi + - if [ "${DB}" = "mysql" ]; then contrib/travis-ci.org/trigger-docker-univention-build.sh; fi diff --git a/contrib/travis-ci.org/trigger-docker-univention-build.sh b/contrib/travis-ci.org/trigger-docker-univention-build.sh new file mode 100644 index 000000000..0e83bc280 --- /dev/null +++ b/contrib/travis-ci.org/trigger-docker-univention-build.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# 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 +# + +REPO_USER="zammad" +REPO="zammad-docker-univention" +BRANCH="master" + +if [ "${TRAVIS_BRANCH}" == 'stable' ]; 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":{ "message": "'"${TRAVIS_COMMIT_MESSAGE}"'","branch":"'${BRANCH}'","config":{"env":{"ZAMMAD_VERSION":"'${ZAMMAD_VERSION}'"}}}}' \ + "https://api.travis-ci.org/repo/${REPO_USER}%2F${REPO}/requests" +fi