diff --git a/.circleci/config.yml b/.circleci/config.yml index 15eb6329f..6ab62379a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,6 +12,7 @@ jobs: environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts CIRCLE_TEST_REPORTS: /tmp/circleci-test-results + CIRCLE_MACHINE_EXECUTOR: true MAVEN_OPTS: -Xmx128m JAVA_VERSION: *jdk_180_version @@ -66,14 +67,20 @@ jobs: docker: - image: spotify/helios-test-container:1 working_directory: ~/spotify/helios - parallelism: 1 + parallelism: 6 shell: /bin/bash --login environment: + CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results MAVEN_OPTS: -Xmx128m steps: - checkout + - setup_remote_docker + + - run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS + - run: ./circle.sh pre_machine - run: @@ -83,7 +90,26 @@ jobs: # Without this increased timeout, downloading deps often times out. no_output_timeout: 20m - - run: ./circle.sh verify_no_tests + - run: + command: ./circle.sh test + no_output_timeout: 20m + + - run: if [ "$CIRCLE_NODE_INDEX" == "0" ]; then ./circle.sh post_test; fi + + - run: ./circle.sh collect_test_reports + + - store_test_results: + path: /tmp/circleci-test-results + + # Save artifacts + - store_artifacts: + path: /tmp/circleci-artifacts + - store_artifacts: + path: artifacts + - store_artifacts: + path: /var/log/upstart/docker.log + - store_artifacts: + path: /tmp/circleci-test-results workflows: version: 2 diff --git a/circle.sh b/circle.sh index 19b77de10..4942186ab 100755 --- a/circle.sh +++ b/circle.sh @@ -33,10 +33,12 @@ case "$1" in ;; test) - # fix DOCKER_HOST to be accessible from within containers - docker0_ip=$(/sbin/ifconfig docker0 | grep 'inet addr' | \ - awk -F: '{print $2}' | awk '{print $1}') - export DOCKER_HOST="tcp://$docker0_ip:2375" + if [ -n "$CIRCLE_MACHINE_EXECUTOR" ]; then + # fix DOCKER_HOST to be accessible from within containers + docker0_ip=$(/sbin/ifconfig docker0 | grep 'inet addr' | \ + awk -F: '{print $2}' | awk '{print $1}') + export DOCKER_HOST="tcp://$docker0_ip:2375" + fi case $CIRCLE_NODE_INDEX in 0)