JenkinsPy workshop

13
WORKSHOP Jenkins Py Jenkins Py

Transcript of JenkinsPy workshop

WORKSHOP

Jenkins PyJenkins Py

Haifa Ftirich IF4

CLLFST member

Gnu/linuxand

Python fan

CI:CI:Continuous IntegrationContinuous Integration

JenkinsJenkins

Not any application ;)

Geek Choice Award 2014

Bossie Awards 2014: The best open source

application development tools

DevOps & SCM, SDTimes 100, 2014

O'Reilly Open-Source Award, 2011

You need some tests. Yo!You need some tests. Yo!

Testing PyTesting Py

Different tools for python code testing● Pytest● Nose● Tox● Unittest2● Mock

● wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -

● sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'

● sudo apt-get update● sudo apt-get install jenkins

Installing Jenkins

Cloning project

● apt-get install python2.7 git python-pip● git init● git clone

https://github.com/HRF92/myflask

/opt/foobar

Installing requirements for jenkins

● cd /opt/foobar/● pip install -r requirements/dev.txt

● py.test -v ● py.test --junitxml junit.xml● py.test --cov=foobar --cov-report=xml● pyflakes foobar > pyflakes.log || true● pep8 --max-line-length=100 foobar > pep8.log

|| true

Useful commands

Thanks

and

Jenkins everything !!!