Commit 2f3cc16d authored by Tobias Munk's avatar Tobias Munk

Merge branch 'master' into 'latest'

Master

See merge request !5
parents 015c5293 593221d6
Pipeline #18881 passed with stages
in 8 minutes and 44 seconds
......@@ -12,7 +12,7 @@ stages:
before_script:
- export ISOLATION=buildpipeline{CI_BUILD_PIPELINE}
- export ISOLATION=buildpipeline${CI_BUILD_PIPELINE}
- export COMPOSE_PROJECT_NAME=${ISOLATION}
- export APP_VERSION=$(git describe --always --dirty)
- export PHP_IMAGE_NAME=dmstr/php-yii2
......@@ -36,13 +36,18 @@ build:php-alpine:
test:php:
stage: php-test
script:
- PHP_SERVICE=php sh test/image-commands.sh
- export PHP_SERVICE=php
- sh test/prod.sh
- sh test/dev.sh
- sh test/debug.sh
- docker-compose run --rm php php /test/requirements.php
test:php-alpine:
stage: php-test
script:
- PHP_SERVICE=php-alpine sh test/image-commands.sh
- export PHP_SERVICE=php-alpine
- sh test/prod.sh
- sh test/dev.sh
- docker-compose run --rm php-alpine php /test/requirements.php
test:php:allow-fail:
......@@ -50,14 +55,6 @@ test:php:allow-fail:
script:
- cd php-7.0
- docker run ${STACK_PHP_IMAGE} sh -c 'composer global update --dry-run; composer diagnose'
- PHP_ENABLE_XDEBUG=1 docker-compose up -d
- sleep 15
- docker-compose exec php php -i | grep xdebug
- docker-compose up -d
- docker-compose ps
- docker-compose logs
- sleep 10
- docker-compose exec php php -i | grep xdebug
allow_failure: true
except:
- tags
......@@ -97,11 +94,9 @@ build:php-alpine-nginx:
test:php-alpine-nginx:
stage: nginx-test
script:
- docker-compose run --rm php-alpine-nginx php --version
- docker-compose run --rm php-alpine-nginx composer --version
- docker-compose run --rm php-alpine-nginx codecept --version
- docker-compose run --rm php-alpine-nginx phpunit --version
- docker-compose run --rm php-alpine-nginx mysql --version
- sh test/prod.sh
- sh test/dev.sh
- docker-compose run --rm php-alpine-nginx nginx -v
release:nginx:latest:
stage: nginx-release
......@@ -125,7 +120,9 @@ build:php-alpine-nginx-xdebug:
test:php-alpine-nginx-xdebug:
stage: nginx-xdebug-test
script:
- docker-compose run --rm -e PHP_ENABLE_XDEBUG=1 php-alpine-nginx-xdebug php -i | grep xdebug
- sh test/debug.sh
release:php-alpine-nginx-xdebug:latest:
stage: nginx-xdebug-release
......
......@@ -4,4 +4,5 @@ RUN apk --no-cache add --virtual .build-deps \
g++ \
autoconf \
make \
&& pecl install xdebug
\ No newline at end of file
&& pecl install xdebug \
&& apk del .build-deps
\ No newline at end of file
......@@ -38,6 +38,7 @@ RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-di
pdo_mysql \
mbstring \
mcrypt \
opcache \
zip \
bcmath \
soap
......
......@@ -38,6 +38,7 @@ RUN apk --update add \
iconv \
intl \
mbstring \
opcache \
pdo_mysql \
pdo_pgsql && \
apk del \
......
......@@ -4,7 +4,9 @@ date.timezone = UTC
; General settings
memory_limit=128M
max_execution_time=30
sys_temp_dir=/tmp
upload_max_filesize=512M
upload_tmp_dir=/tmp
post_max_size=512M
; Security, Debug & Logs
......
#!/usr/bin/env bash
PHP_SERVICE=${PHP_SERVICE-php}
echo "Running one-off command with xdebug"
docker-compose run -e PHP_ENABLE_XDEBUG=1 ${PHP_SERVICE} php -i | grep xdebug
echo "Starting stack with xdebug"
PHP_ENABLE_XDEBUG=1 docker-compose up -d ${PHP_SERVICE}
sleep 5
docker-compose exec ${PHP_SERVICE} php -i -- | grep xdebug
docker-compose down -v
echo "Starting stack without xdebug"
PHP_ENABLE_XDEBUG=0 docker-compose up -d ${PHP_SERVICE}
sleep 5
docker-compose exec ${PHP_SERVICE} "php -i" | grep xdebug
docker-compose down -v
......@@ -2,9 +2,9 @@
PHP_SERVICE=${PHP_SERVICE-php}
docker-compose run --rm ${PHP_SERVICE} php --version
docker-compose run --rm ${PHP_SERVICE} composer --version
docker-compose run --rm ${PHP_SERVICE} codecept --version
docker-compose run --rm ${PHP_SERVICE} phpunit --version
docker-compose run --rm ${PHP_SERVICE} mysql --version
docker-compose run --rm ${PHP_SERVICE} git --version
\ No newline at end of file
docker-compose run --rm ${PHP_SERVICE} git --version
docker-compose run --rm ${PHP_SERVICE} npm --version
\ No newline at end of file
#!/usr/bin/env bash
PHP_SERVICE=${PHP_SERVICE-php}
docker-compose run --rm ${PHP_SERVICE} php --version
docker-compose run --rm ${PHP_SERVICE} php -i | grep opcache
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment