Skip to content

Commit c6161fe

Browse files
committed
Merge branch 'release-1.3.0' into stable
2 parents 920bf99 + f0da157 commit c6161fe

File tree

5 files changed

+141
-27
lines changed

5 files changed

+141
-27
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/openldap-backup"
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,13 @@ 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 [osixia/openldap](https://github.com/osixia/docker-openldap-backup) versioning.
66

7+
## [1.3.0] - 2019-09-29
8+
## Added
9+
- Multiarch support
10+
11+
### Changed
12+
- Upgrade baseimage to openldap:1.3.0
13+
714
## [1.2.5] - 2019-08-16
815
### Changed
916
- Upgrade baseimage to openldap:1.2.5
@@ -110,6 +117,8 @@ and this project follows [osixia/openldap](https://github.com/osixia/docker-open
110117
## 0.1.0 - 2015-07-24
111118
Initial release
112119

120+
[1.3.0]: https://github.com/osixia/docker-openldap-backup/compare/v1.2.5...v1.3.0
121+
[1.2.5]: https://github.com/osixia/docker-openldap-backup/compare/v1.2.4...v1.2.5
113122
[1.2.4]: https://github.com/osixia/docker-openldap-backup/compare/v1.2.3...v1.2.4
114123
[1.2.3]: https://github.com/osixia/docker-openldap-backup/compare/v1.2.2...v1.2.3
115124
[1.2.2]: https://github.com/osixia/docker-openldap-backup/compare/v1.2.1...v1.2.2

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME = osixia/openldap-backup
2-
VERSION = 1.2.5
2+
VERSION = 1.3.0
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: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,28 @@
66

77
[hub]: https://hub.docker.com/r/osixia/openldap-backup/
88

9-
Latest release: 1.2.5 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/openldap-backup/) 
9+
Latest release: 1.3.0 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/openldap-backup/) 
1010

1111
**A docker image to run OpenLDAP, and make periodic backups.**
1212

13-
- [Contributing](#contributing)
14-
- [Quick start](#quick-start)
15-
- [Backup directory and data persistence](#backup-directory-and-data-persistence)
16-
- [Debug](#debug)
17-
- [Environment Variables](#environment-variables)
18-
- [Set your own environment variables](#set-your-own environment-variables)
19-
- [Use command line argument](#use-command-line-argument)
20-
- [Link environment file](#link-environment-file)
21-
- [Make your own image or extend this image](#make-your-own image-or-extend-this-image)
22-
- [Advanced User Guide](#advanced-user-guide)
23-
- [Extend osixia/openldap-backup:1.2.5 image](#extend-osixiaopenldap-backup125-image)
24-
- [Make your own phpLDAPadmin image](#make-your-own-phpldapadmin-image)
25-
- [Tests](#tests)
26-
- [Kubernetes](#kubernetes)
27-
- [Under the hood: osixia/openldap](#under-the-hood-osixiaopenldap)
28-
- [Security](#security)
29-
- [Changelog](#changelog)
13+
- [osixia/openldap-backup](#osixiaopenldap-backup)
14+
- [Contributing](#contributing)
15+
- [Quick start](#quick-start)
16+
- [Backup directory and data persistence](#backup-directory-and-data-persistence)
17+
- [Debug](#debug)
18+
- [Environment Variables](#environment-variables)
19+
- [Set your own environment variables](#set-your-own-environment-variables)
20+
- [Use command line argument](#use-command-line-argument)
21+
- [Link environment file](#link-environment-file)
22+
- [Make your own image or extend this image](#make-your-own-image-or-extend-this-image)
23+
- [Advanced User Guide](#advanced-user-guide)
24+
- [Extend osixia/openldap-backup:1.3.0 image](#extend-osixiaopenldap-backup130-image)
25+
- [Make your own openldap-backup image](#make-your-own-openldap-backup-image)
26+
- [Tests](#tests)
27+
- [Kubernetes](#kubernetes)
28+
- [Under the hood: osixia/openldap](#under-the-hood-osixiaopenldap)
29+
- [Security](#security)
30+
- [Changelog](#changelog)
3031

3132
## Contributing
3233

@@ -49,7 +50,7 @@ Backups are created in the directory `/data/backup` that should be mapped has vo
4950

5051
docker run --env LDAP_BACKUP_CONFIG_CRON_EXP="0 5 * * *" \
5152
--volume /data/openldap/backup:/data/backup \
52-
--detach osixia/openldap-backup:1.2.5
53+
--detach osixia/openldap-backup:1.3.0
5354

5455

5556
For more information about docker data volume, please refer to :
@@ -63,11 +64,11 @@ Available levels are: `none`, `error`, `warning`, `info`, `debug` and `trace`.
6364

6465
Example command to run the container in `debug` mode:
6566

66-
docker run --detach osixia/openldap-backup:1.2.5 --loglevel debug
67+
docker run --detach osixia/openldap-backup:1.3.0 --loglevel debug
6768

6869
See all command line options:
6970

70-
docker run osixia/openldap-backup:1.2.5 --help
71+
docker run osixia/openldap-backup:1.3.0 --help
7172

7273

7374
## Environment Variables
@@ -89,15 +90,15 @@ See how to [set your own environment variables](#set-your-own-environment-variab
8990
Environment variables can be set by adding the --env argument in the command line, for example:
9091

9192
docker run --env LDAP_BACKUP_CONFIG_CRON_EXP="0 5 * * *" \
92-
--detach osixia/openldap-backup:1.2.5
93+
--detach osixia/openldap-backup:1.3.0
9394

9495

9596
#### Link environment file
9697

9798
For example if your environment file is in : /data/ldap/environment/my-env.yaml
9899

99100
docker run --volume /data/ldap/environment/my-env.yaml:/container/environment/01-custom/env.yaml \
100-
--detach osixia/openldap-backup:1.2.5
101+
--detach osixia/openldap-backup:1.3.0
101102

102103
Take care to link your environment file to `/container/environment/XX-somedir` (with XX < 99 so they will be processed before default environment files) and not directly to `/container/environment` because this directory contains predefined baseimage environment files to fix container environment (INITRD, LANG, LANGUAGE and LC_CTYPE).
103104

@@ -107,13 +108,13 @@ This is the best solution if you have a private registry. Please refer to the [A
107108

108109
## Advanced User Guide
109110

110-
### Extend osixia/openldap-backup:1.2.5 image
111+
### Extend osixia/openldap-backup:1.3.0 image
111112

112113
If you need to add your custom environment files you can extends this image.
113114

114115
Dockerfile example:
115116

116-
FROM osixia/openldap-backup:1.2.5
117+
FROM osixia/openldap-backup:1.3.0
117118
MAINTAINER Your Name <[email protected]>
118119

119120
ADD environment /container/environment/01-custom

image/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM osixia/openldap:1.2.5
1+
FROM osixia/openldap:1.3.0
22

33
# Install cron from baseimage and remove .cfss and slapd services inherited from openldap image
44
# remove also previous default environment files, they are not needed.

0 commit comments

Comments
 (0)