Skip to content

Commit 330ce15

Browse files
committed
Merge branch 'release-5.2.3' into stable
2 parents f289171 + 9d03b38 commit 330ce15

File tree

9 files changed

+133
-30
lines changed

9 files changed

+133
-30
lines changed

.travis.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
language: bash
2+
3+
services:
4+
- docker
5+
env:
6+
global:
7+
- NAME="osixia/wordpress"
8+
- VERSION="${TRAVIS_BRANCH}-dev"
9+
matrix:
10+
- TARGET_ARCH=amd64 QEMU_ARCH=x86_64
11+
- TARGET_ARCH=arm32v7 QEMU_ARCH=arm
12+
- TARGET_ARCH=arm64v8 QEMU_ARCH=aarch64
13+
14+
addons:
15+
apt:
16+
# The docker manifest command was added in docker-ee version 18.x
17+
# So update our current installation and we also have to enable the experimental features.
18+
sources:
19+
- sourceline: "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
20+
key_url: "https://download.docker.com/linux/ubuntu/gpg"
21+
packages:
22+
- docker-ce
23+
24+
before_install:
25+
- docker --version
26+
- mkdir $HOME/.docker
27+
- 'echo "{" > $HOME/.docker/config.json'
28+
- 'echo " \"experimental\": \"enabled\"" >> $HOME/.docker/config.json'
29+
- 'echo "}" >> $HOME/.docker/config.json'
30+
- sudo service docker restart
31+
32+
install:
33+
# For cross buidling our images
34+
# This is necessary because travis-ci.org has only x86_64 machines.
35+
# If travis-ci.org gets native arm builds, probably this step is not
36+
# necessary any more.
37+
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
38+
# Bats is necessary for the UT
39+
- curl -o bats.tar.gz -SL https://github.com/bats-core/bats-core/archive/v1.1.0.tar.gz
40+
- mkdir bats-core && tar -xf bats.tar.gz -C bats-core --strip-components=1
41+
- cd bats-core/
42+
- sudo ./install.sh /usr/local
43+
- cd ..
44+
45+
before_script:
46+
# Set baseimage.
47+
- sed -i -e "s/FROM \(.*\)/FROM \1-${TARGET_ARCH}/g" image/Dockerfile;
48+
- cat image/Dockerfile;
49+
# If this is a tag then change the VERSION variable to only have the
50+
# tag name and not also the commit hash.
51+
- if [ -n "$TRAVIS_TAG" ]; then
52+
VERSION=$(echo "${TRAVIS_TAG}" | sed -e 's/\(.*\)[-v]\(.*\)/\1\2/g');
53+
fi
54+
- if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
55+
VERSION="stable";
56+
fi
57+
58+
script:
59+
- make build-nocache NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
60+
# Run the test and if the test fails mark the build as failed.
61+
- make test NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
62+
63+
before_deploy:
64+
- docker run -d --name test_image ${NAME}:${VERSION}-${TARGET_ARCH} sleep 10
65+
- sleep 5
66+
- sudo docker ps | grep -q test_image
67+
# To have `DOCKER_USER` and `DOCKER_PASS`
68+
# use `travis env set`.
69+
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASS";
70+
- make tag NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
71+
72+
deploy:
73+
provider: script
74+
on:
75+
all_branches: true
76+
script: make push NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
77+
78+
jobs:
79+
include:
80+
- stage: Manifest creation
81+
install: skip
82+
script: skip
83+
after_deploy:
84+
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASS";
85+
- docker manifest create ${NAME}:${VERSION} ${NAME}:${VERSION}-amd64 ${NAME}:${VERSION}-arm32v7 ${NAME}:${VERSION}-arm64v8;
86+
docker manifest annotate ${NAME}:${VERSION} ${NAME}:${VERSION}-amd64 --os linux --arch amd64;
87+
docker manifest annotate ${NAME}:${VERSION} ${NAME}:${VERSION}-arm32v7 --os linux --arch arm --variant v7;
88+
docker manifest annotate ${NAME}:${VERSION} ${NAME}:${VERSION}-arm64v8 --os linux --arch arm64 --variant v8;
89+
90+
# The latest tag is coming from the stable branch of the repo
91+
- if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
92+
docker manifest create ${NAME}:latest ${NAME}:${VERSION}-amd64 ${NAME}:${VERSION}-arm32v7 ${NAME}:${VERSION}-arm64v8;
93+
docker manifest annotate ${NAME}:latest ${NAME}:${VERSION}-amd64 --os linux --arch amd64;
94+
docker manifest annotate ${NAME}:latest ${NAME}:${VERSION}-arm32v7 --os linux --arch arm --variant v7;
95+
docker manifest annotate ${NAME}:latest ${NAME}:${VERSION}-arm64v8 --os linux --arch arm64 --variant v8;
96+
fi
97+
98+
- docker manifest push ${NAME}:${VERSION};
99+
if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
100+
docker manifest push ${NAME}:latest;
101+
fi

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project follows Wordpress versioning.
66

