This system moves CircleCI junit artifacts into S3. They could be retrieved by anything, including an awesome JUnit visualizer.
CircleCI will produce JUnit artifacts using certain gems to format the output.
- minitest: https://github.com/circleci/minitest-ci (simple drop-in gem, no configuring)
- rspec: https://github.com/sj26/rspec_junit_formatter
bundle exec rspec --color --format progress --format RspecJunitFormatter --out $CIRCLE_TEST_REPORTS/test_results.xml
These environment variables are required:
- AWS_REGION (where the bucket is you want to write to)
Learn more about AWS environment variables
With CircleCi 2.0, you need to explicitly save the test artifacts. In your config.yml, include the following:
- store_artifacts: path: /<path to project>/test/reports destination: circle-junit
circle-junit destination ensures that circle dropper only tries to read/upload junit.xml files.
Optional environment variables:
- BRANCHES - specify a csv of branches and we will pull only those. For example if you want to collect data only for master, set BRANCHES=master
- SECRET_KEY_BASE (only required in production)
A docker image of this project is available at https://hub.docker.com/r/avvo/circle_dropper/
To set up fully in docker, deploy that container twice, and link one to the other. Set the second linked container's deploy command to bin/sidekiq. Then link a redis container (probably redis:3.0-alpine) to BOTH circle_dropper containers. Then set the above required environment variables on the two circle_dropper containers.
This system uses sidekiq and redis.