SlideShare a Scribd company logo
1 of 31
Download to read offline
Tanti “Piccoli Rilasci” 
con Symfony2 
! 
10 ottobre 2014 - SymfonyDay, Milano 
@morafabio
Chi sono 
@morafabio 
2 
1990 Fabio Mora 
2001 Linux User Group gallug.it 
2008 Software Engineer freelance 
2010 Prima SRL 
2011 GrUSP, IAD 
2013 Studente di Economia 
2014 eBay
“…una user story non è completa finché 
non è nelle mani di chi la deve usare…” 
3
http://symfony.com/it/doc/current/cookbook/deployment/tools.html 
4
Quanto costa cambiare una singola 
riga di codice in produzione? 
5
Processi… complessi? 
manual manual manual manual 
@morafabio 
6 
develop integrate build QA deploy 
smoke 
check 
merge regression 
PR 
test 
metrics 
docs 
changelog 
package 
notify 
go live! 
KPI 
stories 
code 
test 
build 
git push 
focus n * dev * n * progetti = !!!
“A lazy programmer 
is a good programmer” 
7 
Larry Wall
8
Automatizziamo! 
@morafabio 
9 
one-click 
auto auto auto 
auto 
develop integrate build QA deploy 
Continuos Integration 
Continuos Delivery
Premesse 
@morafabio 
10 
• Version Control System (git) 
• Test coverage (unit, integration, functional, e2e…) 
• Avere un host da dedicare a C.I. 
• Integrare almeno una volta al giorno 
• Prima di integrare, eseguire una build locale
1. Una build di Symfony2 
@morafabio 
11 
• Cleanup 
• Composer 
• Lint check 
• parameters.yml 
• Bower, grunt, sprites… 
• Security check 
• Doctrine Migrations 
• Fixture 
• Assetic 
• phpunit -c app/ 
• … 
build.xml 
targets 
ant build
ant composer 
ant test 
12
ant doctrine-setup 
13
2. Jenkins C.I. 
• Check safety delle pull-request 
• Build (parametrizzate) 
• Testing, smoke, regression 
• Metriche, docs, changelog 
• Trigger post build (es. deploy) 
• Notifiche (mail, push…) 
• …tons of plugins! 
apt-get install jenkins 
wget http://localhost:8080/jnlpJars/jenkins-cli.jar 
java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin [plugins] 
@morafabio 
14 
web interface
15
2 
@morafabio 
16 
Setup di un task
Possibile scenario Symfony2 su Jenkins 
Test 
xUnit, 
Clover PHP 
Metrics 
http://jenkins-php.org/ 
17 
SCM 
Git, 
GitHub 
Utility 
GreenBalls, 
Workspace Cleanup, 
HTMLPublisher 
CheckStyle, 
DRY, PMD, 
Violations
3. Deploy swiss-knife 
@morafabio 
• Usa capistrano (rails) 
• Collezione di recipes 
• Operazioni su cluster 
• Multistage extension 
18 
app/config/deploy.rb 
gem install capifony 
capifony .
app/config/deploy.rb 
19
cap deploy:setup 
cap deploy 
cap deploy:rollback 
20
MOAR MOAR!… cap -vT 
21 
cap -vT | wc -l 83
Lezione imparata! 
Le cose che avrei voluto sapere prima 
22
Tips & Tricks 
@morafabio 
23 
• PHPUnit @group No-CI e CI 
• Cancellare il workspace all’inizio, non alla fine 
• Usare Satis (ed altri repo locali) 
• Usare DNS locali 
• Jenkins sandbox: attenzione ai processi esterni 
• Git tag ad ogni deploy 
• Cancellare la cache di APC dopo il deploy 
• “Green Balls” plugin per Jenkins 
• bash = triforce!
Testing end to end in buildhost 
@morafabio 
24 
facebook/php-webdriver 
Selenium Xfvb Jenkins 
https://github.com/morafabio/headless-selenium
Visual Feedback 
@morafabio 
25 
+ 
http://jenkins.ci/api/json
Visual Feedback 
@morafabio 
26 
+ 
http://jenkins.ci/api/json
27 
“Extreme Programming Explained / 2nd Ed.” 
Beck, Andres - Addison Wesley 
Bohem, Beck
planning game, small releases, 
metaphor, simple design, testing, 
refactoring, pair programming, 
collecting ownership, 
continuos integration, 
40 hours/week, customer on site, 
coding standards, whole team 
28
• Travis CI, wercker, Circle CI 
• Go, Cruise Control, Idephix 
• Maven, Phing, capistrano, grunt 
29 
MOAR 
tools! 
MOAR 
books!
Grazie! 
mail@fabiomora.com 
facebook.com/fabio.mm 
@morafabio 
30
Domande? 
Feedback 
https://joind.in/event/sfdayit-14 
Codice 
https://github.com/morafabio/symfony-ci 
mail@fabiomora.com 
facebook.com/fabio.mm 
@morafabio 
31

