From 12e664b84c47fc8944ef9165e81f943c16c44167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Mon, 2 Oct 2017 23:13:13 +0200 Subject: [PATCH] added real zammad version to docker builds on travis-ci --- .travis.yml | 2 ++ contrib/travis-ci.org/trigger-docker-build.sh | 2 +- contrib/travis-ci.org/trigger-docker-compose-build.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 61f656eee..2df15c507 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ language: ruby rvm: - 2.4.1 before_install: + - git fetch --unshallow - sudo apt-get -qq update - sudo apt-get install -y curl git-core patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev sqlite3 libsqlite3-dev autotools-dev libxslt1-dev libyaml-0-2 autoconf automake libreadline6-dev libyaml-dev libtool libgmp-dev libgdbm-dev libncurses5-dev pkg-config libffi-dev libmysqlclient-dev postfix - if [ "${DB}" = "mysql" ]; then mysql -u root -e "CREATE USER 'some_user'@'localhost' IDENTIFIED BY 'some_pass';"; fi @@ -29,6 +30,7 @@ before_install: - if [ "${DB}" = "postgresql" ]; then psql -c 'create database zammad_test;' -U postgres; fi - if [ "${DB}" = "postgresql" ]; then cp config/database.yml.test-postgresql config/database.yml; fi - export RAILS_ENV=test + - export ZAMMAD_VERSION=$(git describe --tags | sed -e 's/-[a-z0-9]\{8,\}.*//g') install: - if [ "${DB}" = "mysql" ]; then bundle install --without postgres; fi - if [ "${DB}" = "postgresql" ]; then bundle install; fi diff --git a/contrib/travis-ci.org/trigger-docker-build.sh b/contrib/travis-ci.org/trigger-docker-build.sh index 0afc9b6f1..9e96890a0 100755 --- a/contrib/travis-ci.org/trigger-docker-build.sh +++ b/contrib/travis-ci.org/trigger-docker-build.sh @@ -13,6 +13,6 @@ if [ "${TRAVIS_BRANCH}" == 'develop' ]; then -H "Travis-API-Version: 3" \ -H "Accept: application/json" \ -H "Authorization: token ${TRAVIS_API_TOKEN}" \ - -d '{"request": {"branch":"'${BRANCH}'"}}' \ + -d '{"request":{ "branch":"'${BRANCH}'","config":{"env":{"ZAMMAD_VERSION":"'${ZAMMAD_VERSION}'"}}}}' \ "https://api.travis-ci.org/repo/${REPO_USER}%2F${REPO}/requests" fi diff --git a/contrib/travis-ci.org/trigger-docker-compose-build.sh b/contrib/travis-ci.org/trigger-docker-compose-build.sh index d539b6fed..b0b180d15 100755 --- a/contrib/travis-ci.org/trigger-docker-compose-build.sh +++ b/contrib/travis-ci.org/trigger-docker-compose-build.sh @@ -13,6 +13,6 @@ if [ "${TRAVIS_BRANCH}" == 'stable' ]; then -H "Travis-API-Version: 3" \ -H "Accept: application/json" \ -H "Authorization: token ${TRAVIS_API_TOKEN}" \ - -d '{"request": {"branch":"'${BRANCH}'"}}' \ + -d '{"request":{ "branch":"'${BRANCH}'","config":{"env":{"ZAMMAD_VERSION":"'${ZAMMAD_VERSION}'"}}}}' \ "https://api.travis-ci.org/repo/${REPO_USER}%2F${REPO}/requests" fi