Skip to content

Commit

Permalink
Merge branch 'release-1.4.0' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
BertrandGouny committed Nov 10, 2019
2 parents 5ca5d34 + 0e78c7e commit 42598a3
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 23 deletions.
101 changes: 101 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
language: bash

services:
- docker
env:
global:
- NAME="osixia/roundcube"
- VERSION="${TRAVIS_BRANCH}-dev"
matrix:
- TARGET_ARCH=amd64 QEMU_ARCH=x86_64
- TARGET_ARCH=arm32v7 QEMU_ARCH=arm
- TARGET_ARCH=arm64v8 QEMU_ARCH=aarch64

addons:
apt:
# The docker manifest command was added in docker-ee version 18.x
# So update our current installation and we also have to enable the experimental features.
sources:
- sourceline: "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
key_url: "https://download.docker.com/linux/ubuntu/gpg"
packages:
- docker-ce

before_install:
- docker --version
- mkdir $HOME/.docker
- 'echo "{" > $HOME/.docker/config.json'
- 'echo " \"experimental\": \"enabled\"" >> $HOME/.docker/config.json'
- 'echo "}" >> $HOME/.docker/config.json'
- sudo service docker restart

install:
# For cross buidling our images
# This is necessary because travis-ci.org has only x86_64 machines.
# If travis-ci.org gets native arm builds, probably this step is not
# necessary any more.
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
# Bats is necessary for the UT
- curl -o bats.tar.gz -SL https://github.com/bats-core/bats-core/archive/v1.1.0.tar.gz
- mkdir bats-core && tar -xf bats.tar.gz -C bats-core --strip-components=1
- cd bats-core/
- sudo ./install.sh /usr/local
- cd ..

before_script:
# Set baseimage.
- sed -i -e "s/FROM \(.*\)/FROM \1-${TARGET_ARCH}/g" image/Dockerfile;
- cat image/Dockerfile;
# If this is a tag then change the VERSION variable to only have the
# tag name and not also the commit hash.
- if [ -n "$TRAVIS_TAG" ]; then
VERSION=$(echo "${TRAVIS_TAG}" | sed -e 's/\(.*\)[-v]\(.*\)/\1\2/g');
fi
- if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
VERSION="stable";
fi

script:
- make build-nocache NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
# Run the test and if the test fails mark the build as failed.
- make test NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}

before_deploy:
- docker run -d --name test_image ${NAME}:${VERSION}-${TARGET_ARCH} sleep 10
- sleep 5
- sudo docker ps | grep -q test_image
# To have `DOCKER_USER` and `DOCKER_PASS`
# use `travis env set`.
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASS";
- make tag NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}

deploy:
provider: script
on:
all_branches: true
script: make push NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}

jobs:
include:
- stage: Manifest creation
install: skip
script: skip
after_deploy:
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASS";
- docker manifest create ${NAME}:${VERSION} ${NAME}:${VERSION}-amd64 ${NAME}:${VERSION}-arm32v7 ${NAME}:${VERSION}-arm64v8;
docker manifest annotate ${NAME}:${VERSION} ${NAME}:${VERSION}-amd64 --os linux --arch amd64;
docker manifest annotate ${NAME}:${VERSION} ${NAME}:${VERSION}-arm32v7 --os linux --arch arm --variant v7;
docker manifest annotate ${NAME}:${VERSION} ${NAME}:${VERSION}-arm64v8 --os linux --arch arm64 --variant v8;

# The latest tag is coming from the stable branch of the repo
- if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
docker manifest create ${NAME}:latest ${NAME}:${VERSION}-amd64 ${NAME}:${VERSION}-arm32v7 ${NAME}:${VERSION}-arm64v8;
docker manifest annotate ${NAME}:latest ${NAME}:${VERSION}-amd64 --os linux --arch amd64;
docker manifest annotate ${NAME}:latest ${NAME}:${VERSION}-arm32v7 --os linux --arch arm --variant v7;
docker manifest annotate ${NAME}:latest ${NAME}:${VERSION}-arm64v8 --os linux --arch arm64 --variant v8;
fi

