Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (36 sloc) 1.16 KB
layout title excerpt category
post
Jenkins and Django
Setting up Jenkins with a Django project.
blog
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 - {% highlight bash %} export DATABASE_URL="sqlite:////tmp/db.sqlite" virtualenv venv venv/bin/pip install -r requirements.txt venv/bin/python manage.py jenkins core reports {% endhighlight %}

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/