Agile view for Jenkins

Preparation

Search and install the “Radiator View” plugin.

radiator plugin jenkins
Select Radiator View Plugin

Configuration

After installation create a new view, similar to configuring the more conventional list views.

radiator view jenkins
Select Radiator view

Now select all desired jobs and press “Save” button.

radiator agil view
Agile view

The build radiator view displays a box for each build with the job name and some other details, depending on build steps and test methods.

Backup and restore Jenkins

Preparation

Create a new folder with read/write permission for Jenkins.

Example

# create directory
$ mkdir backup_jenkins

# change user
$ chown jenkins:jenkins backup_jenkins/

Now install the Jenkins Plugin “ThinBackup”.

thinbackup plugin for jenkins

Backup configuration

After installation and restart, you can start with backup configuration “Manage Jenkins > ThinBackup > Settings”. For Backup directory insert the path for directory that you created. Complete the configuration by your needs and press “Save” button.

thinbackup settings

Backup

Now you could wait for 1st automated backup or press the “Backup Now” button “Manage Jenkins > ThinBackup”.

Restore

For restore simply select Restore “Manage Jenkins > ThinBackup”. Select backup from list and press “Restore” button.

RATS

RATS – Rough Auditing Tool for Security. Open-Source software to scan C, C++, Perl, PHP and Python code. For other languages see Fortify.

Installation

# CentOS
$ yum install rats

# Debian
$ aptitude install rats

# wget
$ wget http://www.fortify.com/servlet/download/public/rats-2.3.tar.gz 

# curl
$ curl --remote-name http://www.fortify.com/servlet/download/public/rats-2.3.tar.gz

# extract
$ tar xfz rats-2.3.tar.gz

# change directory
$ cd rats-2.3

# compile
$ ./configure && make && sudo make install

Execute RATS

# Simple run
$ rats --resultsonly <directory>

# Advanced run
$ rats --quiet --xml -w 3 <directory>

Simple python job on Jenkins

In this tutorial i show, how you as a tester can create a very basic python code analysis and documentation job in your build server.

Preparation

Install needed python modules

$ pip install pylint
$ pip install pep8
$ pip install epydoc

Install needed Jenkins plugins

  • HTML Publisher Plugin
  • Violations

Create a Free Style job

Create a new job with your requirements (e.g. Project name, Source-Code Management, etc.). Now insert commands “Build > Execute Shell”.

pep8 ${WORKSPACE}/<module|file> > pep8_report.txt

echo "pep8 complete"

pylint -f parseable ${WORKSPACE}/<module|file> | tee pylint_report.txt

echo "pylint complete"

[ -d ${WORKSPACE}/API ] && rm -fr ${WORKSPACE}/API

epydoc ${WORKSPACE}/<module|file> --html --name 'My Project API' -o ${WORKSPACE}/API/

echo "epydoc complete"

Add the Post-Build-Action – Report Violations and Publish HTML reports. On violations insert the pep8 (pep8_report.txt) and pylint (pylint_report.txt) values. On Publish HTML reports add the folder API.

After running the build, the screen should look like this:

Jenkins Python Report