-
Notifications
You must be signed in to change notification settings - Fork 15
/
circle.yml
26 lines (24 loc) · 1.03 KB
/
circle.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
machine:
services:
- docker
environment:
DB_USER: db-user
DB_PASS: db-password
dependencies:
pre:
- docker pull million12/mariadb
post:
# Launch DB backend
- docker run -d --name=db --env="MARIADB_USER=$DB_USER" --env="MARIADB_PASS=$DB_PASS" million12/mariadb
- docker logs -f db | tee -a ${CIRCLE_ARTIFACTS}/db.log:
background: true
- docker build -t polinux/cacti .
test:
override:
- while true; do if grep "You can now connect to this MariaDB Server" -a ${CIRCLE_ARTIFACTS}/db.log; then break; else sleep 1; fi done
- docker run -d --name cacti --link db:cacti.db -p 80:80 --env="DB_ADDRESS=cacti.db" --env="DB_USER=$DB_USER" --env="DB_PASS=$DB_PASS" polinux/cacti
- docker logs -f cacti | tee -a ${CIRCLE_ARTIFACTS}/cacti.log:
background: true
- while true; do if grep "Cacti Server UP" -a ${CIRCLE_ARTIFACTS}/cacti.log; then break; else sleep 1; fi done
# Check Cacti Web interface status
- curl -s -L --head http://127.0.0.1/ | grep "HTTP/1.1 200 OK"