diff --git a/.circleci/config.yml b/.circleci/config.yml index d3f87684..7e30184f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,44 @@ version: 2.1 jobs: + docker-build: + # machine: true + steps: + - run: + name: Docker Version + command: docker --version + - checkout + - restore_cache: + keys: + - docker-{{ checksum "Dockerfile" }}-{{ checksum "docker-compose.yml" }}-{{ checksum "composer.lock" }} + - docker-{{ checksum "Dockerfile" }}-{{ checksum "docker-compose.yml" }} + - docker-{{ checksum "Dockerfile" }} + - setup_remote_docker: + version: 18.09.3 + - run: + name: Load Docker layer cache + command: |- + # credits to: https://blog.jondh.me.uk/2018/04/strategies-for-docker-layer-caching-in-circleci/ + set +o pipefail + if [ -f /caches/${CIRCLE_PROJECT_REPONAME}.tar.gz ]; then + gunzip -c /caches/${CIRCLE_PROJECT_REPONAME}.tar.gz | docker load; + docker images; + fi + - run: + name: Docker Compose Build + command: |- + docker-compose build + - run: + name: Save Docker image layer cache + command: | + mkdir -p /caches + docker-compose build | grep '\-\-\->' | grep -v 'Using cache' | sed -e 's/[ >-]//g' > /tmp/layers.txt + docker save $(cat /tmp/layers.txt) | gzip > /caches/${CIRCLE_PROJECT_REPONAME}.tar.gz + - save_cache: + key: docker-{{ checksum "Dockerfile" }}-{{ checksum "docker-compose.yml" }}-{{ checksum "composer.lock" }} + paths: + - /caches/ + check-composer-config: docker: - image: composer:1 @@ -28,3 +66,4 @@ workflows: jobs: - check-composer-config - validate-commit-message + - docker-build diff --git a/.editorconfig b/.editorconfig index 4822ffe4..34f5326b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -20,5 +20,8 @@ indent_size = 2 [.circleci/config.yml] indent_size = 2 +[docker-compose.yml] +indent_size = 2 + [*.md] trim_trailing_whitespace = false diff --git a/Dockerfile b/Dockerfile index 68cef070..157098dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG PHP_TAG="7.2-cli-alpine3.8" +ARG PHP_TAG="7.3-cli-alpine3.9" FROM php:$PHP_TAG as ext-builder RUN docker-php-source extract && \ @@ -16,7 +16,7 @@ RUN pecl install xdebug && \ docker-php-ext-enable xdebug FROM ext-builder as ext-swoole -ARG SWOOLE_VERSION=4.2.13 +ARG SWOOLE_VERSION="4.3.1" RUN pecl install swoole-$SWOOLE_VERSION && \ docker-php-ext-enable swoole @@ -25,7 +25,7 @@ WORKDIR /usr/src/app RUN composer global require "hirak/prestissimo:^0.3" --prefer-dist --no-progress --no-suggest --classmap-authoritative --ansi COPY composer.json composer.lock ./ RUN composer validate -ARG COMPOSER_ARGS=install +ARG COMPOSER_ARGS="install" RUN composer "$COMPOSER_ARGS" --prefer-dist --ignore-platform-reqs --no-progress --no-suggest --no-scripts --no-autoloader --ansi COPY . ./ RUN composer dump-autoload --classmap-authoritative --ansi @@ -33,32 +33,29 @@ RUN composer dump-autoload --classmap-authoritative --ansi FROM php:$PHP_TAG as base RUN apk add --no-cache libstdc++ WORKDIR /usr/src/app -COPY --from=ext-swoole /usr/local/lib/php/extensions/no-debug-non-zts-20170718/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20170718/swoole.so +# php -i | grep 'PHP API' | sed -e 's/PHP API => //' +ARG PHP_API_VERSION="20180731" +COPY --from=ext-swoole /usr/local/lib/php/extensions/no-debug-non-zts-${PHP_API_VERSION}/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-${PHP_API_VERSION}/swoole.so COPY --from=ext-swoole /usr/local/etc/php/conf.d/docker-php-ext-swoole.ini /usr/local/etc/php/conf.d/docker-php-ext-swoole.ini -COPY --from=ext-inotify /usr/local/lib/php/extensions/no-debug-non-zts-20170718/inotify.so /usr/local/lib/php/extensions/no-debug-non-zts-20170718/inotify.so +COPY --from=ext-inotify /usr/local/lib/php/extensions/no-debug-non-zts-${PHP_API_VERSION}/inotify.so /usr/local/lib/php/extensions/no-debug-non-zts-${PHP_API_VERSION}/inotify.so COPY --from=ext-inotify /usr/local/etc/php/conf.d/docker-php-ext-inotify.ini /usr/local/etc/php/conf.d/docker-php-ext-inotify.ini -COPY --from=ext-pcntl /usr/local/lib/php/extensions/no-debug-non-zts-20170718/pcntl.so /usr/local/lib/php/extensions/no-debug-non-zts-20170718/pcntl.so +COPY --from=ext-pcntl /usr/local/lib/php/extensions/no-debug-non-zts-${PHP_API_VERSION}/pcntl.so /usr/local/lib/php/extensions/no-debug-non-zts-${PHP_API_VERSION}/pcntl.so COPY --from=ext-pcntl /usr/local/etc/php/conf.d/docker-php-ext-pcntl.ini /usr/local/etc/php/conf.d/docker-php-ext-pcntl.ini FROM base as base-with-xdebug -COPY --from=ext-xdebug /usr/local/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so /usr/local/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so +ARG PHP_API_VERSION="20180731" +COPY --from=ext-xdebug /usr/local/lib/php/extensions/no-debug-non-zts-${PHP_API_VERSION}/xdebug.so /usr/local/lib/php/extensions/no-debug-non-zts-${PHP_API_VERSION}/xdebug.so COPY --from=ext-xdebug /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini FROM base as base-cli COPY --from=app-installer /usr/src/app ./ -FROM base as base-server -RUN apk add --no-cache bash -COPY --from=app-installer /usr/src/app ./ - FROM base-with-xdebug as base-coverage -ENV COVERAGE=1 +ENV COVERAGE="1" COPY --from=app-installer /usr/src/app ./ -FROM base-with-xdebug as base-server-coverage +FROM base-coverage as base-server-coverage RUN apk add --no-cache bash -ENV COVERAGE=1 -COPY --from=app-installer /usr/src/app ./ FROM base-cli as Cli ENTRYPOINT ["./tests/Fixtures/Symfony/app/console"] @@ -74,16 +71,8 @@ FROM base-coverage as ComposerCoverage ENV COMPOSER_ALLOW_SUPERUSER=1 COPY --from=app-installer /usr/bin/composer /usr/local/bin/composer ENTRYPOINT ["composer"] -CMD ["code-coverage"] - -FROM base-server as Server -WORKDIR /usr/src/app/tests/Server -ENTRYPOINT ["/bin/bash"] -CMD ["../run-server-tests.sh"] +CMD ["unit-code-coverage"] FROM base-server-coverage as ServerCoverage -WORKDIR /usr/src/app/tests/Server -ENV APP_ENV=cov \ - SWOOLE_ALLOW_XDEBUG=1 ENTRYPOINT ["/bin/bash"] -CMD ["../run-server-tests.sh"] +CMD ["tests/run-feature-tests-code-coverage.sh"] diff --git a/composer.lock b/composer.lock index 044e54ed..1de13e71 100644 --- a/composer.lock +++ b/composer.lock @@ -1022,16 +1022,16 @@ }, { "name": "doctrine/annotations", - "version": "v1.6.0", + "version": "v1.6.1", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5" + "reference": "53120e0eb10355388d6ccbe462f1fea34ddadb24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", - "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/53120e0eb10355388d6ccbe462f1fea34ddadb24", + "reference": "53120e0eb10355388d6ccbe462f1fea34ddadb24", "shasum": "" }, "require": { @@ -1086,7 +1086,7 @@ "docblock", "parser" ], - "time": "2017-12-06T07:11:42+00:00" + "time": "2019-03-25T19:12:02+00:00" }, { "name": "doctrine/cache", @@ -1165,16 +1165,16 @@ }, { "name": "doctrine/collections", - "version": "v1.6.0", + "version": "v1.6.1", "source": { "type": "git", "url": "https://github.com/doctrine/collections.git", - "reference": "acc35813077be497dc7f658af76729fa456444e3" + "reference": "d2ae4ef05e25197343b6a39bae1d3c427a2f6956" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/acc35813077be497dc7f658af76729fa456444e3", - "reference": "acc35813077be497dc7f658af76729fa456444e3", + "url": "https://api.github.com/repos/doctrine/collections/zipball/d2ae4ef05e25197343b6a39bae1d3c427a2f6956", + "reference": "d2ae4ef05e25197343b6a39bae1d3c427a2f6956", "shasum": "" }, "require": { @@ -1231,7 +1231,7 @@ "iterators", "php" ], - "time": "2019-03-24T18:21:39+00:00" + "time": "2019-03-25T19:03:48+00:00" }, { "name": "doctrine/common", @@ -2507,25 +2507,22 @@ }, { "name": "nette/php-generator", - "version": "v3.2.1", + "version": "v3.2.2", "source": { "type": "git", "url": "https://github.com/nette/php-generator.git", - "reference": "9de4e093a130f7a1bd175198799ebc0efbac6924" + "reference": "acff8b136fad84b860a626d133e791f95781f9f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/php-generator/zipball/9de4e093a130f7a1bd175198799ebc0efbac6924", - "reference": "9de4e093a130f7a1bd175198799ebc0efbac6924", + "url": "https://api.github.com/repos/nette/php-generator/zipball/acff8b136fad84b860a626d133e791f95781f9f5", + "reference": "acff8b136fad84b860a626d133e791f95781f9f5", "shasum": "" }, "require": { "nette/utils": "^2.4.2 || ~3.0.0", "php": ">=7.1" }, - "conflict": { - "nette/nette": "<2.2" - }, "require-dev": { "nette/tester": "^2.0", "tracy/tracy": "^2.3" @@ -2565,7 +2562,7 @@ "php", "scaffolding" ], - "time": "2018-11-27T19:00:14+00:00" + "time": "2019-03-15T03:41:13+00:00" }, { "name": "nette/robot-loader", @@ -3276,16 +3273,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.11.4", + "version": "0.11.5", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "ccc4f854748664cc61d1f3d4ecb26810df1f0cd4" + "reference": "24ce5a566a798b81343138ed5d41d6877554cf9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ccc4f854748664cc61d1f3d4ecb26810df1f0cd4", - "reference": "ccc4f854748664cc61d1f3d4ecb26810df1f0cd4", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/24ce5a566a798b81343138ed5d41d6877554cf9a", + "reference": "24ce5a566a798b81343138ed5d41d6877554cf9a", "shasum": "" }, "require": { @@ -3345,7 +3342,7 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", - "time": "2019-03-14T14:46:15+00:00" + "time": "2019-03-25T16:40:09+00:00" }, { "name": "phpstan/phpstan-beberlei-assert", @@ -3810,16 +3807,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.0.5", + "version": "8.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "19cbed2120839772c4a00e8b28456b0c77d1a7b4" + "reference": "925109f8bbe6dae28fbc7bb07446a53abd3b1c25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/19cbed2120839772c4a00e8b28456b0c77d1a7b4", - "reference": "19cbed2120839772c4a00e8b28456b0c77d1a7b4", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/925109f8bbe6dae28fbc7bb07446a53abd3b1c25", + "reference": "925109f8bbe6dae28fbc7bb07446a53abd3b1c25", "shasum": "" }, "require": { @@ -3888,7 +3885,7 @@ "testing", "xunit" ], - "time": "2019-03-16T07:33:46+00:00" + "time": "2019-03-26T14:00:24+00:00" }, { "name": "psr/cache", diff --git a/docker-compose.yml b/docker-compose.yml index 92172820..f6ea434b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,411 +1,66 @@ version: "3.6" services: - ext-builder: - image: "k911/swoole-bundle:ext-builder--${BUILD_METADATA:-latest}" - build: - context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - target: ext-builder - args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" - COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" - - ext-inotify: - image: "k911/swoole-bundle:ext-inotify--${BUILD_METADATA:-latest}" - depends_on: - - ext-builder - build: - context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - target: ext-inotify - args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" - COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" - - ext-pcntl: - image: "k911/swoole-bundle:ext-pcntl--${BUILD_METADATA:-latest}" - depends_on: - - ext-inotify - build: - context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-pcntl--${CACHE_METADATA:-latest}" - target: ext-pcntl - args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" - COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" - - ext-xdebug: - image: "k911/swoole-bundle:ext-xdebug--${BUILD_METADATA:-latest}" - depends_on: - - ext-pcntl - build: - context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-pcntl--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-xdebug--${CACHE_METADATA:-latest}" - target: ext-xdebug - args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" - COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" - - ext-swoole: - image: "k911/swoole-bundle:ext-swoole--${BUILD_METADATA:-latest}" - depends_on: - - ext-xdebug - build: - context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-pcntl--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-swoole--${CACHE_METADATA:-latest}" - target: ext-swoole - args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" - COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" - - app-installer: - image: "k911/swoole-bundle:app-installer--${BUILD_METADATA:-latest}" - depends_on: - - ext-swoole - build: - context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-pcntl--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-swoole--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:app-installer--${CACHE_METADATA:-latest}" - target: app-installer - args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" - COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" - - base: - image: "k911/swoole-bundle:base--${BUILD_METADATA:-latest}" - depends_on: - - app-installer - build: - context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-pcntl--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-swoole--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:app-installer--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base--${CACHE_METADATA:-latest}" - target: base - args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" - COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" - - base-with-xdebug: - image: "k911/swoole-bundle:base-with-xdebug--${BUILD_METADATA:-latest}" - depends_on: - - base - build: - context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-pcntl--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-swoole--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:app-installer--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-with-xdebug--${CACHE_METADATA:-latest}" - target: base-with-xdebug - args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" - COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" - - base-cli: - image: "k911/swoole-bundle:base-cli--${BUILD_METADATA:-latest}" - depends_on: - - base-with-xdebug - build: - context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-pcntl--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-swoole--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:app-installer--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-with-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-cli--${CACHE_METADATA:-latest}" - target: base-cli - args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" - COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" - - base-server: - image: "k911/swoole-bundle:base-server--${BUILD_METADATA:-latest}" - depends_on: - - base-cli - build: - context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-pcntl--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-swoole--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:app-installer--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-with-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-cli--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-server--${CACHE_METADATA:-latest}" - target: base-server - args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" - COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" - - base-coverage: - image: "k911/swoole-bundle:base-coverage--${BUILD_METADATA:-latest}" - depends_on: - - base-server - build: - context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-pcntl--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-swoole--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:app-installer--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-with-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-cli--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-server--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-coverage--${CACHE_METADATA:-latest}" - target: base-server - args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" - COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" - - base-server-coverage: - image: "k911/swoole-bundle:base-server-coverage--${BUILD_METADATA:-latest}" - depends_on: - - base-coverage - build: - context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-pcntl--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-swoole--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:app-installer--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-with-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-cli--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-server--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-coverage--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-server-coverage--${CACHE_METADATA:-latest}" - target: base-server-coverage - args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" - COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" - cli: - image: "k911/swoole-bundle:cli--${BUILD_METADATA:-latest}" - depends_on: - - base-server-coverage + image: "${REGISTRY:-docker.io}/${NAMESPACE:-k911}/${IMAGE:-swoole-bundle-cli}:${TAG:-latest}" build: context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-pcntl--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-swoole--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:app-installer--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-with-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-cli--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-server--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-coverage--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-server-coverage--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:cli--${CACHE_METADATA:-latest}" target: Cli args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" + PHP_TAG: "${PHP_VERSION:-7.3}-cli-alpine${ALPINE_VERSION:-3.9}" + PHP_API_VERSION: "${PHP_API_VERSION:-20180731}" COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" + SWOOLE_VERSION: "${SWOOLE_VERSION:-4.3.1}" ports: - 9501:9501 composer: - image: "k911/swoole-bundle:composer--${BUILD_METADATA:-latest}" - depends_on: - - cli + image: "${REGISTRY:-docker.io}/${NAMESPACE:-k911}/${IMAGE:-swoole-bundle-composer}:${TAG:-latest}" build: context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-pcntl--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-swoole--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:app-installer--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-with-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-cli--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-server--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-coverage--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-server-coverage--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:cli--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:composer--${CACHE_METADATA:-latest}" target: Composer args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" + PHP_TAG: "${PHP_VERSION:-7.3}-cli-alpine${ALPINE_VERSION:-3.9}" + PHP_API_VERSION: "${PHP_API_VERSION:-20180731}" COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" + SWOOLE_VERSION: "${SWOOLE_VERSION:-4.3.1}" composer-coverage: - image: "k911/swoole-bundle:composer-coverage--${BUILD_METADATA:-latest}" - depends_on: - - composer + image: "${REGISTRY:-docker.io}/${NAMESPACE:-k911}/${IMAGE:-swoole-bundle-composer-coverage}:${TAG:-latest}" build: context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-pcntl--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-swoole--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:app-installer--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-with-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-cli--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-server--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-coverage--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-server-coverage--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:cli--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:composer--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:composer-coverage--${CACHE_METADATA:-latest}" target: ComposerCoverage args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" + PHP_TAG: "${PHP_VERSION:-7.3}-cli-alpine${ALPINE_VERSION:-3.9}" + PHP_API_VERSION: "${PHP_API_VERSION:-20180731}" COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" + SWOOLE_VERSION: "${SWOOLE_VERSION:-4.3.1}" volumes: - "./cov:/usr/src/app/cov" - server: - image: "k911/swoole-bundle:server--${BUILD_METADATA:-latest}" - depends_on: - - composer-coverage - build: - context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-pcntl--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-swoole--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:app-installer--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-with-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-cli--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-server--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-coverage--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-server-coverage--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:cli--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:composer--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:composer-coverage--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:server--${CACHE_METADATA:-latest}" - target: Server - args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" - COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" - server-coverage: - image: "k911/swoole-bundle:server-coverage--${BUILD_METADATA:-latest}" - depends_on: - - server + image: "${REGISTRY:-docker.io}/${NAMESPACE:-k911}/${IMAGE:-swoole-bundle-server-coverage}:${TAG:-latest}" build: context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-pcntl--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-swoole--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:app-installer--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-with-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-cli--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-server--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-coverage--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-server-coverage--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:cli--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:composer--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:composer-coverage--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:server--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:server-coverage--${CACHE_METADATA:-latest}" target: ServerCoverage args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" + PHP_TAG: "${PHP_VERSION:-7.3}-cli-alpine${ALPINE_VERSION:-3.9}" + PHP_API_VERSION: "${PHP_API_VERSION:-20180731}" COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" + SWOOLE_VERSION: "${SWOOLE_VERSION:-4.3.1}" volumes: - "./cov:/usr/src/app/cov" merge-code-coverage: - image: "k911/swoole-bundle:composer-coverage--${BUILD_METADATA:-latest}" + image: "${REGISTRY:-docker.io}/${NAMESPACE:-k911}/${IMAGE:-swoole-bundle-composer-coverage}:${TAG:-latest}" command: "merge-code-coverage" - depends_on: - - composer build: context: . - cache_from: - - "k911/swoole-bundle:ext-builder--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-inotify--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-pcntl--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:ext-swoole--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:app-installer--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-with-xdebug--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-cli--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-server--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-coverage--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:base-server-coverage--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:cli--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:composer--${CACHE_METADATA:-latest}" - - "k911/swoole-bundle:composer-coverage--${CACHE_METADATA:-latest}" target: ComposerCoverage args: - PHP_TAG: "${PHP_VERSION:-7.2}-cli-alpine${ALPINE_VERSION:-3.8}" + PHP_TAG: "${PHP_VERSION:-7.3}-cli-alpine${ALPINE_VERSION:-3.9}" + PHP_API_VERSION: "${PHP_API_VERSION:-20180731}" COMPOSER_ARGS: "${COMPOSER_ARGS:-install}" - SWOOLE_VERSION: "${SWOOLE_VERSION:-4.2.13}" + SWOOLE_VERSION: "${SWOOLE_VERSION:-4.3.1}" volumes: - "./cov:/usr/src/app/cov:ro" - "./clover.xml:/usr/src/app/clover.xml" diff --git a/docker-test.sh b/docker-test.sh deleted file mode 100755 index 0efe15ba..00000000 --- a/docker-test.sh +++ /dev/null @@ -1,149 +0,0 @@ -#!/usr/bin/env bash - -COVERAGE_DIR="cov" -COVERAGE_FILE="clover.xml" -REGISTRY="docker.io" -NAMESPACE="k911" -IMAGE_NAME="swoole-bundle" -IMAGE_WORKDIR="/usr/src/app" -IMAGE_APP_INSTALLER_TAG="app-installer" -IMAGE_EXT_BUILDER_TAG="ext-builder" -IMAGE_EXT_PCNTL_TAG="ext-pcntl" -IMAGE_EXT_XDEBUG_TAG="ext-xdebug" -IMAGE_EXT_INOTIFY_TAG="ext-inotify" -IMAGE_EXT_SWOOLE_TAG="ext-swoole" -IMAGE_BASE_TAG="base" -IMAGE_BASE_CLI_TAG="base-cli" -IMAGE_BASE_SERVER_TAG="base-server" -IMAGE_BASE_COVERAGE_TAG="base-coverage" -IMAGE_BASE_SERVER_COVERAGE_TAG="base-server-coverage" -IMAGE_BASE_WITH_XDEBUG_TAG="base-with-xdebug" -IMAGE_CLI_TAG="cli" -IMAGE_COMPOSER_TAG="composer" -IMAGE_COMPOSER_COVERAGE_TAG="composer-coverage" -IMAGE_SERVER_TAG="server" -IMAGE_SERVER_COVERAGE_TAG="server-coverage" - -# DOCKER_USER="" -# DOCKER_PASSWORD="" - -# echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USER" --password-stdin - -# requires docker-ce 18.09 -# export DOCKER_BUILDKIT=1 - - -docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_APP_INSTALLER_TAG" - -docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_BUILDER_TAG" -docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_SWOOLE_TAG" -docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_PCNTL_TAG" -docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_INOTIFY_TAG" -docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_XDEBUG_TAG" - -docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_TAG" -docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_CLI_TAG" -docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_WITH_XDEBUG_TAG" -docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_COVERAGE_TAG" -docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_SERVER_TAG" -docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_SERVER_COVERAGE_TAG" - -# docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_CLI_TAG" -# docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_COMPOSER_TAG" -# docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_COMPOSER_COVERAGE_TAG" -# docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_SERVER_TAG" -# docker pull "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_SERVER_COVERAGE_TAG" - -docker build --target Cli . \ - --tag "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_CLI_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_BUILDER_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_INOTIFY_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_PCNTL_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_SWOOLE_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_XDEBUG_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_APP_INSTALLER_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_CLI_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_WITH_XDEBUG_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_COVERAGE_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_SERVER_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_SERVER_COVERAGE_TAG" - -docker build --target Composer . \ - --tag "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_COMPOSER_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_BUILDER_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_INOTIFY_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_PCNTL_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_SWOOLE_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_XDEBUG_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_APP_INSTALLER_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_CLI_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_WITH_XDEBUG_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_COVERAGE_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_SERVER_TAG" \ - --cache-from "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_SERVER_COVERAGE_TAG" - -docker run "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_COMPOSER_TAG" cs-analyse -docker run "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_COMPOSER_TAG" static-analyse-src -docker run "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_COMPOSER_TAG" static-analyse-tests - -rm -rf "$COVERAGE_DIR" -mkdir "$COVERAGE_DIR" - -docker build -t "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_COMPOSER_COVERAGE_TAG" . \ - --target ComposerCoverage - -docker run -v "$(pwd)/$COVERAGE_DIR:$IMAGE_WORKDIR/$COVERAGE_DIR" "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_COMPOSER_COVERAGE_TAG" - -docker build -t "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_SERVER_TAG" . \ - --target Server - -docker run "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_SERVER_TAG" -c ls - -docker run "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_SERVER_TAG" - -docker build -t "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_SERVER_COVERAGE_TAG" . \ - --target ServerCoverage - -docker run -v "$(pwd)/$COVERAGE_DIR:$IMAGE_WORKDIR/$COVERAGE_DIR" "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_SERVER_COVERAGE_TAG" - -rm "$COVERAGE_FILE" -touch "$COVERAGE_FILE" -docker run -v "$(pwd)/$COVERAGE_DIR:$IMAGE_WORKDIR/$COVERAGE_DIR:ro" \ - -v "$(pwd)/$COVERAGE_FILE:$IMAGE_WORKDIR/$COVERAGE_FILE" \ - "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_COMPOSER_COVERAGE_TAG" merge-code-coverage - -docker build --target ext-builder --tag "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_BUILDER_TAG" . -docker build --target ext-swoole --tag "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_SWOOLE_TAG" . -docker build --target ext-pcntl --tag "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_PCNTL_TAG" . -docker build --target ext-inotify --tag "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_INOTIFY_TAG" . -docker build --target ext-xdebug --tag "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_XDEBUG_TAG" . - -docker build --target app-installer --tag "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_APP_INSTALLER_TAG" . -docker build --target base --tag "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_TAG" . -docker build --target base-cli --tag "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_CLI_TAG" . -docker build --target base-with-xdebug --tag "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_WITH_XDEBUG_TAG" . -docker build --target base-coverage --tag "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_COVERAGE_TAG" . -docker build --target base-server --tag "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_SERVER_TAG" . -docker build --target base-server-coverage --tag "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_SERVER_COVERAGE_TAG" . - -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_BUILDER_TAG" -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_SWOOLE_TAG" -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_PCNTL_TAG" -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_INOTIFY_TAG" -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_EXT_XDEBUG_TAG" - -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_APP_INSTALLER_TAG" -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_TAG" -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_CLI_TAG" -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_WITH_XDEBUG_TAG" -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_COVERAGE_TAG" -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_SERVER_TAG" -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_BASE_SERVER_COVERAGE_TAG" - -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_CLI_TAG" -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_COMPOSER_TAG" -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_COMPOSER_COVERAGE_TAG" -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_SERVER_TAG" -docker push "$REGISTRY/$NAMESPACE/$IMAGE_NAME:$IMAGE_SERVER_COVERAGE_TAG" diff --git a/tests/run-server-tests.sh b/tests/run-server-tests.sh deleted file mode 100755 index 377b7aa0..00000000 --- a/tests/run-server-tests.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -cd "$( dirname "${BASH_SOURCE[0]}" )"; - -EXIT_CODE=0 - -for f in ./Server/*.sh; do - echo "[Test] $f"; - if [[ "$COVERAGE" == "1" ]]; then - APP_ENV=cov SWOOLE_ALLOW_XDEBUG=1 bash "$f" -H || EXIT_CODE=1; - else - bash "$f" -H || EXIT_CODE=1; - fi -done - -exit $EXIT_CODE