More Related Content

Viewers also liked

L’elefante nella stanza! [con LiquidO™]
L’elefante nella stanza! [con LiquidO™] L’elefante nella stanza! [con LiquidO™]
L’elefante nella stanza! [con LiquidO™] Fabio Mora
 
Shazam to Spotify - spike/demo web project
Shazam to Spotify - spike/demo web projectShazam to Spotify - spike/demo web project
Shazam to Spotify - spike/demo web projectFabio Mora
 
cambiare punto di vista
cambiare punto di vistacambiare punto di vista
cambiare punto di vistaFabio Mora
 
CoderDojo - Galliate, 20 aprile 2013
CoderDojo - Galliate, 20 aprile 2013CoderDojo - Galliate, 20 aprile 2013
CoderDojo - Galliate, 20 aprile 2013Fabio Mora
 
php: back to basics
php: back to basicsphp: back to basics
php: back to basicsFabio Mora
 
Perchè Agile? Cambiamenti culturali work in progress.
Perchè Agile? Cambiamenti culturali work in progress.Perchè Agile? Cambiamenti culturali work in progress.
Perchè Agile? Cambiamenti culturali work in progress.Fabio Mora
 
Linux & Tools: per la piccola azienda e i freelance
Linux & Tools: per la piccola azienda e i freelanceLinux & Tools: per la piccola azienda e i freelance
Linux & Tools: per la piccola azienda e i freelanceFabio Mora
 
If "Embrace Change" is Hard (@milano-xpug)
If "Embrace Change" is Hard (@milano-xpug)If "Embrace Change" is Hard (@milano-xpug)
If "Embrace Change" is Hard (@milano-xpug)Fabio Mora
 
Continuous Delivery di una WebApp - by example
Continuous Delivery di una WebApp - by exampleContinuous Delivery di una WebApp - by example
Continuous Delivery di una WebApp - by exampleFabio Mora
 
L’elefante nella stanza! [con LiquidO™] - Codemotion 2014
L’elefante nella stanza! [con LiquidO™] - Codemotion 2014L’elefante nella stanza! [con LiquidO™] - Codemotion 2014
L’elefante nella stanza! [con LiquidO™] - Codemotion 2014Fabio Mora
 
php: standards & fizz buzz
php: standards & fizz buzzphp: standards & fizz buzz
php: standards & fizz buzzFabio Mora
 
The Crossword Game
The Crossword GameThe Crossword Game
The Crossword GameFabio Mora
 
Linux, sicurezza & social hacking
Linux, sicurezza & social hackingLinux, sicurezza & social hacking
Linux, sicurezza & social hackingFabio Mora
 
Se “Embrace Change” è difficile.
Se “Embrace Change” è difficile.Se “Embrace Change” è difficile.
Se “Embrace Change” è difficile.Fabio Mora
 
Esame di Stato: idee Hardware e Software
Esame di Stato: idee Hardware e SoftwareEsame di Stato: idee Hardware e Software
Esame di Stato: idee Hardware e SoftwareFabio Mora
 
It was just Open Source - TEDx Novara
It was just Open Source - TEDx NovaraIt was just Open Source - TEDx Novara
It was just Open Source - TEDx NovaraFabio Mora
 

Viewers also liked (16)

L’elefante nella stanza! [con LiquidO™]
L’elefante nella stanza! [con LiquidO™] L’elefante nella stanza! [con LiquidO™]
L’elefante nella stanza! [con LiquidO™]
 
Shazam to Spotify - spike/demo web project
Shazam to Spotify - spike/demo web projectShazam to Spotify - spike/demo web project
Shazam to Spotify - spike/demo web project
 
cambiare punto di vista
cambiare punto di vistacambiare punto di vista
cambiare punto di vista
 
