This repository has been archived by the owner on May 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
72 lines (67 loc) · 2.54 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
sudo: required
language: python
services:
- docker
matrix:
include:
- before_script:
- |
curl -L https://bootstrap.saltstack.com | sudo sh -s -- -g https://github.com/LukeCarrier/salt.git -X git add-docker-slsbuild-extrafilerefs
sudo apt install python-pip
sudo salt-call --local pip.uninstall docker-py
sudo salt-call --local pip.install docker
- echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
- docker build _docker/ubuntu-python -t ubiquitous/ubuntu-python:16.04
- |
sudo _docker/service/build -c ubiquitous/moodle-build \
-m admin -m moodle-componentmgr -m nvm
- |
sudo _docker/service/build -c ubiquitous/moodle-web \
-m admin -m web-moodle \
-f salt://web-base/macros.sls
- |
sudo _docker/service/build -c ubiquitous/moodle-web-debug \
-m admin -m web-moodle -m web-moodle-debug \
-f salt://web-base/macros.sls
- |
sudo _docker/service/build -c ubiquitous/moodle-app \
-m admin -m app-moodle \
-f salt://php/macros.sls
- |
sudo _docker/service/build -c ubiquitous/moodle-app-debug \
-m admin -m app-moodle -m app-moodle-debug \
-f salt://php/macros.sls
- |
sudo _docker/service/build -c ubiquitous/db-pgsql \
-m admin -m db-pgsql
- |
sudo _docker/service/build -c ubiquitous/selenium-hub \
-m admin -m selenium-hub
- |
sudo _docker/service/build -c ubiquitous/selenium-node-chrome \
-m admin -m selenium-node-chrome
- |
sudo _docker/service/build -c ubiquitous/selenium-node-firefox \
-m admin -m selenium-node-firefox
script:
- /bin/true
after_success:
- |
if [ "$TRAVIS_BRANCH" == 'better-containers' ]; then
containers=(
ubiquitous/ubuntu-python:16.04
ubiquitous/moodle-build
ubiquitous/moodle-web
ubiquitous/moodle-web-debug
ubiquitous/moodle-app
ubiquitous/moodle-app-debug
ubiquitous/db-pgsql
ubiquitous/selenium-hub
ubiquitous/selenium-node-chrome
ubiquitous/selenium-node-firefox
)
docker login -u="$DOCKER_USERNAME" --password-stdin <<<"$DOCKER_PASSWORD"
for container in "${containers[@]}"; do
docker push "$container"
done
fi