Teamcity rake test and docker

I have successfully been running test on teamcity using the rake runner build step. However, our workflow is changing, and I would like to start to run my rake tests inside a docker container. This has a huge benefit for CI because of dependency management and my tests are running in the same environment as my production code. The one issue I seem to be having is teamcity is no longer capturing my test. I assume this is because I can't use the rake running when I am running the tests in docker I have to do something like this from a CLI runner:

docker run myimage:test bundle exec rake test

The output shows up in the build log and the build step will fail if a test fails in docker. However, I no longer have the test tab and details about the test. Is there a way to have teamcity capture the stdout from the docker run and treat it like the rake runner?

Sorry for the slightly off-topic post, but I was not sure where else this fit.

1 comment
Comment actions Permalink

I found a solution by creating junit reports and copying them out of the container into teamcity.


Please sign in to leave a comment.