jolicode/JoliCi — pull request #38 by joelwurtz (2014-11-19 15:45:38+00:00)
Title: Add service support to use mysql, mongo, es, ...

Add service management for tests :

Service config part of travis.yml is now correctly handled, for exemple you can have elasticsearch service launch before you test by adding this to your travis.yml file:

```
services:
- elasticsearch
```

A elasticsearch service will be launch before each build and available, for the moment host of the service is set in environment variable of this format (docker link format):

[SERVICE]_PORT_[SERVICE PORT]_TCP_ADDR

In travis all services are on localhost, it's up to the user to use the correct url.

One way to do that can be to use this script before test:
```
if [ -z "$ELASTICSEARCH_PORT_9200_TCP_ADDR" ]; then ELASTICSEARCH_HOST=localhost; else ELASTICSEARCH_HOST=$ELASTICSEARCH_PORT_9200_TCP_ADDR; fi; my_test_command
```

And then ELASTICSEARCH_HOST will be correclty set if under travis or jolici