Add building additional test container

This commit is contained in:
Deon George 2020-08-23 12:54:50 +10:00
parent d752fa113f
commit 74afe07a7b
2 changed files with 26 additions and 0 deletions

View File

@ -3,6 +3,7 @@ image: docker:latest
stages: stages:
- test - test
- build - build
- build-test
variables: variables:
BRANCH: mp BRANCH: mp
@ -41,3 +42,16 @@ x86_64:build:
- x86_64 - x86_64
only: only:
- mysql - mysql
x86_64:build-test:
stage: build-test
script:
- if [ -f init ]; then chmod 500 init; fi
- ([ -z "$REFRESH" ] && docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG}) || echo "true"
- docker build --file Docker.phptest --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}-test
tags:
- docker
- x86_64
only:
- mysql

12
Dockerfile.phptest Executable file
View File

@ -0,0 +1,12 @@
# NAME leenooks/php
# VERSION 7.4-fpm-mp
FROM registry.leenook.net/leenooks/php:7.4-fpm
RUN apt-get update && apt-get install -y autoconf \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& apt-get purge autoonf \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \