Skip to main content

Plug and play continuous integration with django and jenkins

Project description

This is a fork of https://github.com/kmmbvnr/django-jenkins, which appears to be dead, to enable support for Django 4.

Plug and play continuous integration with Django and Jenkins

https://img.shields.io/pypi/v/django-jenkins.svg https://requires.io/github/kmmbvnr/django-jenkins/requirements.png?branch=master https://badges.gitter.im/Join%20Chat.svg

Installation

From PyPI:

$ pip install django4-jenkins

Or by downloading the source and running:

$ python setup.py install

Latest git version:

$ pip install -e git+git://github.com/favetfortibus/django4-jenkins.git#egg=django4-jenkins
$ pip install coverage

Installation for Python 3:

Works out of the box

Usage

Add 'django_jenkins' to your INSTALLED_APPS list. Configure Jenkins to run the following command:

$ ./manage.py jenkins --enable-coverage

This will create reports/ directory with junit xml, Coverage and Pylint reports.

Settings

  • PROJECT_APPS

    If present, 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.

  • JENKINS_TASKS

    List of Jenkins reporters executed by ./manage.py jenkins command.

    Default value:

    JENKINS_TASKS = ()
  • JENKINS_TEST_RUNNER

    The name of the class to use for starting the test suite for jenkins command. Class should be inherited from django_jenkins.runner.CITestSuiteRunner

Reporters

Here is the reporters prebuild with django4-jenkins

  • django_jenkins.tasks.run_pylint

    Runs Pylint over selected Django apps.

    Task-specific settings: PYLINT_RCFILE

  • django_jenkins.tasks.run_pep8

    Runs pep8 tool over selected Django apps. Creates Pylint compatible report for Jenkins

    You should have pep8 python package (>=1.3) installed to run this task.

    Task-specific settings: PEP8_RCFILE

  • django_jenkins.tasks.run_pyflakes

    Runs Pyflakes tool over selected Django apps. Creates Pylint compatible report for Jenkins.

    You should have Pyflakes python package installed to run this task.

  • django_jenkins.tasks.run_flake8

    Runs flake8 tool over selected Django apps. Creates pep8 compatible report for Jenkins.

    You should have flake8 python package installed to run this task.

Changelog

GIT Version

  • csslint/jshint/sccsLint/sloccount task removed (could be used as standalone tools)

Contribution guide

  • Set up local jenkins

  • Set up django4-jenkins:

    npm install jshint
    npm install csslint
    PATH=$PATH:$WORKSPACE/node_modules/.bin
    tox
  • Ensure that everything works

  • Modify the the only one thing

  • Ensure that everything works again

  • Fix pep8/pyflakes errors and minimize pylint’s warnings

  • Pull request!

Authors

Created and maintained by Mikhail Podgurskiy <kmmbvnr@gmail.com>

Contributors: https://github.com/kmmbvnr/django-jenkins/graphs/contributors

Special thanks, for all github forks authors for project extensions ideas and problem identifications.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django4_jenkins-1.0.0.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

django4_jenkins-1.0.0-py2.py3-none-any.whl (17.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django4_jenkins-1.0.0.tar.gz.

File metadata

  • Download URL: django4_jenkins-1.0.0.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for django4_jenkins-1.0.0.tar.gz
Algorithm Hash digest
SHA256 32b0022b60ea0ee8247d5b6369e5983d86d9c87e1f89fdf9235d529f4ea5adbd
MD5 73707266cd715a099a9ac1f896c52ba6
BLAKE2b-256 c95cd456024fca553cb1895f7ea0094ad703562bec25227c759770675447edcc

See more details on using hashes here.

File details

Details for the file django4_jenkins-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django4_jenkins-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ad2a528aae282718d1c283fdf59e6e0ec63ac0cdefee891e741313e08f9fa61e
MD5 9a0f2107edb2d95150ffc61f96730beb
BLAKE2b-256 4105356877c1e3caedad2c84f371a21ba66a37eff65f36546131b29a4cfcaba4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page