I’ve set up TeamCity on a Linux (Ubuntu) box and would like to use it for some of Python/Django projects.
The problem is that I don’t really see what to do next – I tried searching for a Python specific build agent for TeamCity but without much of the success.
How can I manage that?
Ok, so there’s how to get it working with proper TeamCity integration:
Presuming you have TeamCity installed with at least 1 build agent available
1) Configure your build agent to execute
2) Download and install this plugin for TC http://pypi.python.org/pypi/teamcity-messages
3) You’ll have to provide your custom test runner for plugin in (2) to work. It can be straight copy of run_tests from django.test.simple, with only one slight modification: replace line where test runner is called with TeamcityTestRunner, so insted of
use this:
You’ll have to place that function into a file in your solution, and specify a custome test runner, using Django’s TEST_RUNNER configuration property like this:
Make sure you reference all required imports in your file_name_with_run_tests
You can test it by running
from command line and noticing that output has changed and now messages like
appearing in it.