CoderDojo - Galliate, 20 aprile 2013
CoderDojo - Galliate, 20 aprile 2013CoderDojo - Galliate, 20 aprile 2013
CoderDojo - Galliate, 20 aprile 2013
 
php: back to basics
php: back to basicsphp: back to basics
php: back to basics
 
Perchè Agile? Cambiamenti culturali work in progress.
Perchè Agile? Cambiamenti culturali work in progress.Perchè Agile? Cambiamenti culturali work in progress.
Perchè Agile? Cambiamenti culturali work in progress.
 
Linux & Tools: per la piccola azienda e i freelance
Linux & Tools: per la piccola azienda e i freelanceLinux & Tools: per la piccola azienda e i freelance
Linux & Tools: per la piccola azienda e i freelance
 
If "Embrace Change" is Hard (@milano-xpug)
If "Embrace Change" is Hard (@milano-xpug)If "Embrace Change" is Hard (@milano-xpug)
If "Embrace Change" is Hard (@milano-xpug)
 
Continuous Delivery di una WebApp - by example
Continuous Delivery di una WebApp - by exampleContinuous Delivery di una WebApp - by example
Continuous Delivery di una WebApp - by example
 
L’elefante nella stanza! [con LiquidO™] - Codemotion 2014
L’elefante nella stanza! [con LiquidO™] - Codemotion 2014L’elefante nella stanza! [con LiquidO™] - Codemotion 2014
L’elefante nella stanza! [con LiquidO™] - Codemotion 2014
 
php: standards & fizz buzz
php: standards & fizz buzzphp: standards & fizz buzz
php: standards & fizz buzz
 
The Crossword Game
The Crossword GameThe Crossword Game
The Crossword Game
 
Linux, sicurezza & social hacking
Linux, sicurezza & social hackingLinux, sicurezza & social hacking
Linux, sicurezza & social hacking
 
Se “Embrace Change” è difficile.
Se “Embrace Change” è difficile.Se “Embrace Change” è difficile.
Se “Embrace Change” è difficile.
 
Esame di Stato: idee Hardware e Software
Esame di Stato: idee Hardware e SoftwareEsame di Stato: idee Hardware e Software
Esame di Stato: idee Hardware e Software
 
It was just Open Source - TEDx Novara
It was just Open Source - TEDx NovaraIt was just Open Source - TEDx Novara
It was just Open Source - TEDx Novara
 

Similar to Tanti "piccoli rilasci" con Symfony2

Agileday2013 pratiche agili applicate all'infrastruttura
Agileday2013 pratiche agili applicate all'infrastrutturaAgileday2013 pratiche agili applicate all'infrastruttura
Agileday2013 pratiche agili applicate all'infrastrutturaXPeppers
 
Tdd e continuous delivery sull'infrastruttura
Tdd e continuous delivery sull'infrastrutturaTdd e continuous delivery sull'infrastruttura
Tdd e continuous delivery sull'infrastrutturaCodemotion
 
TDD e Continuous Delivery sull'infrastruttura
TDD e Continuous Delivery sull'infrastrutturaTDD e Continuous Delivery sull'infrastruttura
TDD e Continuous Delivery sull'infrastrutturaFilippo Liverani
 
Works with ASP.NET Core on Linux and Mac
Works with ASP.NET Core on Linux and MacWorks with ASP.NET Core on Linux and Mac
Works with ASP.NET Core on Linux and MacEmanuele Bartolesi
 
Continuous Deployment - Agile Day 2010
Continuous Deployment - Agile Day 2010Continuous Deployment - Agile Day 2010
Continuous Deployment - Agile Day 2010migratore
 
Real world Visual Studio Code
Real world Visual Studio CodeReal world Visual Studio Code
Real world Visual Studio CodeRoberto Messora
 
Continous Delivery & HQ Code
Continous Delivery & HQ CodeContinous Delivery & HQ Code
Continous Delivery & HQ CodeDaniele Mondello
 
.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il Mobile.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il MobilePietro Libro
 
ASP.NET Core Services e Linux per il Mobile - Pietro Libro - Codemotion Rome...
ASP.NET Core Services e Linux per il Mobile  - Pietro Libro - Codemotion Rome...ASP.NET Core Services e Linux per il Mobile  - Pietro Libro - Codemotion Rome...
ASP.NET Core Services e Linux per il Mobile - Pietro Libro - Codemotion Rome...Codemotion
 
