Eric Helgeson

Eric Helgeson

About Blog Email GitHub RSS

10 Jan 2013
Jenkins and Django

In Progress

I am working on a side project using Django and want to have testing and builds right away. We all know the virtues of CI.

I’m writing this because the information I found was scattered about, wanted to update and put it all into one spot. See references below.

Requirements

  • Jenkins
  • Jenkins Plugins
  • Cobertura
  • Github
  • virtualenv and pip
  • django-jenkins
  • git

Jenkins job config -

export DATABASE\_URL="sqlite:////tmp/db.sqlite"
virtualenv venv
venv/bin/pip install -r requirements.txt
venv/bin/python manage.py jenkins core reports

Publish config -

  • coberturaReportFile = reports/coverage.xml

Junit Results -

  • reports/TEST-*.xml, reports/junit.xml

Ref

http://toastdriven.com/blog/2011/apr/10/guide-to-testing-in-django/

http://technomilk.wordpress.com/2011/09/03/publishing-django-test-coverage-reports-in-jenkins/


Want to contribute to this article? Edit this post on Github!

About Blog Email GitHub RSS