From ec860084c554febb64e5270e4ede6be8b25b8e87 Mon Sep 17 00:00:00 2001 From: cytopia Date: Mon, 26 Dec 2016 03:54:59 +0100 Subject: [PATCH] Fix travis version check --- .tests/.lib.sh | 13 ++++--------- .tests/test.sh | 14 +++++++------- .travis.yml | 36 ++++++++++++++++++++++++++++++++---- 3 files changed, 43 insertions(+), 20 deletions(-) diff --git a/.tests/.lib.sh b/.tests/.lib.sh index 6d2d3042..5900428a 100644 --- a/.tests/.lib.sh +++ b/.tests/.lib.sh @@ -234,17 +234,12 @@ reset_env_file() { ### Comment out all docker versions ### comment_all_dockers() { - _httpd="$( get_default_version_httpd )" - _mysql="$( get_default_version_mysql )" - _postgres="$( get_default_version_postgres )" - _php="$( get_default_version_php )" - # Comment out all enabled docker versions - run "sed -i'' \"s/HTTPD_SERVER=${_httpd}/#HTTPD_SERVER=${_httpd}/g\" \"${DEVILBOX_PATH}/.env\"" - run "sed -i'' \"s/MYSQL_SERVER=${_mysql}/#MYSQL_SERVER=${_mysql}/g\" \"${DEVILBOX_PATH}/.env\"" - run "sed -i'' \"s/POSTGRES_SERVER=${_postgres}/#POSTGRES_SERVER=${_postgres}/g\" \"${DEVILBOX_PATH}/.env\"" - run "sed -i'' \"s/PHP_SERVER=${_php}/#PHP_SERVER=${_php}/g\" \"${DEVILBOX_PATH}/.env\"" + run "sed -i'' \"s/^HTTPD_SERVER=/#HTTPD_SERVER=/g\" \"${DEVILBOX_PATH}/.env\"" + run "sed -i'' \"s/^MYSQL_SERVER=/#MYSQL_SERVER=/g\" \"${DEVILBOX_PATH}/.env\"" + run "sed -i'' \"s/^POSTGRES_SERVER=/#POSTGRES_SERVER=/g\" \"${DEVILBOX_PATH}/.env\"" + run "sed -i'' \"s/^PHP_SERVER=/#PHP_SERVER=/g\" \"${DEVILBOX_PATH}/.env\"" } ### diff --git a/.tests/test.sh b/.tests/test.sh index 25fff862..2455e62d 100755 --- a/.tests/test.sh +++ b/.tests/test.sh @@ -279,7 +279,7 @@ _php="php-fpm-7.0" ### ### Go ### -devilbox_start "${_httpd}" "${_mysql}" "${_pysql}" "${_php}" "MySQL (1/7): ${_php}" +devilbox_start "${_httpd}" "${_mysql}" "${_pysql}" "${_php}" "MySQL (1/7): ${_mysql}" debilbox_test devilbox_stop @@ -300,7 +300,7 @@ _php="php-fpm-7.0" ### ### Go ### -devilbox_start "${_httpd}" "${_mysql}" "${_pysql}" "${_php}" "MySQL (2/7): ${_php}" +devilbox_start "${_httpd}" "${_mysql}" "${_pysql}" "${_php}" "MySQL (2/7): ${_mysql}" debilbox_test devilbox_stop @@ -321,7 +321,7 @@ _php="php-fpm-7.0" ### ### Go ### -devilbox_start "${_httpd}" "${_mysql}" "${_pysql}" "${_php}" "MySQL (3/7): ${_php}" +devilbox_start "${_httpd}" "${_mysql}" "${_pysql}" "${_php}" "MySQL (3/7): ${_mysql}" debilbox_test devilbox_stop @@ -342,7 +342,7 @@ _php="php-fpm-7.0" ### ### Go ### -devilbox_start "${_httpd}" "${_mysql}" "${_pysql}" "${_php}" "MySQL (4/7): ${_php}" +devilbox_start "${_httpd}" "${_mysql}" "${_pysql}" "${_php}" "MySQL (4/7): ${_mysql}" debilbox_test devilbox_stop @@ -363,7 +363,7 @@ _php="php-fpm-7.0" ### ### Go ### -devilbox_start "${_httpd}" "${_mysql}" "${_pysql}" "${_php}" "MySQL (5/7): ${_php}" +devilbox_start "${_httpd}" "${_mysql}" "${_pysql}" "${_php}" "MySQL (5/7): ${_mysql}" debilbox_test devilbox_stop @@ -384,7 +384,7 @@ _php="php-fpm-7.0" ### ### Go ### -devilbox_start "${_httpd}" "${_mysql}" "${_pysql}" "${_php}" "MySQL (6/7): ${_php}" +devilbox_start "${_httpd}" "${_mysql}" "${_pysql}" "${_php}" "MySQL (6/7): ${_mysql}" debilbox_test devilbox_stop @@ -405,7 +405,7 @@ _php="php-fpm-7.0" ### ### Go ### -devilbox_start "${_httpd}" "${_mysql}" "${_pysql}" "${_php}" "MySQL (7/7): ${_php}" +devilbox_start "${_httpd}" "${_mysql}" "${_pysql}" "${_php}" "MySQL (7/7): ${_mysql}" debilbox_test devilbox_stop diff --git a/.travis.yml b/.travis.yml index c64d02b8..6be1f115 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ sudo: required python: - 2.7 + ### ### Add services ### @@ -15,8 +16,11 @@ services: ### env: global: - # Get .env default versions - - VAR=VAL + global: + - DEVILBOX_PHP_VERSION="$( grep -Eo 'image:.*PHP.*:.*' docker-compose.yml | sed 's/.*:.*://g' )" + - DEVILBOX_HTTPD_VERSION="$( grep -Eo 'image:.*HTTPD.*:.*' docker-compose.yml | sed 's/.*:.*://g' )" + - DEVILBOX_MYSQL_VERSION="$( grep -Eo 'image:.*MYSQL.*:.*' docker-compose.yml | sed 's/.*:.*://g' )" + ### ### Berfore Install @@ -28,12 +32,36 @@ before_install: - whoami - groups + ### ### Install ### install: - - true - + # php + - docker pull cytopia/php-fpm-5.4:${DEVILBOX_PHP_VERSION} + - docker pull cytopia/php-fpm-5.5:${DEVILBOX_PHP_VERSION} + - docker pull cytopia/php-fpm-5.6:${DEVILBOX_PHP_VERSION} + - docker pull cytopia/php-fpm-7.0:${DEVILBOX_PHP_VERSION} + - docker pull cytopia/php-fpm-7.1:${DEVILBOX_PHP_VERSION} + # web + - docker pull cytopia/apache-2.2:${DEVILBOX_HTTPD_VERSION} + - docker pull cytopia/apache-2.4:${DEVILBOX_HTTPD_VERSION} + - docker pull cytopia/nginx-stable:${DEVILBOX_HTTPD_VERSION} + - docker pull cytopia/nginx-mainline:${DEVILBOX_HTTPD_VERSION} + # mysql/mariadb + - docker pull cytopia/mysql-5.5:${DEVILBOX_MYSQL_VERSION} + - docker pull cytopia/mysql-5.6:${DEVILBOX_MYSQL_VERSION} + - docker pull cytopia/mysql-5.7:${DEVILBOX_MYSQL_VERSION} + - docker pull cytopia/mariadb-5.5:${DEVILBOX_MYSQL_VERSION} + - docker pull cytopia/mariadb-10.0:${DEVILBOX_MYSQL_VERSION} + - docker pull cytopia/mariadb-10.1:${DEVILBOX_MYSQL_VERSION} + - docker pull cytopia/mariadb-10.2:${DEVILBOX_MYSQL_VERSION} + # postgresql (official images) + - docker pull postgres:9.2 + - docker pull postgres:9.3 + - docker pull postgres:9.4 + - docker pull postgres:9.5 + - docker pull postgres:9.6 ###