From 76da02e779e03d18ac9e4bfed43fe4e0023fd7e6 Mon Sep 17 00:00:00 2001 From: desaroger Date: Sat, 17 Feb 2018 09:26:46 +0100 Subject: [PATCH] Add PHP version checkers on all php-related dockerfiles --- php-fpm/Dockerfile-56 | 6 ++++++ php-fpm/Dockerfile-70 | 6 ++++++ php-fpm/Dockerfile-71 | 6 ++++++ php-fpm/Dockerfile-72 | 6 ++++++ php-worker/Dockerfile-70 | 7 +++++++ php-worker/Dockerfile-71 | 7 +++++++ php-worker/Dockerfile-72 | 7 +++++++ travis-build.sh | 3 ++- workspace/Dockerfile-56 | 6 ++++++ workspace/Dockerfile-70 | 6 ++++++ workspace/Dockerfile-71 | 6 ++++++ workspace/Dockerfile-72 | 6 ++++++ 12 files changed, 71 insertions(+), 1 deletion(-) diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index 0f2a689..3a55f1e 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -329,6 +329,12 @@ RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ docker-php-ext-enable imagick \ ;fi +##################################### +# Check PHP version: +##################################### + +RUN php -v | head -n 1 | grep -q "PHP 5.6." + # #-------------------------------------------------------------------------- # Final Touch diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index 6566d83..d311b32 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -353,6 +353,12 @@ RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ docker-php-ext-enable imagick \ ;fi +##################################### +# Check PHP version: +##################################### + +RUN php -v | head -n 1 | grep -q "PHP 7.0." + # #-------------------------------------------------------------------------- # Final Touch diff --git a/php-fpm/Dockerfile-71 b/php-fpm/Dockerfile-71 index 7e7fb9d..57cd516 100644 --- a/php-fpm/Dockerfile-71 +++ b/php-fpm/Dockerfile-71 @@ -360,6 +360,12 @@ RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ docker-php-ext-enable imagick \ ;fi +##################################### +# Check PHP version: +##################################### + +RUN php -v | head -n 1 | grep -q "PHP 7.1." + # #-------------------------------------------------------------------------- # Final Touch diff --git a/php-fpm/Dockerfile-72 b/php-fpm/Dockerfile-72 index 48e0682..d8e51ba 100644 --- a/php-fpm/Dockerfile-72 +++ b/php-fpm/Dockerfile-72 @@ -360,6 +360,12 @@ RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ docker-php-ext-enable imagick \ ;fi +##################################### +# Check PHP version: +##################################### + +RUN php -v | head -n 1 | grep -q "PHP 7.2." + # #-------------------------------------------------------------------------- # Final Touch diff --git a/php-worker/Dockerfile-70 b/php-worker/Dockerfile-70 index 030bf8b..0814054 100644 --- a/php-worker/Dockerfile-70 +++ b/php-worker/Dockerfile-70 @@ -56,6 +56,13 @@ ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"] # # -- Your awesome modifications go here -- # +# +#-------------------------------------------------------------------------- +# Check PHP version +#-------------------------------------------------------------------------- +# + +RUN php -v | head -n 1 | grep -q "PHP "7.0." # #-------------------------------------------------------------------------- diff --git a/php-worker/Dockerfile-71 b/php-worker/Dockerfile-71 index eeebe8d..e061593 100644 --- a/php-worker/Dockerfile-71 +++ b/php-worker/Dockerfile-71 @@ -56,6 +56,13 @@ ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"] # # -- Your awesome modifications go here -- # +# +#-------------------------------------------------------------------------- +# Check PHP version +#-------------------------------------------------------------------------- +# + +RUN php -v | head -n 1 | grep -q "PHP 7.1." # #-------------------------------------------------------------------------- diff --git a/php-worker/Dockerfile-72 b/php-worker/Dockerfile-72 index 1448498..e9807cc 100644 --- a/php-worker/Dockerfile-72 +++ b/php-worker/Dockerfile-72 @@ -56,6 +56,13 @@ ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"] # # -- Your awesome modifications go here -- # +# +#-------------------------------------------------------------------------- +# Check PHP version +#-------------------------------------------------------------------------- +# + +RUN php -v | head -n 1 | grep -q "PHP 7.2." # #-------------------------------------------------------------------------- diff --git a/travis-build.sh b/travis-build.sh index c72f51d..8613f9c 100755 --- a/travis-build.sh +++ b/travis-build.sh @@ -13,7 +13,8 @@ env | sort if [ -n "${PHP_VERSION}" ]; then cp env-example .env sed -i -- "s/PHP_VERSION=.*/PHP_VERSION=${PHP_VERSION}/g" .env - sed -i -- 's/=false/=true/g' .env + sed -i -- 's/=false/=false/g' .env + sed -i -- 's/=true/=false/g' .env cat .env docker-compose build ${BUILD_SERVICE} docker images diff --git a/workspace/Dockerfile-56 b/workspace/Dockerfile-56 index d04eb5d..d4d66e7 100644 --- a/workspace/Dockerfile-56 +++ b/workspace/Dockerfile-56 @@ -626,6 +626,12 @@ RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \ && rm chromedriver_linux64.zip \ ;fi +##################################### +# Check PHP version: +##################################### + +RUN php -v | head -n 1 | grep -q "PHP 5.6." + # #-------------------------------------------------------------------------- # Final Touch diff --git a/workspace/Dockerfile-70 b/workspace/Dockerfile-70 index d815278..0f046ec 100644 --- a/workspace/Dockerfile-70 +++ b/workspace/Dockerfile-70 @@ -703,6 +703,12 @@ RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \ && rm chromedriver_linux64.zip \ ;fi +##################################### +# Check PHP version: +##################################### + +RUN php -v | head -n 1 | grep -q "PHP 7.0." + # #-------------------------------------------------------------------------- # Final Touch diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index 933c0bb..3390255 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -713,6 +713,12 @@ RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \ && rm chromedriver_linux64.zip \ ;fi +##################################### +# Check PHP version: +##################################### + +RUN php -v | head -n 1 | grep -q "PHP 7.1." + # #-------------------------------------------------------------------------- # Final Touch diff --git a/workspace/Dockerfile-72 b/workspace/Dockerfile-72 index 21f5c4b..a123f40 100644 --- a/workspace/Dockerfile-72 +++ b/workspace/Dockerfile-72 @@ -704,6 +704,12 @@ RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \ && rm chromedriver_linux64.zip \ ;fi +##################################### +# Check PHP version: +##################################### + +RUN php -v | head -n 1 | grep -q "PHP 7.2." + # #-------------------------------------------------------------------------- # Final Touch