DbUp - A real case of database migration
DbUp - A real case of database migrationDbUp - A real case of database migration
DbUp - A real case of database migrationAndrea Cirioni
 
ALM Revolutions - What's new in visual studio ALM 11
ALM Revolutions - What's new in visual studio ALM 11ALM Revolutions - What's new in visual studio ALM 11
ALM Revolutions - What's new in visual studio ALM 11DomusDotNet
 
Writing apps for android with .net
Writing apps for android with .net Writing apps for android with .net
Writing apps for android with .net Leonardo Alario
 
Continuous Integration e High Quality Code
Continuous Integration e High Quality CodeContinuous Integration e High Quality Code
Continuous Integration e High Quality CodeDaniele Mondello
 
Machine learning models continuous deployment on azure using devops
Machine learning models continuous deployment on azure using devopsMachine learning models continuous deployment on azure using devops
Machine learning models continuous deployment on azure using devopsIgor Antonacci
 
Osd 2016 Middleware Track
Osd 2016 Middleware TrackOsd 2016 Middleware Track
Osd 2016 Middleware TrackUgo Landini
 

Similar to Tanti "piccoli rilasci" con Symfony2 (20)

Agileday2013 pratiche agili applicate all'infrastruttura
Agileday2013 pratiche agili applicate all'infrastrutturaAgileday2013 pratiche agili applicate all'infrastruttura
Agileday2013 pratiche agili applicate all'infrastruttura
 
Tdd e continuous delivery sull'infrastruttura
Tdd e continuous delivery sull'infrastrutturaTdd e continuous delivery sull'infrastruttura
Tdd e continuous delivery sull'infrastruttura
 
TDD e Continuous Delivery sull'infrastruttura
TDD e Continuous Delivery sull'infrastrutturaTDD e Continuous Delivery sull'infrastruttura
TDD e Continuous Delivery sull'infrastruttura
 
Works with ASP.NET Core on Linux and Mac
Works with ASP.NET Core on Linux and MacWorks with ASP.NET Core on Linux and Mac
Works with ASP.NET Core on Linux and Mac
 
Web frameworks
Web frameworksWeb frameworks
Web frameworks
 
Continuous Deployment - Agile Day 2010
Continuous Deployment - Agile Day 2010Continuous Deployment - Agile Day 2010
Continuous Deployment - Agile Day 2010
 
App Engine + Python
App Engine + PythonApp Engine + Python
App Engine + Python
 
Real world Visual Studio Code
Real world Visual Studio CodeReal world Visual Studio Code
Real world Visual Studio Code
 
Continous Delivery & HQ Code
Continous Delivery & HQ CodeContinous Delivery & HQ Code
Continous Delivery & HQ Code
 
.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il Mobile.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il Mobile
 
ASP.NET Core Services e Linux per il Mobile - Pietro Libro - Codemotion Rome...
ASP.NET Core Services e Linux per il Mobile  - Pietro Libro - Codemotion Rome...ASP.NET Core Services e Linux per il Mobile  - Pietro Libro - Codemotion Rome...
ASP.NET Core Services e Linux per il Mobile - Pietro Libro - Codemotion Rome...
 
DbUp - A real case of database migration
DbUp - A real case of database migrationDbUp - A real case of database migration
DbUp - A real case of database migration
 
Web 2.0 sviluppare e ottimizzare oggi
Web 2.0 sviluppare e ottimizzare oggiWeb 2.0 sviluppare e ottimizzare oggi
Web 2.0 sviluppare e ottimizzare oggi
 
Web frameworks
Web frameworksWeb frameworks
Web frameworks
 
ALM Revolutions - What's new in visual studio ALM 11
ALM Revolutions - What's new in visual studio ALM 11ALM Revolutions - What's new in visual studio ALM 11
ALM Revolutions - What's new in visual studio ALM 11
 
Writing apps for android with .net
Writing apps for android with .net Writing apps for android with .net
Writing apps for android with .net
 
Continuous Integration e High Quality Code
Continuous Integration e High Quality CodeContinuous Integration e High Quality Code
Continuous Integration e High Quality Code
 
Docker & DevOps
Docker  & DevOpsDocker  & DevOps
Docker & DevOps
 
Machine learning models continuous deployment on azure using devops
Machine learning models continuous deployment on azure using devopsMachine learning models continuous deployment on azure using devops
Machine learning models continuous deployment on azure using devops
 
