forked from Accenture/adop-docker-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
27 lines (23 loc) · 993 Bytes
/
.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
language: bash
sudo: required
services:
- docker
env:
global:
- DOCKER_COMPOSE_VERSION=1.6.0
- INITIAL_ADMIN_USER=admin.user
- COMPOSE_FILES="-f site/docker-compose.yml"
- JEKYLL_SOURCE="/site"
before_install:
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
script:
- ./adop compose init
- ./adop compose down
- docker-compose ${COMPOSE_FILES} build
- docker-compose ${COMPOSE_FILES} -p adopdockercompose up -d
- count=0; until docker logs adopdockercompose_site_1 | grep "Server running..." &> /dev/null || (( count++ > 12 )); do echo "Waiting $count"; sleep 5; done
- docker logs adopdockercompose_site_1
- docker logs adopdockercompose_site_1 | grep "Server running..." &> /dev/null
- curl -sL -w "%{http_code}\\n" "http://localhost/adop-docker-compose/" -o /dev/null | grep "200" &> /dev/null