machine: pre: - curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0 services: - docker environment: LOG_LEVEL: DEBUG CI: true DEFAULT_TIMEOUT: 20 ruby: version: 2.3.1 dependencies: pre: - docker -v - docker pull ches/kafka:0.9.0.1 - docker pull jplock/zookeeper:3.4.6 - gem install bundler -v 1.9.5 - bundle install test: override: - docker run -d -p 2003:2181 --name zookeeper jplock/zookeeper:3.4.6; sleep 5 - docker run -d -p 9092:9092 --name kafka -e KAFKA_BROKER_ID=0 -e KAFKA_ADVERTISED_HOST_NAME=localhost -e KAFKA_ADVERTISED_PORT=9092 -e ZOOKEEPER_CONNECTION_STRING=zookeeper:2181 --link zookeeper:zookeeper ches/kafka:0.9.0.1; sleep 5 - bundle exec rspec -r rspec_junit_formatter --format RspecJunitFormatter -o $CIRCLE_TEST_REPORTS/rspec/unit.xml post: - cp log/*.log $CIRCLE_ARTIFACTS/ || true