From e2a7e22b0f3273ac83a0a7e17aa56f00fc5e7cc8 Mon Sep 17 00:00:00 2001 From: Aleksander Cynarski Date: Sat, 29 Jan 2022 21:50:38 +0100 Subject: [PATCH] new alpine --- .drone.yml | 70 +++++++++++++++--------------- docker/usr/local/bin/xdebug_enable | 24 ++-------- 2 files changed, 38 insertions(+), 56 deletions(-) diff --git a/.drone.yml b/.drone.yml index 45f4318..aa2f6cb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,7 +12,7 @@ steps: repo: from_secret: hub_repo build_args: - - PHP_VERSION=8.1-rc-fpm-alpine3.13 + - PHP_VERSION=8.1-rc-fpm-alpine3.15 tags: 8.1-rc-alpine when: branch: @@ -29,7 +29,7 @@ steps: repo: from_secret: hub_repo build_args: - - PHP_VERSION=8-fpm-alpine3.13 + - PHP_VERSION=8-fpm-alpine3.15 tags: 8.0-alpine when: branch: @@ -46,43 +46,43 @@ steps: repo: from_secret: hub_repo build_args: - - PHP_VERSION=7.4-fpm-alpine3.13 + - PHP_VERSION=7.4-fpm-alpine3.15 tags: 7.4-alpine when: branch: - master depends_on: [ clone ] -- name: php7.3 - image: techknowlogick/drone-docker - settings: - username: - from_secret: hub_username - password: - from_secret: hub_password - repo: - from_secret: hub_repo - build_args: - - PHP_VERSION=7.3-fpm-alpine3.13 - tags: 7.3-alpine - when: - branch: - - master - depends_on: [ clone ] +# - name: php7.3 +# image: techknowlogick/drone-docker +# settings: +# username: +# from_secret: hub_username +# password: +# from_secret: hub_password +# repo: +# from_secret: hub_repo +# build_args: +# - PHP_VERSION=7.3-fpm-alpine3.13 +# tags: 7.3-alpine +# when: +# branch: +# - master +# depends_on: [ clone ] -- name: php7.2 - image: techknowlogick/drone-docker - settings: - username: - from_secret: hub_username - password: - from_secret: hub_password - repo: - from_secret: hub_repo - build_args: - - PHP_VERSION=7.2-fpm-alpine3.12 - tags: 7.2-alpine - when: - branch: - - master - depends_on: [ clone ] +# - name: php7.2 +# image: techknowlogick/drone-docker +# settings: +# username: +# from_secret: hub_username +# password: +# from_secret: hub_password +# repo: +# from_secret: hub_repo +# build_args: +# - PHP_VERSION=7.2-fpm-alpine3.12 +# tags: 7.2-alpine +# when: +# branch: +# - master +# depends_on: [ clone ] diff --git a/docker/usr/local/bin/xdebug_enable b/docker/usr/local/bin/xdebug_enable index 29b9b49..4a0490e 100755 --- a/docker/usr/local/bin/xdebug_enable +++ b/docker/usr/local/bin/xdebug_enable @@ -1,33 +1,15 @@ #!/bin/bash -# -# Helper functions -# -declare -i term_width=80 - -h1() { - declare border padding text - border='\e[1;34m'"$(printf '=%.0s' $(seq 1 "$term_width"))"'\e[0m' - padding="$(printf ' %.0s' $(seq 1 $(((term_width - $(wc -m <<<"$*")) / 2))))" - text="\\e[1m$*\\e[0m" - echo -e "$border" - echo -e "${padding}${text}${padding}" - echo -e "$border" -} - -h2() { - printf '\e[1;33m==>\e[37;1m %s\e[0m\n' "$*" -} - -h1 "Actual environment: ${ENVIRONMENT}" +echo "=>>>>>>>>> Actual environment: ${ENVIRONMENT}" if [[ $ENVIRONMENT != 'production' ]]; then + echo "==============================>> Install phpunit" wget -O phpunit https://phar.phpunit.de/phpunit-9.phar install phpunit /usr/local/bin fi if [[ $ENVIRONMENT == 'development' ]]; then - h2 "Install xdebug" + echo "==============================>> Install xdebug" apk --update --no-cache add autoconf g++ make pecl install -f xdebug docker-php-ext-enable xdebug