- docker manifest push ${NAME}:${VERSION};
if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
docker manifest push ${NAME}:latest;
fi
15 changes: 12 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,27 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project follows roundcube versioning.

## [1.3.10] - 2018-08-29
## [1.4.0] - 2019-11-10
## Added
- Multiarch support

### Changed
- Upgrade roundcube version to 1.4.0

## [1.3.10] - 2019-08-29
### Changed
- Upgrade roundcube version to 1.3.10
- Upgrade baseimage to web-baseimage:1.2.0

## [1.3.9] - 2018-04-05
## [1.3.9] - 2019-04-07
### Changed
- Upgrade roundcube version to 1.3.9
- Upgrade baseimage to web-baseimage:1.1.2

### Fixed
- Cron log with /usr/bin/logger

## [1.3.8] - 2018-11-08
## [1.3.8] - 2019-04-07
### Changed
- Upgrade roundcube version to 1.3.8

Expand Down Expand Up @@ -111,6 +118,8 @@ and this project follows roundcube versioning.
## 0.1.0 - 2015-12-07
Initial release

[1.4.0]: https://github.com/osixia/docker-roundcube/compare/v1.3.10...v1.4.0
[1.3.10]: https://github.com/osixia/docker-roundcube/compare/v1.3.9...v1.3.10
[1.3.9]: https://github.com/osixia/docker-roundcube/compare/v1.3.8...v1.3.9
[1.3.8]: https://github.com/osixia/docker-roundcube/compare/v1.3.7...v1.3.8
[1.3.7]: https://github.com/osixia/docker-roundcube/compare/v1.3.6...v1.3.7
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME = osixia/roundcube
VERSION = 1.3.10
VERSION = 1.4.0

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

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

tag:
docker tag $(NAME):$(VERSION) $(NAME):$(VERSION)

tag-latest:
docker tag $(NAME):$(VERSION) $(NAME):latest

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
![Docker Stars](https://img.shields.io/docker/stars/osixia/roundcube.svg)
![](https://images.microbadger.com/badges/image/osixia/roundcube.svg)

Latest release: 1.3.10 - roundcube 1.3.9 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/roundcube/) 
Latest release: 1.4.0 - roundcube 1.4.0 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/roundcube/) 

**A docker image to run roundcube.**

Expand Down
22 changes: 4 additions & 18 deletions image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
FROM osixia/web-baseimage:1.2.0
FROM osixia/web-baseimage:release-1.2.0-dev

# roundcube version
ARG ROUNDCUBE_VERSION=1.3.10
ARG ROUNDCUBE_SHA256=69fe11550a0f5711020ecd55c6ad36394580800a68d43bb69ecedc91f36ba8bf

# MariaDB version
ARG MARIADB_MAJOR=10.3
ARG ROUNDCUBE_VERSION=1.4.0
ARG ROUNDCUBE_SHA256=6bd2a2ac05d6575c290c784e1267090550c56c92f65b66f0b155832fc860ef2c

# Install apache2 and php7.3-fpm using osixia/baseimage utils
# Caution: /container/tool/install-service-available arguments order is important
# php7.3-fpm install will detect apache2 and configure it

# Add MariaDB repository
RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 \
&& echo "deb http://ftp.igh.cnrs.fr/pub/mariadb/repo/$MARIADB_MAJOR/debian stretch main" > /etc/apt/sources.list.d/mariadb.list \
&& { \
echo 'Package: *'; \
echo 'Pin: release o=MariaDB'; \
echo 'Pin-Priority: 999'; \
} > /etc/apt/preferences.d/mariadb


# Download, check integrity and unzip roundcube to /var/www/roundcube_bootstrap
RUN apt-get update \
&& /container/tool/add-multiple-process-stack \
Expand All @@ -31,7 +17,7 @@ RUN apt-get update \
aspell-fr \
ca-certificates \
curl \
mariadb-client-$MARIADB_MAJOR \
mariadb-client \
php-enchant \
php-gd \
php-intl \
Expand Down

0 comments on commit 42598a3

Please sign in to comment.