GitlabCi使用docker和mysql服务缓慢构build
我正在使用gitlab-ci-multirunner 9.3.0和GitLab Community Edition 9.3.5
当我在我的本地虚拟环境中运行我的php-unittesting时,总testing(30)只需要大概:
Time: 5 minutes, Memory: 96.00MB
在我的gitlab主机上运行相同的testing,它总共需要
Time: 41.68 minutes, Memory: 97.75MB
testing需要mysql,并在每个testing上做一个数据库创build和夹具加载。
我的DockerFile:
FROM tetraweb/php:5.6 # Install additional packages RUN apt-get clean && apt-get -qq update RUN apt-get -qq upgrade -y RUN apt-get install -qq -y apt-utils RUN apt-get install -qq -y mysql-client libmagickwand-dev libgeoip-dev -y --no-install-recommends RUN pecl install imagick apcu-4.0.11 geoip RUN docker-php-ext-enable exif gd gettext intl mcrypt mysql mysqli opcache pdo_mysql zip memcache apcu imagick geoi
我的gitlab-ci.yml:
variables: TIMEZONE: Europe/Berlin MYSQL_DATABASE: test MYSQL_ROOT_PASSWORD: test-root MYSQL_USER: test MYSQL_PASSWORD: asecurething SYMFONY_ENV: "test" stages: - test - deploy test: image: test-image-php:5.6 services: - mariadb:latest stage: test only: - branches except: - master script: - export COMPOSER_CACHE_DIR=x/cache/composer - SYMFONY_ENV=test composer install --no-progress --no-interaction - chmod +x bin/console - php vendor/phpunit/phpunit/phpunit --coverage-text --colors=never
我真的认为这是造成巨大差异的MySQL服务故障。 什么是提高我的phpunittesting的最佳方式?
- 在miniconda2 docker容器中安装tensorflow,theano,sklearn,nltk
- 为什么拉在Pod中的私人图像不工作在Kubernetesregistry插件?
- 从集装箱网站播放audio – 源audio位于何处?
- Docker – 如何启动mysql数据库与一个容器上运行的.sql文件?
- sed:未终止的's'命令 – 找不到需要转义的东西
- JENKINS:无法创builddocker图像
- 在Linux中的Docker-machine错误
- 运行在Ubuntu Docker容器中的tomcat7中的FileNotFoundException
- 如何在Elastic Beanstalk应用程序中的Docker容器之间共享卷?