Month: December 2014

Python and Jenkins integration

Lately we started using Jenkins at work. With proper configuration for PHP it allow us to perform predefined list of tasks in response to merge requests. Tasks consist of performing tests, code coverage, PMD analyse, search for duplicate code, find CRAP code and detect massive amount of violations – from code format to function complexity. Of course nice report and charts are generated after. Its possible to browse reports, go into files and see what is wrong with them all with comments. Very, very useful. So why not use it with our Python app ? I searched The Web and found lots of information but mostly outdated. Not a nice beginning. After some research and test I managed to run nosetests with coverage report, pylint, pyflakes, SLOCCount and clonedigger. Something to start with 🙂 So lets try and create our own Jenkins Server. We will install Jenkins (on VirtualBox in my case), required plugins and additional software. Next we will create new project and link it with git repository (with Bitbucket in my case but any will do). Finally we will add all those tasks and reports. (more…)