Plug and play continuous integration with Django and Jenkins
$ pip install django-jenkins
Or by downloading the source and running:
$ python setup.py install
Or, for the latest git version:
$ pip install git+git://github.com/kmmbvnr/django-jenkins.git
Add 'django_jenkins' to your INSTALLED_APPS list. Configure Jenkins to run the following command:
$ ./manage.py jenkins
This will create reports/ directory with junit xml, Coverage and Pylint reports.
For more details see the generic tutorial: https://sites.google.com/site/kmmbvnr/home/django-jenkins-tutorial or tutorial for running django-jenkins on ShiningPanda CI https://docs.shiningpanda.com/tutorials/multi-databases/project.html
if presents, it is supposed to be a list/tuple of django apps for Jenkins to run. Tests, reports and coverage are generated only for the apps from this list. You should specify --all option to ignore this settings.
List of Jenkins tasks executed by ./manage.py jenkins command.
JENKINS_TASKS = ( 'django_jenkins.tasks.run_pylint', 'django_jenkins.tasks.with_coverage', 'django_jenkins.tasks.django_tests', )
The name of the class to use for starting the test suite for jenkins and jtest commands. Class should be inherited from django_jenkins.runner.CITestSuiteRunner
Here is the list of tasks prebuild with django-jenkins
Runs Pylint over selected Django apps.
Produces XML coverage report for Jenkins
Discovers standard Django test suite from test.py files
Runs jslint tools over <app>/static/*/*.js files. Creates Pylint compatible report for Jenkins
Runs CSS lint tools over app/static/*/*.css files. Creates CSS Lint compatible report for Jenkins
Runs pep8 tool over selected Django apps. Creates Pylint compatible report for Jenkins
You should have pep8 python package installed to run this tasks
Runs Pyflakes tool over selected Django apps. Creates Pylint compatible report for Jenkins.
You should have Pyflakes python package installed to run this tasks
Runs SLOCCount tool over selected Django apps. Creates sloccount plugin compatible report for Jenkins.
You should have the SLOCCount program installed to run this task
Discover Lettuce tests from app/feature directories.
You should have the Lettuce Python package installed to run this task
Replacement for djcelery.tests.runners.CeleryTestSuiteRunner Change settings for run Celery tasks locally.
- Added Celery task
- Add nodejs support for jslint and csslint tasks
- Improve js and css files selection
- Bug fixes
- Django 1.3 in requirements
- Windmill support was removed (Django 1.4 has a better implementation)
- Ignore South migrations by default
- Added SLOCCount task
- Added Lettuce testing task
- Added CSS Lint task
- Used xml output format for jslint
- Used native pep8 output format
- Do not produce file reports for jtest command by default
- Ignore Django apps without models.py file, as in Django test command
- Fix jslint_runner.js packaging
- Fix coverage file filtering
- Support pep8, Pyflakes, jslint tools
- Added jtest command
- Allow specify custom test runner
- Various fixes, thnk githubbers :)
- Pluggable ci tasks refactoring
- Alpha support for windmill tests
- Partial python 2.4 compatibility
- Renamed to django-jenkins
- Python 2.5 compatibility
- Make compatible with latest Pylint only
- Initial public release
Mikhail Podgurskiy <firstname.lastname@example.org>
Special thanks, for all github forks authors.
XML Reporting Code from unittest-xml-reporting project: