-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
49 lines (45 loc) · 2.51 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# (c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017
---
sudo: required
env:
global:
- GITHUB_API_USER=domq
# This is the GitHub API token, encrypted (so that it can be
# safely stored on GitHub) with a public key whose corresponding
# private key is owned by Travis. To regenerate it:
#
# 1. Create a token as per
# https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line
# You don't need or want to grant any additional permissions
# (checkboxes in the Web UI) to this token
# 2. `cd` to the wp-ops Git work tree, type `travis login` and
# authenticate using your GitHub credentials
# 3. Type
#
# travis encrypt GITHUB_API_TOKEN=aaaaabbbbbbcccccc
#
# replacing `aaaaabbbbbbcccccc` with the token you obtained at step 1
- secure: "Vndqf9r+i4gKfEdvpvUqwVCYqz/FTAAt4yR7C7c41LkcHbu86ZUif/UrMtlb/HI6M/9W5mOH9VceWP6y3PblOf9TnAeBcXNrrNW1nvrkTCWYquixnwXQWiSMoQUQ6H6vgmiCd2+gcTTnuQy37Q+JmQNi3beVL1KSvOczrBiW56usgmqimhIzHhBjscjiZklnTpFonvgCWSPOqpo6ecdqL7orl33p0Pvg6xVIkfRq897wdLST+nj/dUxtB7+LnoYdlTDSN725m31EDq/gqeU6CAax+emorFTzFhIjYnEo/KTtaqrMuEqq/DNWvK3WYbf92UCz7cchO5TWV3eiJbPASwWDdnzyqoJi757dEwFUTQrZtzJJsp+SrE9J/PlNfurnKKicuNwp7y5WUVfcoMpN2nJKKTWRbd/pXqI6itkvm1FfSPPDQzqqfE7fEnboa5VUWLo2MMI/ktjzXtPcpV7F7j9lHQyQK5qhdhFzWXAam7tnVYcYND2VVoENXEl7UwXATWow9vY8wG/AnZOGEdnx/3efmk2fFMZOsRdyDMY0FqMuPqyhKuTqXDYj+lCFqYpADoMDA42msz+YuLOHzJekyAHoRzZi+9giUWjMbgM/wmbCAPxDGcmOjyzlJtbnyVUpTl81wdoeejAyO+qsvuJFVzCbZ0bpJ+xPTe6GpYKO6go="
services:
- docker
script:
# Build wp-base first (because other images depend on it)
- |
set -e -x
wp_base_branch_build_arg=
mgmt_build_args=
if [ -n "$TRAVIS_BRANCH" ]; then
wp_base_branch_build_arg="--manifest-url=https://raw.githubusercontent.com/epfl-si/wp-ops/$TRAVIS_BRANCH/ansible/roles/wordpress-instance/tasks/plugins.yml"
mgmt_build_args="--build-arg WP_OPS_BRANCH=$TRAVIS_BRANCH"
fi
docker build \
--build-arg "GITHUB_API_USER=${GITHUB_API_USER}" \
--build-arg "GITHUB_API_TOKEN=${GITHUB_API_TOKEN}" \
--build-arg "INSTALL_AUTO_FLAGS=$wp_base_branch_build_arg" \
-t docker-registry.default.svc:5000/wwp-test/wp-base docker/wp-base
docker build $mgmt_build_args \
-t docker-registry.default.svc:5000/wwp-test/mgmt docker/mgmt
for docker_dir in $(find docker -mindepth 1 -maxdepth 1 -type d \
| grep -v wp-base | grep -v mgmt | xargs -t -n 1); do
docker build "$docker_dir"
done