Multiple Suites/Parallelized usage "A test report for commit X already exists"
I am trying to set up coverage aggregation for a parallelized build, per this documentation
Before your tests: cc-test-reporter before-build After your final tests have run: cc-test-reporter after-build --exit-code $?
and then in the "Parallel Test Coverage" section it states
In addition to the pre-test and post-test commands above, to use Code Climate with parallel reporting you will need to add another command at the end of your test commands, in each parallel pipeline that you run tests in - as well as a new command at the end of your build.
I currently have the pre/post commands running, and am seeing that when I call after-build only one of my pipelines upload successfully, the rest fail with...
Error: response from https://api.codeclimate.com/v1/test_reports. HTTP 409: A test report for commit X already exists
My current thinking is that the reporter accepts only the first after-build, even though the documentation suggests it, should we not be calling the pre/post commands if we're parallelized and aggregating/uploading as a final step?
Maybe just remove the after-build call from each pipeline?
That seemed to work, might want to clarify in the docs that you don't want to run after-build in each pipeline individually.
@jondavidjohn You are exactly right. I'll update those docs to be a little more clear about this. Thanks for the feedback, and let us know if you run into any other issues with this.
Thanks that will help