7+
## [5.2.3] - 2019-09-29
8+
## Added
9+
- Multiarch support
10+
11+
### Changed
12+
- Upgrade Wordpress version to 5.2.3
13+
- Upgrade baseimage to web-baseimage:1.2.0 (debian buster)
14+
715
## [5.2.1] - 2019-05-29
816
### Changed
917
- Upgrade Wordpress version to 5.2.1
@@ -110,6 +118,7 @@ and this project follows Wordpress versioning.
110118
## 0.1.0 - 2015-02-23
111119
Initial release
112120

121+
[5.2.3]: https://github.com/osixia/docker-wordpress/compare/v5.2.1...v5.2.3
113122
[5.2.1]: https://github.com/osixia/docker-wordpress/compare/v5.1.1...v5.2.1
114123
[5.1.1]: https://github.com/osixia/docker-wordpress/compare/v5.0.3...v5.1.1
115124
[5.0.3]: https://github.com/osixia/docker-wordpress/compare/v4.9.7...v5.0.3

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME = osixia/wordpress
2-
VERSION = 5.2.1
2+
VERSION = 5.2.3
33

44
.PHONY: build build-nocache test tag-latest push push-latest release git-tag-version
55

@@ -12,6 +12,9 @@ build-nocache:
1212
test:
1313
env NAME=$(NAME) VERSION=$(VERSION) bats test/test.bats
1414

15+
tag:
16+
docker tag $(NAME):$(VERSION) $(NAME):$(VERSION)
17+
1518
tag-latest:
1619
docker tag $(NAME):$(VERSION) $(NAME):latest
1720

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A docker image to run wordpress
66

77
[hub]: https://hub.docker.com/r/osixia/wordpress/
88

9-
Latest release: 5.2.1 - Wordpress 5.2.1 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/wordpress) 
9+
Latest release: 5.2.3 - Wordpress 5.2.3 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/wordpress) 
1010

1111
### Under the hood: osixia/web-baseimage
1212

image/Dockerfile

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,25 @@
1-
FROM osixia/web-baseimage:1.1.2
1+
FROM osixia/web-baseimage:release-1.2.0-dev
22

33
# Wordpress version
4-
ARG WORDPRESS_VERSION=5.2.1
5-
ARG WORDPRESS_MD5=aa13bf5f99e05fe8ab24940b382f2e3f
4+
ARG WORDPRESS_VERSION=5.2.3
5+
ARG WORDPRESS_MD5=bde83b629bc7a833f7000bc522cde120
66