Osd 2016 Middleware Track
Osd 2016 Middleware TrackOsd 2016 Middleware Track
Osd 2016 Middleware Track
 

More from Fabio Mora

Esperimenti Kanban: tra economia e teoria delle code.
Esperimenti Kanban: tra economia e teoria delle code.Esperimenti Kanban: tra economia e teoria delle code.
Esperimenti Kanban: tra economia e teoria delle code.Fabio Mora
 
La Unix Way vista da un DevOps
La Unix Way vista da un DevOpsLa Unix Way vista da un DevOps
La Unix Way vista da un DevOpsFabio Mora
 
We don't talk about Agile anymore
We don't talk about Agile anymoreWe don't talk about Agile anymore
We don't talk about Agile anymoreFabio Mora
 
A quick introduction: Extreme Programming
A quick introduction: Extreme ProgrammingA quick introduction: Extreme Programming
A quick introduction: Extreme ProgrammingFabio Mora
 
Quick Introduction: Extreme Programming
Quick Introduction: Extreme ProgrammingQuick Introduction: Extreme Programming
Quick Introduction: Extreme ProgrammingFabio Mora
 
Progressive Feature Rollout
Progressive Feature RolloutProgressive Feature Rollout
Progressive Feature RolloutFabio Mora
 
2009 - Quotidiana Legalità
2009 - Quotidiana Legalità2009 - Quotidiana Legalità
2009 - Quotidiana LegalitàFabio Mora
 
LinuxDay 2009 - Quali programmi?
LinuxDay 2009 - Quali programmi?LinuxDay 2009 - Quali programmi?
LinuxDay 2009 - Quali programmi?Fabio Mora
 
LinuxDay 2009 - Cos'è Linux?
LinuxDay 2009 - Cos'è Linux?LinuxDay 2009 - Cos'è Linux?
LinuxDay 2009 - Cos'è Linux?Fabio Mora
 

More from Fabio Mora (9)

Esperimenti Kanban: tra economia e teoria delle code.
Esperimenti Kanban: tra economia e teoria delle code.Esperimenti Kanban: tra economia e teoria delle code.
Esperimenti Kanban: tra economia e teoria delle code.
 
La Unix Way vista da un DevOps
La Unix Way vista da un DevOpsLa Unix Way vista da un DevOps
La Unix Way vista da un DevOps
 
We don't talk about Agile anymore
We don't talk about Agile anymoreWe don't talk about Agile anymore
We don't talk about Agile anymore
 
A quick introduction: Extreme Programming
A quick introduction: Extreme ProgrammingA quick introduction: Extreme Programming
A quick introduction: Extreme Programming
 
Quick Introduction: Extreme Programming
Quick Introduction: Extreme ProgrammingQuick Introduction: Extreme Programming
Quick Introduction: Extreme Programming
 
Progressive Feature Rollout
Progressive Feature RolloutProgressive Feature Rollout
Progressive Feature Rollout
 
2009 - Quotidiana Legalità
2009 - Quotidiana Legalità2009 - Quotidiana Legalità
2009 - Quotidiana Legalità
 
LinuxDay 2009 - Quali programmi?
LinuxDay 2009 - Quali programmi?LinuxDay 2009 - Quali programmi?
LinuxDay 2009 - Quali programmi?
 
LinuxDay 2009 - Cos'è Linux?
LinuxDay 2009 - Cos'è Linux?LinuxDay 2009 - Cos'è Linux?
LinuxDay 2009 - Cos'è Linux?
 

Recently uploaded

GIORNATA TECNICA 18/04 | BENANTI Alessandro
GIORNATA TECNICA 18/04 | BENANTI AlessandroGIORNATA TECNICA 18/04 | BENANTI Alessandro
GIORNATA TECNICA 18/04 | BENANTI AlessandroServizi a rete
 
Presentzione Matematica similitudini circonferenze e omotetie.pptx
Presentzione  Matematica similitudini circonferenze e omotetie.pptxPresentzione  Matematica similitudini circonferenze e omotetie.pptx
Presentzione Matematica similitudini circonferenze e omotetie.pptxfilippoluciani9
 
GIORNATA TECNICA 18/04 | DE ROSA Roberto
GIORNATA TECNICA 18/04 | DE ROSA RobertoGIORNATA TECNICA 18/04 | DE ROSA Roberto
GIORNATA TECNICA 18/04 | DE ROSA RobertoServizi a rete
 
