File tree Expand file tree Collapse file tree 5 files changed +87
-6
lines changed Expand file tree Collapse file tree 5 files changed +87
-6
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ language: bash
2
2
services : docker
3
3
4
4
env :
5
+ - VERSION=8.3-rc VARIANT=apache
6
+ - VERSION=8.3-rc VARIANT=fpm
5
7
- VERSION=8.2 VARIANT=apache
6
8
- VERSION=8.2 VARIANT=fpm
7
9
- VERSION=7 VARIANT=apache
Original file line number Diff line number Diff line change
1
+ # from https://www.drupal.org/requirements/php#drupalversions
2
+ FROM php:7.1-apache
3
+
4
+ RUN a2enmod rewrite
5
+
6
+ # install the PHP extensions we need
7
+ RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libpq-dev \
8
+ && rm -rf /var/lib/apt/lists/* \
9
+ && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
10
+ && docker-php-ext-install gd mbstring opcache pdo pdo_mysql pdo_pgsql zip
11
+
12
+ # set recommended PHP.ini settings
13
+ # see https://secure.php.net/manual/en/opcache.installation.php
14
+ RUN { \
15
+ echo 'opcache.memory_consumption=128' ; \
16
+ echo 'opcache.interned_strings_buffer=8' ; \
17
+ echo 'opcache.max_accelerated_files=4000' ; \
18
+ echo 'opcache.revalidate_freq=60' ; \
19
+ echo 'opcache.fast_shutdown=1' ; \
20
+ echo 'opcache.enable_cli=1' ; \
21
+ } > /usr/local/etc/php/conf.d/opcache-recommended.ini
22
+
23
+ WORKDIR /var/www/html
24
+
25
+ # https://www.drupal.org/node/3060/release
26
+ ENV DRUPAL_VERSION 8.3.0-alpha1
27
+ ENV DRUPAL_MD5 601f931d5a3281214917e3eabfd86408
28
+
29
+ RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
30
+ && echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
31
+ && tar -xz --strip-components=1 -f drupal.tar.gz \
32
+ && rm drupal.tar.gz \
33
+ && chown -R www-data:www-data sites modules themes
Original file line number Diff line number Diff line change
1
+ # from https://www.drupal.org/requirements/php#drupalversions
2
+ FROM php:7.1-fpm
3
+
4
+ # install the PHP extensions we need
5
+ RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libpq-dev \
6
+ && rm -rf /var/lib/apt/lists/* \
7
+ && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
8
+ && docker-php-ext-install gd mbstring opcache pdo pdo_mysql pdo_pgsql zip
9
+
10
+ # set recommended PHP.ini settings
11
+ # see https://secure.php.net/manual/en/opcache.installation.php
12
+ RUN { \
13
+ echo 'opcache.memory_consumption=128' ; \
14
+ echo 'opcache.interned_strings_buffer=8' ; \
15
+ echo 'opcache.max_accelerated_files=4000' ; \
16
+ echo 'opcache.revalidate_freq=60' ; \
17
+ echo 'opcache.fast_shutdown=1' ; \
18
+ echo 'opcache.enable_cli=1' ; \
19
+ } > /usr/local/etc/php/conf.d/opcache-recommended.ini
20
+
21
+ WORKDIR /var/www/html
22
+
23
+ # https://www.drupal.org/node/3060/release
24
+ ENV DRUPAL_VERSION 8.3.0-alpha1
25
+ ENV DRUPAL_MD5 601f931d5a3281214917e3eabfd86408
26
+
27
+ RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
28
+ && echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
29
+ && tar -xz --strip-components=1 -f drupal.tar.gz \
30
+ && rm drupal.tar.gz \
31
+ && chown -R www-data:www-data sites modules themes
Original file line number Diff line number Diff line change 3
3
4
4
declare -A aliases=(
5
5
[8.2]=' 8 latest'
6
+ [8.3-rc]=' rc'
6
7
)
7
8
8
9
self=" $( basename " $BASH_SOURCE " ) "
@@ -52,15 +53,16 @@ join() {
52
53
}
53
54
54
55
for version in " ${versions[@]} " ; do
56
+ rcVersion=" ${version% -rc} "
55
57
for variant in apache fpm; do
56
58
commit=" $( dirCommit " $version /$variant " ) "
57
59
58
60
fullVersion=" $( git show " $commit " :" $version /$variant /Dockerfile" | awk ' $1 == "ENV" && $2 == "DRUPAL_VERSION" { print $3; exit }' ) "
59
61
60
62
versionAliases=()
61
- while [ " $fullVersion " != " $version " -a " ${fullVersion% [.- ]* } " != " $fullVersion " ]; do
63
+ while [ " $fullVersion " != " $rcVersion " -a " ${fullVersion% [.]* } " != " $fullVersion " ]; do
62
64
versionAliases+=( $fullVersion )
63
- fullVersion=" ${fullVersion% [.- ]* } "
65
+ fullVersion=" ${fullVersion% [.]* } "
64
66
done
65
67
versionAliases+=(
66
68
$version
Original file line number Diff line number Diff line change @@ -9,11 +9,26 @@ if [ ${#versions[@]} -eq 0 ]; then
9
9
fi
10
10
versions=( " ${versions[@]%/ } " )
11
11
12
- curl -fSL ' https://www.drupal.org/node/3060/release' -o release
12
+ curl -fsSL ' https://www.drupal.org/node/3060/release' -o release
13
+ trap ' rm -f release' EXIT
13
14
14
15
travisEnv=
15
16
for version in " ${versions[@]} " ; do
16
- fullVersion=" $( grep -E ' >drupal-' " $version " ' \.[0-9a-z.-]+\.tar\.gz<' release | sed -r ' s!.*<a[^>]+>drupal-([^<]+)\.tar\.gz</a>.*!\1!' | head -1) "
17
+ rcGrepV=' -v'
18
+ rcVersion=" ${version% -rc} "
19
+ if [ " $rcVersion " != " $version " ]; then
20
+ rcGrepV=
21
+ fi
22
+ fullVersion=" $(
23
+ grep -E ' >drupal-' " $rcVersion " ' \.[0-9a-z.-]+\.tar\.gz<' release \
24
+ | sed -r ' s!.*<a[^>]+>drupal-([^<]+)\.tar\.gz</a>.*!\1!' \
25
+ | grep $rcGrepV -E -- ' -rc|-beta|-alpha|-dev' \
26
+ | head -1
27
+ ) "
28
+ if [ -z " $fullVersion " ]; then
29
+ echo >&2 " error: cannot find release for $version "
30
+ exit 1
31
+ fi
17
32
md5=" $( grep -A6 -m1 ' >drupal-' " $fullVersion " ' .tar.gz<' release | grep -A1 -m1 ' "md5 hash"' | tail -1 | awk ' { print $1 }' ) "
18
33
19
34
(
31
46
32
47
travis=" $( awk -v ' RS=\n\n' ' $1 == "env:" { $0 = "env:' " $travisEnv " ' " } { printf "%s%s", $0, RS }' .travis.yml) "
33
48
echo " $travis " > .travis.yml
34
-
35
- rm -f release
You can’t perform that action at this time.
0 commit comments