Skip to content

Add 8.3.x branch, and use PHP 7.1 for the new branch. #71

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

Merged
merged 2 commits into from
Feb 6, 2017
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
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ language: bash
services: docker

env:
- VERSION=8.3-rc VARIANT=apache
- VERSION=8.3-rc VARIANT=fpm
- VERSION=8.2 VARIANT=apache
- VERSION=8.2 VARIANT=fpm
- VERSION=7 VARIANT=apache
Expand Down
33 changes: 33 additions & 0 deletions 8.3-rc/apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# from https://www.drupal.org/requirements/php#drupalversions
FROM php:7.1-apache

RUN a2enmod rewrite

# install the PHP extensions we need
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libpq-dev \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd mbstring opcache pdo pdo_mysql pdo_pgsql zip

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
RUN { \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=60'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.enable_cli=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini

WORKDIR /var/www/html

# https://www.drupal.org/node/3060/release
ENV DRUPAL_VERSION 8.3.0-alpha1
ENV DRUPAL_MD5 601f931d5a3281214917e3eabfd86408

RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
&& tar -xz --strip-components=1 -f drupal.tar.gz \
&& rm drupal.tar.gz \
&& chown -R www-data:www-data sites modules themes
31 changes: 31 additions & 0 deletions 8.3-rc/fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# from https://www.drupal.org/requirements/php#drupalversions
FROM php:7.1-fpm

# install the PHP extensions we need
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libpq-dev \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd mbstring opcache pdo pdo_mysql pdo_pgsql zip

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
RUN { \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=60'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.enable_cli=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini

WORKDIR /var/www/html

# https://www.drupal.org/node/3060/release
ENV DRUPAL_VERSION 8.3.0-alpha1
ENV DRUPAL_MD5 601f931d5a3281214917e3eabfd86408

RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
&& tar -xz --strip-components=1 -f drupal.tar.gz \
&& rm drupal.tar.gz \
&& chown -R www-data:www-data sites modules themes
6 changes: 4 additions & 2 deletions generate-stackbrew-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -eu

declare -A aliases=(
[8.2]='8 latest'
[8.3-rc]='rc'
)

self="$(basename "$BASH_SOURCE")"
Expand Down Expand Up @@ -52,15 +53,16 @@ join() {
}

for version in "${versions[@]}"; do
rcVersion="${version%-rc}"
for variant in apache fpm; do
commit="$(dirCommit "$version/$variant")"

fullVersion="$(git show "$commit":"$version/$variant/Dockerfile" | awk '$1 == "ENV" && $2 == "DRUPAL_VERSION" { print $3; exit }')"

versionAliases=()
while [ "$fullVersion" != "$version" -a "${fullVersion%[.-]*}" != "$fullVersion" ]; do
while [ "$fullVersion" != "$rcVersion" -a "${fullVersion%[.]*}" != "$fullVersion" ]; do
versionAliases+=( $fullVersion )
fullVersion="${fullVersion%[.-]*}"
fullVersion="${fullVersion%[.]*}"
done
versionAliases+=(
$version
Expand Down
21 changes: 17 additions & 4 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,26 @@ if [ ${#versions[@]} -eq 0 ]; then
fi
versions=( "${versions[@]%/}" )

curl -fSL 'https://www.drupal.org/node/3060/release' -o release
curl -fsSL 'https://www.drupal.org/node/3060/release' -o release
trap 'rm -f release' EXIT

travisEnv=
for version in "${versions[@]}"; do
fullVersion="$(grep -E '>drupal-'"$version"'\.[0-9a-z.-]+\.tar\.gz<' release | sed -r 's!.*<a[^>]+>drupal-([^<]+)\.tar\.gz</a>.*!\1!' | head -1)"
rcGrepV='-v'
rcVersion="${version%-rc}"
if [ "$rcVersion" != "$version" ]; then
rcGrepV=
fi
fullVersion="$(
grep -E '>drupal-'"$rcVersion"'\.[0-9a-z.-]+\.tar\.gz<' release \
| sed -r 's!.*<a[^>]+>drupal-([^<]+)\.tar\.gz</a>.*!\1!' \
| grep $rcGrepV -E -- '-rc|-beta|-alpha|-dev' \
| head -1
)"
if [ -z "$fullVersion" ]; then
echo >&2 "error: cannot find release for $version"
exit 1
fi
md5="$(grep -A6 -m1 '>drupal-'"$fullVersion"'.tar.gz<' release | grep -A1 -m1 '"md5 hash"' | tail -1 | awk '{ print $1 }')"

(
Expand All @@ -31,5 +46,3 @@ done

travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)"
echo "$travis" > .travis.yml

rm -f release