GIORNATA TECNICA DA AQP 18/04 | MOTTA Simone
GIORNATA TECNICA DA AQP 18/04 | MOTTA SimoneGIORNATA TECNICA DA AQP 18/04 | MOTTA Simone
GIORNATA TECNICA DA AQP 18/04 | MOTTA SimoneServizi a rete
 
Descrizione della struttura architettonica Eretteo.pptx
Descrizione della struttura architettonica Eretteo.pptxDescrizione della struttura architettonica Eretteo.pptx
Descrizione della struttura architettonica Eretteo.pptxtecongo2007
 
GIORNATA TECNICA DA AQP 18/04 | ZONNO Serena
GIORNATA TECNICA DA AQP 18/04 | ZONNO SerenaGIORNATA TECNICA DA AQP 18/04 | ZONNO Serena
GIORNATA TECNICA DA AQP 18/04 | ZONNO SerenaServizi a rete
 
GIORNATA TECNICA 18/04 | DE LEO Antonio
GIORNATA TECNICA 18/04  | DE LEO AntonioGIORNATA TECNICA 18/04  | DE LEO Antonio
GIORNATA TECNICA 18/04 | DE LEO AntonioServizi a rete
 
GIORNATA TECNICA 18/04 | SPIZZIRRI Massimo
GIORNATA TECNICA 18/04 | SPIZZIRRI MassimoGIORNATA TECNICA 18/04 | SPIZZIRRI Massimo
GIORNATA TECNICA 18/04 | SPIZZIRRI MassimoServizi a rete
 
GIORNATA TECNICA 18/04 | LITTERIO Raffaele
GIORNATA TECNICA 18/04 | LITTERIO RaffaeleGIORNATA TECNICA 18/04 | LITTERIO Raffaele
GIORNATA TECNICA 18/04 | LITTERIO RaffaeleServizi a rete
 

Recently uploaded (9)

GIORNATA TECNICA 18/04 | BENANTI Alessandro
GIORNATA TECNICA 18/04 | BENANTI AlessandroGIORNATA TECNICA 18/04 | BENANTI Alessandro
GIORNATA TECNICA 18/04 | BENANTI Alessandro
 
Presentzione Matematica similitudini circonferenze e omotetie.pptx
Presentzione  Matematica similitudini circonferenze e omotetie.pptxPresentzione  Matematica similitudini circonferenze e omotetie.pptx
Presentzione Matematica similitudini circonferenze e omotetie.pptx
 
GIORNATA TECNICA 18/04 | DE ROSA Roberto
GIORNATA TECNICA 18/04 | DE ROSA RobertoGIORNATA TECNICA 18/04 | DE ROSA Roberto
GIORNATA TECNICA 18/04 | DE ROSA Roberto
 
GIORNATA TECNICA DA AQP 18/04 | MOTTA Simone
GIORNATA TECNICA DA AQP 18/04 | MOTTA SimoneGIORNATA TECNICA DA AQP 18/04 | MOTTA Simone
GIORNATA TECNICA DA AQP 18/04 | MOTTA Simone
 
Descrizione della struttura architettonica Eretteo.pptx
Descrizione della struttura architettonica Eretteo.pptxDescrizione della struttura architettonica Eretteo.pptx
Descrizione della struttura architettonica Eretteo.pptx
 
GIORNATA TECNICA DA AQP 18/04 | ZONNO Serena
GIORNATA TECNICA DA AQP 18/04 | ZONNO SerenaGIORNATA TECNICA DA AQP 18/04 | ZONNO Serena
GIORNATA TECNICA DA AQP 18/04 | ZONNO Serena
 
GIORNATA TECNICA 18/04 | DE LEO Antonio
GIORNATA TECNICA 18/04  | DE LEO AntonioGIORNATA TECNICA 18/04  | DE LEO Antonio
GIORNATA TECNICA 18/04 | DE LEO Antonio
 
GIORNATA TECNICA 18/04 | SPIZZIRRI Massimo
GIORNATA TECNICA 18/04 | SPIZZIRRI MassimoGIORNATA TECNICA 18/04 | SPIZZIRRI Massimo
GIORNATA TECNICA 18/04 | SPIZZIRRI Massimo
 
GIORNATA TECNICA 18/04 | LITTERIO Raffaele
GIORNATA TECNICA 18/04 | LITTERIO RaffaeleGIORNATA TECNICA 18/04 | LITTERIO Raffaele
GIORNATA TECNICA 18/04 | LITTERIO Raffaele
 