7-
# MariaDB version
8-
ARG MARIADB_MAJOR=10.3
9-
10-
# Install apache2 and php7.0-fpm using osixia/baseimage utils
7+
# Install apache2 and php7.3-fpm using osixia/baseimage utils
118
# Caution: /container/tool/install-service-available arguments order is important
12-
# php7.0-fpm install will detect apache2 and configure it
13-
14-
# Add MariaDB repository
15-
RUN apt-key adv --no-tty --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 \
16-
&& echo "deb http://ftp.igh.cnrs.fr/pub/mariadb/repo/$MARIADB_MAJOR/debian stretch main" > /etc/apt/sources.list.d/mariadb.list \
17-
&& { \
18-
echo 'Package: *'; \
19-
echo 'Pin: release o=MariaDB'; \
20-
echo 'Pin-Priority: 999'; \
21-
} > /etc/apt/preferences.d/mariadb
9+
# php7.3-fpm install will detect apache2 and configure it
2210

2311
# Download, check integrity and unzip wordpress to /var/www/wordpress_bootstrap,
2412
RUN apt-get update \
2513
&& /container/tool/add-multiple-process-stack \
26-
&& /container/tool/add-service-available :apache2 :php7.0-fpm :ssl-tools \
14+
&& /container/tool/add-service-available :apache2 :php7.3-fpm :ssl-tools \
2715
&& LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
2816
ca-certificates \
2917
curl \
30-
mariadb-client-$MARIADB_MAJOR \
31-
php7.0-apc \
32-
php7.0-gd \
33-
php7.0-mcrypt \
34-
php7.0-mysql \
35-
php7.0-ldap \
18+
mariadb-client \
19+
php7.3-apc \
20+
php7.3-gd \
21+
php7.3-ldap \
22+
php7.3-mysql \
3623
&& curl -o wordpress.tar.gz -SL https://wordpress.org/wordpress-${WORDPRESS_VERSION}.tar.gz \
3724
&& echo "$WORDPRESS_MD5 *wordpress.tar.gz" | md5sum -c - \
3825
&& mkdir -p /var/www/wordpress_bootstrap /var/www/wordpress \

image/environment/default.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ WORDPRESS_LDAP_CLIENT_TLS_CA_CRT_FILENAME: ldap-ca.crt
3838
WORDPRESS_SSL_HELPER_PREFIX: wordpress
3939
LDAP_CLIENT_SSL_HELPER_PREFIX: ldap
4040

41-
SSL_HELPER_AUTO_RENEW_SERVICES_IMPACTED: :apache2 :php7.0-fpm
41+
SSL_HELPER_AUTO_RENEW_SERVICES_IMPACTED: :apache2 :php7.3-fpm

image/service/wordpress/startup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ if [ ! -e "$FIRST_START_DONE" ]; then
8383
sed -i "s/define( 'WP_DEFAULT_THEME', '[^']*'/define( 'WP_DEFAULT_THEME', '${WORDPRESS_DEFAULT_THEME}'/g" /var/www/wordpress/wp-includes/default-constants.php
8484
fi
8585

86-
cp -f "${CONTAINER_SERVICE_DIR}/wordpress/assets/php7.0-fpm/opcache.ini" /etc/php/7.0/fpm/conf.d/opcache.ini
86+
cp -f "${CONTAINER_SERVICE_DIR}/wordpress/assets/php7.3-fpm/opcache.ini" /etc/php/7.3/fpm/conf.d/opcache.ini
8787

8888
if [ "${WORDPRESS_PRODUCTION}" = "true" ]; then
89-
sed -i "s/;opcache.validate_timestamps/opcache.validate_timestamps/g" /etc/php/7.0/fpm/conf.d/opcache.ini
89+
sed -i "s/;opcache.validate_timestamps/opcache.validate_timestamps/g" /etc/php/7.3/fpm/conf.d/opcache.ini
9090
fi
9191

9292
touch "${FIRST_START_DONE}"

test/test.bats

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ load test_helper
1313
tmp_file="$BATS_TMPDIR/docker-test"
1414

1515
run_image
16-
wait_process apache2 php-fpm7.0
16+
wait_process apache2 php-fpm7.3
17+
18+
sleep 5
19+
1720
curl -L --silent --insecure https://$CONTAINER_IP >> $tmp_file
1821
run grep -c "Setup Configuration File" $tmp_file
1922
rm $tmp_file

0 commit comments

Comments
 (0)