Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Php 7.3 support #811

Merged
merged 7 commits into from
Jan 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,17 @@ phpimages := php__5.6-fpm \
php__7.0-fpm \
php__7.1-fpm \
php__7.2-fpm \
php__7.3-fpm \
php__5.6-cli \
php__7.0-cli \
php__7.1-cli \
php__7.2-cli \
php__7.3-cli \
php__5.6-cli-drupal \
php__7.0-cli-drupal \
php__7.1-cli-drupal \
php__7.2-cli-drupal
php__7.2-cli-drupal \
php__7.3-cli-drupal


build-phpimages = $(foreach image,$(phpimages),build/$(image))
Expand All @@ -212,15 +215,17 @@ $(build-phpimages): build/commons
base-images += $(phpimages)
s3-images += php

build/php__5.6-fpm build/php__7.0-fpm build/php__7.1-fpm build/php__7.2-fpm: images/commons
build/php__5.6-fpm build/php__7.0-fpm build/php__7.1-fpm build/php__7.2-fpm build/php__7.3-fpm: images/commons
build/php__5.6-cli: build/php__5.6-fpm
build/php__7.0-cli: build/php__7.0-fpm
build/php__7.1-cli: build/php__7.1-fpm
build/php__7.2-cli: build/php__7.2-fpm
build/php__7.3-cli: build/php__7.3-fpm
build/php__5.6-cli-drupal: build/php__5.6-cli
build/php__7.0-cli-drupal: build/php__7.0-cli
build/php__7.1-cli-drupal: build/php__7.1-cli
build/php__7.2-cli-drupal: build/php__7.2-cli
build/php__7.3-cli-drupal: build/php__7.3-cli

#######
####### Solr Images
Expand Down Expand Up @@ -458,7 +463,7 @@ $(run-rest-tests): minishift build/node__6-builder build/node__8-builder build/o
IMAGE_REPO=$(CI_BUILD_TAG) docker-compose -p $(CI_BUILD_TAG) up -d $(deployment-test-services-rest)
IMAGE_REPO=$(CI_BUILD_TAG) docker exec -i $$(docker-compose -p $(CI_BUILD_TAG) ps -q tests) ansible-playbook /ansible/tests/$(testname).yaml $(testparameter)

tests/drupal tests/drupal-postgres tests/drupal-galera: minishift build/varnish-drupal build/solr__5.5-drupal build/nginx-drupal build/redis build/php__5.6-cli-drupal build/php__7.0-cli-drupal build/php__7.1-cli-drupal build/php__7.2-cli-drupal build/api-db build/postgres-drupal build/mariadb-drupal build/oc-build-deploy-dind $(foreach image,$(deployment-test-services-rest),build/$(image)) build/drush-alias push-minishift
tests/drupal tests/drupal-postgres tests/drupal-galera: minishift build/varnish-drupal build/solr__5.5-drupal build/nginx-drupal build/redis build/php__5.6-cli-drupal build/php__7.0-cli-drupal build/php__7.1-cli-drupal build/php__7.2-cli-drupal build/php__7.3-cli-drupal build/api-db build/postgres-drupal build/mariadb-drupal build/oc-build-deploy-dind $(foreach image,$(deployment-test-services-rest),build/$(image)) build/drush-alias push-minishift
$(eval testname = $(subst tests/,,$@))
IMAGE_REPO=$(CI_BUILD_TAG) docker-compose -p $(CI_BUILD_TAG) up -d $(deployment-test-services-rest) drush-alias
IMAGE_REPO=$(CI_BUILD_TAG) docker exec -i $$(docker-compose -p $(CI_BUILD_TAG) ps -q tests) ansible-playbook /ansible/tests/$(testname).yaml $(testparameter)
Expand Down
13 changes: 10 additions & 3 deletions images/php/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ RUN apk update \
&& apk upgrade \
&& apk add --no-cache fcgi \
ssmtp \
libzip libzip-dev \
# for gd
libpng-dev \
libjpeg-turbo-dev \
Expand All @@ -50,7 +51,10 @@ RUN apk update \
libxslt-dev \
postgresql-dev \
&& apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS \
&& if [ ${PHP_VERSION%.*.*} == "7" ]; then \
&& if [ ${PHP_VERSION%.*} == "7.3" ]; then \
yes '' | pecl install -f apcu \
&& yes '' | pecl install -f xdebug-2.7.0; \
elif [ ${PHP_VERSION%.*.*} == "7" ]; then \
yes '' | pecl install -f apcu \
&& yes '' | pecl install -f xdebug; \
fi \
Expand All @@ -68,7 +72,9 @@ RUN apk update \
&& sed -i '1s/^/;Intentionally disabled. Enable via setting env variable XDEBUG_ENABLE to true\n;/' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& rm -rf /var/cache/apk/* /tmp/pear/ \
&& apk del .phpize-deps \
&& mkdir -p /tmp/newrelic && cd /tmp/newrelic \

&& if [ ${PHP_VERSION%.*} != "7.3" ]; then \
mkdir -p /tmp/newrelic && cd /tmp/newrelic \
&& wget https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz \
&& gzip -dc newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz | tar --strip-components=1 -xf - \
&& NR_INSTALL_USE_CP_NOT_LN=1 ./newrelic-install install \
Expand All @@ -80,7 +86,8 @@ RUN apk update \
&& sed -i -e "s/newrelic.logfile = .*/newrelic.logfile = \"\/dev\/stdout\"/" /usr/local/etc/php/conf.d/newrelic.ini \
&& sed -i -e "s/newrelic.daemon.logfile = .*/newrelic.daemon.logfile = \"\/dev\/stdout\"/" /usr/local/etc/php/conf.d/newrelic.ini \
&& mv /usr/local/etc/php/conf.d/newrelic.ini /usr/local/etc/php/conf.d/newrelic.disable \
&& cd / && rm -rf /tmp/newrelic \
&& cd / && rm -rf /tmp/newrelic; \
fi \
&& mkdir -p /app \
&& fix-permissions /usr/local/etc/ \
&& fix-permissions /app \
Expand Down
6 changes: 3 additions & 3 deletions images/php/fpm/entrypoints/71-php-newrelic.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