Tanti "piccoli rilasci" con Symfony2

  • 1. Tanti “Piccoli Rilasci” con Symfony2 ! 10 ottobre 2014 - SymfonyDay, Milano @morafabio
  • 2. Chi sono @morafabio 2 1990 Fabio Mora 2001 Linux User Group gallug.it 2008 Software Engineer freelance 2010 Prima SRL 2011 GrUSP, IAD 2013 Studente di Economia 2014 eBay
  • 3. “…una user story non è completa finché non è nelle mani di chi la deve usare…” 3
  • 5. Quanto costa cambiare una singola riga di codice in produzione? 5
  • 6. Processi… complessi? manual manual manual manual @morafabio 6 develop integrate build QA deploy smoke check merge regression PR test metrics docs changelog package notify go live! KPI stories code test build git push focus n * dev * n * progetti = !!!
  • 7. “A lazy programmer is a good programmer” 7 Larry Wall
  • 8. 8
  • 9. Automatizziamo! @morafabio 9 one-click auto auto auto auto develop integrate build QA deploy Continuos Integration Continuos Delivery
  • 10. Premesse @morafabio 10 • Version Control System (git) • Test coverage (unit, integration, functional, e2e…) • Avere un host da dedicare a C.I. • Integrare almeno una volta al giorno • Prima di integrare, eseguire una build locale
  • 11. 1. Una build di Symfony2 @morafabio 11 • Cleanup • Composer • Lint check • parameters.yml • Bower, grunt, sprites… • Security check • Doctrine Migrations • Fixture • Assetic • phpunit -c app/ • … build.xml targets ant build
  • 12. ant composer ant test 12
  • 14. 2. Jenkins C.I. • Check safety delle pull-request • Build (parametrizzate) • Testing, smoke, regression • Metriche, docs, changelog • Trigger post build (es. deploy) • Notifiche (mail, push…) • …tons of plugins! apt-get install jenkins wget http://localhost:8080/jnlpJars/jenkins-cli.jar java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin [plugins] @morafabio 14 web interface
  • 15. 15
  • 16. 2 @morafabio 16 Setup di un task
  • 17. Possibile scenario Symfony2 su Jenkins Test xUnit, Clover PHP Metrics http://jenkins-php.org/ 17 SCM Git, GitHub Utility GreenBalls, Workspace Cleanup, HTMLPublisher CheckStyle, DRY, PMD, Violations
  • 18. 3. Deploy swiss-knife @morafabio • Usa capistrano (rails) • Collezione di recipes • Operazioni su cluster • Multistage extension 18 app/config/deploy.rb gem install capifony capifony .
  • 20. cap deploy:setup cap deploy cap deploy:rollback 20
  • 21. MOAR MOAR!… cap -vT 21 cap -vT | wc -l 83
  • 22. Lezione imparata! Le cose che avrei voluto sapere prima 22
  • 23. Tips & Tricks @morafabio 23 • PHPUnit @group No-CI e CI • Cancellare il workspace all’inizio, non alla fine • Usare Satis (ed altri repo locali) • Usare DNS locali • Jenkins sandbox: attenzione ai processi esterni • Git tag ad ogni deploy • Cancellare la cache di APC dopo il deploy • “Green Balls” plugin per Jenkins • bash = triforce!
  • 24. Testing end to end in buildhost @morafabio 24 facebook/php-webdriver Selenium Xfvb Jenkins https://github.com/morafabio/headless-selenium
  • 25. Visual Feedback @morafabio 25 + http://jenkins.ci/api/json
  • 26. Visual Feedback @morafabio 26 + http://jenkins.ci/api/json
  • 27. 27 “Extreme Programming Explained / 2nd Ed.” Beck, Andres - Addison Wesley Bohem, Beck
  • 28. planning game, small releases, metaphor, simple design, testing, refactoring, pair programming, collecting ownership, continuos integration, 40 hours/week, customer on site, coding standards, whole team 28
  • 29. • Travis CI, wercker, Circle CI • Go, Cruise Control, Idephix • Maven, Phing, capistrano, grunt 29 MOAR tools! MOAR books!
  • 31. Domande? Feedback https://joind.in/event/sfdayit-14 Codice https://github.com/morafabio/symfony-ci mail@fabiomora.com facebook.com/fabio.mm @morafabio 31