-
Notifications
You must be signed in to change notification settings - Fork 11
/
circle.yml
37 lines (33 loc) · 1.45 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
27
28
29
30
31
32
33
34
35
36
37
machine:
services:
- docker
hosts:
test.loc: 127.0.0.1
dependencies:
pre:
- docker pull million12/mariadb:
background: true
override:
# Build abstract million12/typo3-flow-neos-abstract image
- docker build --tag=docker-neos-alpine-test .
post:
# Launch DB backend
- docker run -d --name=db --env="MARIADB_PASS=pass" million12/mariadb
- docker logs -f db | tee -a ${CIRCLE_ARTIFACTS}/db.log:
background: true
# Run tests
test:
override:
# ##################################################
# Default setup
# ##################################################
# Launch it
- docker run -d --name=web -p=8000:80 --link=db:db --env="REPOSITORY_URL=https://github.com/neos/neos-development-distribution" --env="VERSION=3.3" --env="DEVLOPMENT=true" --env="SITE_PACKAGE=Neos.Demo" docker-neos-alpine-test
# Wait till container is fully configured
- while true; do if docker logs web 2>&1 | grep "ready to handle connections"; then break; else echo "Waiting for web container to finish provisioning..." && sleep 10; fi done
# Test: do basic front-end tests
- curl -L --head http://test.loc:8000 && curl -s -L http://test.loc:8000
- curl -s -L --head http://test.loc:8000 | grep "HTTP/1.1 200 OK" && curl -s -L --head http://test.loc:8000 | grep "X-Flow-Powered"
- curl -s -L http://test.loc:8000 | grep "This website is powered by Neos"
# Clean up
- docker rm -f web || true