integração contínua com hudson ci

Post on 18-Jan-2015

1.990 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Palestra sobre integração contínua com Hudson exemplificando com os projetos utilizados na Giran.Palestra ministrada por Almir Mendes e Francisco Souza

TRANSCRIPT

Integração ContínuaIntegração ContínuaHudson CIHudson CI

http://www.fickr.com/photos/heartheart/4027420686/http://www.fickr.com/photos/heartheart/4027420686/

Almir M3nd3s@m3nd3salmirmendes.com

Francisco Souza@franciscosouza

franciscosouza.com

Quem é Hudson?Quem é Hudson?O que ele faz?O que ele faz?

http://www.fickr.com/photos/jed_fsh/4956357898/

Por que usamos o Hudson?

http://www.fickr.com/photos/abbot45/187640227/

Passo 1 – A instalaçãoPasso 1 – A instalação

Passo 2 – Confgurando o ambiente

SSH Keys

PROJECT_SSHKEY=${HOME}/.ssh/${JOB_NAME}

Git hooksGit hooks

http://www.fickr.com/photos/lorenjavier/3997921584/

Build remoto

$ git push

\o/~ø~

RubyRuby

http://www.fickr.com/photos/42429527@N03/5106694318/

RVMRVMRuby Version ManagerRuby Version Manager

Gems

rspecrspec

rspec-railsrspec-rails

ci_reporterci_reporter

capybaracapybara

seleniumselenium

selenium-clientselenium-client

simplecovsimplecov

simplecov-rcovsimplecov-rcov

http://www.flickr.com/photos/afternoon_sunlight/134987402/

Rakeflenamespace :hudson do task :spec => ["hudson:setup:rspec", 'db:migrate', 'rake:spec']

namespace :setup do task :pre_ci do ENV["CI_REPORTS"] = 'hudson/reports/spec/' gem 'ci_reporter' require 'ci/reporter/rake/rspec' end task :rspec => [:pre_ci, "ci:setup:rspec"] endend

rvm use 1.9.2 && bundle install && rake db:migrate db:test:prepare

default && rake hudson:spec

PythonPython

http://www.fickr.com/photos/michaelransburg/4587694386/http://www.fickr.com/photos/michaelransburg/4587694386/

$ make build

http://www.fickr.com/photos/arenamontanus/2605742044/

http://www.fickr.com/photos/expressmonorail/2695634651/

nose

$ nosetests --nocapture --verbose $ nosetests --nocapture --verbose --where=tests –with-coverage--where=tests –with-coverage

--cover-package=giran –with-xunit--cover-package=giran –with-xunit--with-gae --gae-application=.--with-gae --gae-application=.

$ coverage xml –rcfle=.coveragerc$ coverage xml –rcfle=.coveragerc

$ pep8 giran | sed 's/: /: [W] /' > pep8.txt$ pep8 giran | sed 's/: /: [W] /' > pep8.txt

$ nosetests --nocapture --verbose $ nosetests --nocapture --verbose --where=tests –with-coverage--where=tests –with-coverage

--cover-package=giran –with-xunit--cover-package=giran –with-xunit--with-gae --gae-application=.--with-gae --gae-application=.

$ coverage xml –rcfle=.coveragerc$ coverage xml –rcfle=.coveragerc

$ pep8 giran | $ pep8 giran | sed 's/: /: [W] /'sed 's/: /: [W] /' > pep8.txt > pep8.txt

Que bonito!

Relatórios

Test Result Trend

Code Coverage

Violations Report

Build History

Notifcação de build Notifcação de build quebradoquebrado

http://www.fickr.com/photos/krisnfred/320075682/http://www.fickr.com/photos/krisnfred/320075682/

E o galaxy?!

Hmm... adequado!

Obrigado!

Almir M3nd3s@m3nd3salmirmendes.com

Francisco Souza@franciscosouza

franciscosouza.com

hudson-ci.org

top related