# envplate the newrelic ini file
ep /usr/local/etc/php/conf.d/newrelic.disable

# enable newrelic only if NEWRELIC_ENABLED is set
if [ ${NEWRELIC_ENABLED+x} ]; then
# envplate the newrelic ini file
ep /usr/local/etc/php/conf.d/newrelic.disable

mv /usr/local/etc/php/conf.d/newrelic.disable /usr/local/etc/php/conf.d/newrelic.ini
fi
9 changes: 9 additions & 0 deletions tests/files/drupal8-dockerfiles/php7.3/Dockerfile.builder
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ARG IMAGE_REPO
FROM ${IMAGE_REPO:-amazeeio}/php:7.3-cli-drupal

COPY composer.json composer.lock /app/
COPY scripts /app/scripts
RUN composer install --no-dev
COPY . /app

ENV WEBROOT=web
2 changes: 2 additions & 0 deletions tests/files/drupal8-dockerfiles/php7.3/Dockerfile.mariadb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ARG IMAGE_REPO
FROM ${IMAGE_REPO:-amazeeio}/mariadb-drupal
9 changes: 9 additions & 0 deletions tests/files/drupal8-dockerfiles/php7.3/Dockerfile.nginx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ARG CLI_IMAGE
ARG IMAGE_REPO
FROM ${CLI_IMAGE:-builder} as builder

FROM ${IMAGE_REPO:-amazeeio}/nginx-drupal

COPY --from=builder /app /app

ENV WEBROOT=web
7 changes: 7 additions & 0 deletions tests/files/drupal8-dockerfiles/php7.3/Dockerfile.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ARG CLI_IMAGE
ARG IMAGE_REPO
FROM ${CLI_IMAGE:-builder} as builder

FROM ${IMAGE_REPO:-amazeeio}/php:7.3-fpm

COPY --from=builder /app /app
2 changes: 2 additions & 0 deletions tests/files/drupal8-dockerfiles/php7.3/Dockerfile.postgres
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ARG IMAGE_REPO
FROM ${IMAGE_REPO:-amazeeio}/postgres-drupal
2 changes: 2 additions & 0 deletions tests/files/drupal8-dockerfiles/php7.3/Dockerfile.redis
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ARG IMAGE_REPO
FROM ${IMAGE_REPO:-amazeeio}/redis
3 changes: 3 additions & 0 deletions tests/files/drupal8-dockerfiles/php7.3/Dockerfile.solr
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ARG IMAGE_REPO

FROM ${IMAGE_REPO:-amazeeio}/solr:5.5-drupal
2 changes: 2 additions & 0 deletions tests/files/drupal8-dockerfiles/php7.3/Dockerfile.varnish
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ARG IMAGE_REPO
FROM ${IMAGE_REPO:-amazeeio}/varnish-drupal
11 changes: 11 additions & 0 deletions tests/tests/drupal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@
project: ci-drupal
branch: drupal8-composer-72-mariadb

- include: drupal/drupal.yaml
vars:
testname: "Drupal 8 composer PHP 7.3 - MARIADB"
drupal_version: 8
db: mariadb
php_version: 7.3
git_repo_name: drupal.git
project: ci-drupal
branch: drupal8-composer-73-mariadb


- include: drupal/drush.yaml
vars:
testname: "DRUSH"
Expand Down