SlideShare a Scribd company logo
1 of 21
Branching & Merging
strategies (with TFS) 28 Aprile
2016
Sponsored by
Come accelerare i tuoi rilasci a costo zero
Sponsor
Presentazione
• Igor Antonacci
• DevOps Engineer & System Architect @ Fresenius Medical Care
• Co-Fondatore di DotDotNet e GetLatestVersion.it
• Twitter: @bitbreaker
• Facebook: fb.me/igorantonacci
• Email: igor@igorantonacci.me
Agenda
• Introduzione
• Nomenclatura
• Perchè ...Strategies –
«Sto adottando la strategia giusta per il mio prodotto / Team / ciclo di sviluppo?»
• Strategy #1 – Main Only
• Strategy #2 – Release Isolation
• Strategy #3 – Development Isolation
• Strategy #4 – Development and Release Isolation
• Strategy #5 – Servicing and Release Isolation
• Strategy #6 – Servicing, Hotfix and Release Isolation
• Strategy #7 – Feature Isolation
• Strategy #8 – Code Promotion
• Branching and Merging Anti-Patterns
• Conclusioni
• Reference
Introduzione – 1
Context
• Centralized Source Control – TFVC SOLO come esempio
• Team con più di un membro (2 è sufficiente)
• Prodotto/i (Software) da consegnare (artifacts)
Gli Attori
Team members Project
Da consegnare in
tempo!
Utenti FELICI!
Codebase
Team
Problematica da risolvere
• Processo di sviluppo consolidato
• Design  Sviluppo  Test  Deploy
• Uno o più Prodotti Software
• Versioni differenti (prossima, in rilascio, in manutenzione)
• Clienti diversi / diverse personalizzazioni
• Uno o più Team
• «allocati» su Feature / Versioni differenti
• UNICA CODEBASE
NON ESISTE ALCUNO studio indipendente sulla correlazione tra
Processo di Sviluppo e Metodologia di Branching
Perchè ...Strategies
• Approccio empirico al problema
• Attaccare il «nemico» facendoci il meno male possibile
La strategia si applica a tutti i campi in cui per raggiungere l'obiettivo sono necessarie una serie di
operazioni separate, la cui scelta non è unica e/o il cui esito è incerto.
(cit. Wikipedia – Strategia)
Goal
• Gestire il lavoro concorrente di UNO o più Team sulla stessa
codebase
• Isolare il rischio introdotto da diversi insiemi di modifiche alla
codebase
• Fare delle istantanee della codebase al fine di gestire successivi
cambiamenti isolati (es. Branch per Release, Personalizzazioni
ecc.)
Nomenclatura
Termine Descrizione
Development Branch Branch che contiene i cambiamenti (alla codebase) per la prossima versione
Forward Integrate (FI) Merge da un ramo padre ad uno figlio
Reverse Integrate (RI) Merge da un ramo figlio ad uno padre
Hotfix Cambiamento necessario a riparare un bug «bloccante» o un problema che impatta
l’intero sistema.
Main Branch E’ il branch «che congiunge» il ramo di sviluppo con quello di rilascio.
Release Branch Branch dove confluirà il codice in preparazione per una specifica versione
Release Vehicle Il modo in cui il prodotto viene «rilasciato» al cliente (Hotfix, Major Release, Service Pack
etc.)
Service Pack (SP) Un insieme di hotfix e funzionalità per una versione precedente del prodotto
Strategy #1 – Main Only
Strategy #2 – Release Isolation
Strategy #3 – Development Isolation
Strategy #4 – Development and Release
Isolation
Strategy #5 – Servicing and Release Isolation
Strategy #6 – Servicing, Hotfix and Release
Isolation
Strategy #7 – Feature Isolation
Strategy #8 – Code Promotion
Branching and Merging Anti-Patterns
• Merge Paranoia – evitare di fare Merge a tutti i costi
• Merge Mania – Merge, Merge, Merge … come se piovesse 
• Big Bang Merge – Merge UNA VOLTA per «TUTTI» alla fine della fase di sviluppo
• Never-ending Merge - Merge continuo…
• Wrong-way merge – Fare il Merge di una feature sul ramo di una versione PRECEDENTE
• Branch-mania – come Merge-mania, ma per il Branch
• Cascading Branches – Branch che non confluiscono mai nel branch padre
• Mysterious Branches – Branch … e perché? 
• Temporary Branches – Branch effettuato per un cambiamento … ma che poi diventa un
workspace permanente
• Volatile Branches – Branch di uno o più Changeset anche se si trovano in uno stato unstable
• Development Freeze – SU LE MANIIIII
• Berlin Wall – Branch per dividere i membri del Team… non il loro lavoro
Conclusioni
• L’adozione di una Branching Strategy è NECESSARIA all’interno di
un Team
• La scelta della corretta Strategy non è sempre facile e non avviene
sempre al «primo colpo»
• Ogni Business / Dev Process ha delle caratteristiche uniche 
Create la Vs. Strategy … cum grano salis (cit.)
Reference
• Visual Studio ALM Rangers – Branching Strategies
(https://vsarbranchingguide.codeplex.com/)
• Branching Taxonomy – MS Research
(http://research.microsoft.com/apps/pubs/?id=209683 )
• Defining Your Branching and Merging Strategy
(https://msdn.microsoft.com/en-us/library/bb668955.aspx)
• Branch Folders and Files
(https://msdn.microsoft.com/en-us/library/ms181425(VS.110).aspx )

More Related Content

What's hot

Le novità di Visual Studio 2015 per lo sviluppatore ASP.NET
Le novità di Visual Studio 2015 per lo sviluppatore ASP.NETLe novità di Visual Studio 2015 per lo sviluppatore ASP.NET
Le novità di Visual Studio 2015 per lo sviluppatore ASP.NETEmanuele Bartolesi
 
Php Day 2009:Un Salto Nel Buio
Php Day 2009:Un Salto Nel BuioPhp Day 2009:Un Salto Nel Buio
Php Day 2009:Un Salto Nel Buiopietrobr
 
Creare App per Office 365 con ASP.NET MVC 5
Creare App per Office 365 con ASP.NET MVC 5Creare App per Office 365 con ASP.NET MVC 5
Creare App per Office 365 con ASP.NET MVC 5Emanuele Bartolesi
 
Meetup PrestaShop Torino [IT]
Meetup PrestaShop Torino [IT]Meetup PrestaShop Torino [IT]
Meetup PrestaShop Torino [IT]PrestaShop
 
Dal requisito all'implementazione @ CD2010
Dal requisito all'implementazione @ CD2010Dal requisito all'implementazione @ CD2010
Dal requisito all'implementazione @ CD2010Mauro Servienti
 
SonarQube e il debito tecnico - Matteo Emili
SonarQube e il debito tecnico - Matteo EmiliSonarQube e il debito tecnico - Matteo Emili
SonarQube e il debito tecnico - Matteo EmiliAntonio Liccardi
 
DevOps by examples - Agile O'Day 2017
DevOps by examples - Agile O'Day 2017DevOps by examples - Agile O'Day 2017
DevOps by examples - Agile O'Day 2017Giulio Vian
 
Keep calm and Deploy - Panoramica sui problemi che emergono in fase di rilasc...
Keep calm and Deploy - Panoramica sui problemi che emergono in fase di rilasc...Keep calm and Deploy - Panoramica sui problemi che emergono in fase di rilasc...
Keep calm and Deploy - Panoramica sui problemi che emergono in fase di rilasc...Andrea Cirioni
 
Corso Python Deltapromo - Lezione 3
Corso Python Deltapromo - Lezione 3Corso Python Deltapromo - Lezione 3
Corso Python Deltapromo - Lezione 3Paolo Ferretti
 
.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
 
Keep calm and deploy
Keep calm and deployKeep calm and deploy
Keep calm and deployKlab
 
Web app slots and WebAPI versioning
Web app slots and WebAPI versioningWeb app slots and WebAPI versioning
Web app slots and WebAPI versioningNicolò Carandini
 
Automatically deployment to Azure Web Sites
Automatically deployment to Azure Web SitesAutomatically deployment to Azure Web Sites
Automatically deployment to Azure Web SitesGian Maria Ricci
 
Il "rilascio" con Octopus Deploy (visto dagli occhi di un dev)
Il "rilascio" con Octopus Deploy (visto dagli occhi di un dev)Il "rilascio" con Octopus Deploy (visto dagli occhi di un dev)
Il "rilascio" con Octopus Deploy (visto dagli occhi di un dev)Carlo Fedeli
 
Mauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5W
Mauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5WMauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5W
Mauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5WMeet Magento Italy
 

What's hot (18)

Le novità di Visual Studio 2015 per lo sviluppatore ASP.NET
Le novità di Visual Studio 2015 per lo sviluppatore ASP.NETLe novità di Visual Studio 2015 per lo sviluppatore ASP.NET
Le novità di Visual Studio 2015 per lo sviluppatore ASP.NET
 
Git branching model
Git branching modelGit branching model
Git branching model
 
Php Day 2009:Un Salto Nel Buio
Php Day 2009:Un Salto Nel BuioPhp Day 2009:Un Salto Nel Buio
Php Day 2009:Un Salto Nel Buio
 
Php for ASP.NET Developers
Php for ASP.NET DevelopersPhp for ASP.NET Developers
Php for ASP.NET Developers
 
Creare App per Office 365 con ASP.NET MVC 5
Creare App per Office 365 con ASP.NET MVC 5Creare App per Office 365 con ASP.NET MVC 5
Creare App per Office 365 con ASP.NET MVC 5
 
Meetup PrestaShop Torino [IT]
Meetup PrestaShop Torino [IT]Meetup PrestaShop Torino [IT]
Meetup PrestaShop Torino [IT]
 
Dal requisito all'implementazione @ CD2010
Dal requisito all'implementazione @ CD2010Dal requisito all'implementazione @ CD2010
Dal requisito all'implementazione @ CD2010
 
SonarQube e il debito tecnico - Matteo Emili
SonarQube e il debito tecnico - Matteo EmiliSonarQube e il debito tecnico - Matteo Emili
SonarQube e il debito tecnico - Matteo Emili
 
DevOps by examples - Agile O'Day 2017
DevOps by examples - Agile O'Day 2017DevOps by examples - Agile O'Day 2017
DevOps by examples - Agile O'Day 2017
 
Keep calm and Deploy - Panoramica sui problemi che emergono in fase di rilasc...
Keep calm and Deploy - Panoramica sui problemi che emergono in fase di rilasc...Keep calm and Deploy - Panoramica sui problemi che emergono in fase di rilasc...
Keep calm and Deploy - Panoramica sui problemi che emergono in fase di rilasc...
 
Corso Python Deltapromo - Lezione 3
Corso Python Deltapromo - Lezione 3Corso Python Deltapromo - Lezione 3
Corso Python Deltapromo - Lezione 3
 
.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
 
Keep calm and deploy
Keep calm and deployKeep calm and deploy
Keep calm and deploy
 
Web app slots and WebAPI versioning
Web app slots and WebAPI versioningWeb app slots and WebAPI versioning
Web app slots and WebAPI versioning
 
Automatically deployment to Azure Web Sites
Automatically deployment to Azure Web SitesAutomatically deployment to Azure Web Sites
Automatically deployment to Azure Web Sites
 
Tfs Basic - Quick Intro
Tfs Basic - Quick IntroTfs Basic - Quick Intro
Tfs Basic - Quick Intro
 
Il "rilascio" con Octopus Deploy (visto dagli occhi di un dev)
Il "rilascio" con Octopus Deploy (visto dagli occhi di un dev)Il "rilascio" con Octopus Deploy (visto dagli occhi di un dev)
Il "rilascio" con Octopus Deploy (visto dagli occhi di un dev)
 
Mauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5W
Mauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5WMauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5W
Mauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5W
 

Viewers also liked

Don’t await … try async/await !
Don’t await … try async/await !Don’t await … try async/await !
Don’t await … try async/await !Klab
 
Azure Application Insights
Azure Application InsightsAzure Application Insights
Azure Application InsightsKlab
 
Introduzione a ReactiveX
Introduzione a ReactiveXIntroduzione a ReactiveX
Introduzione a ReactiveXKlab
 
Database under source control
Database under source controlDatabase under source control
Database under source controlKlab
 
There is a bot for that
There is a bot for thatThere is a bot for that
There is a bot for thatKlab
 
The five dysfunctions of a team
The five dysfunctions of a teamThe five dysfunctions of a team
The five dysfunctions of a teamKlab
 
Team Foundation Server Extensibility Enhancements
Team Foundation Server Extensibility EnhancementsTeam Foundation Server Extensibility Enhancements
Team Foundation Server Extensibility Enhancementsjimlamb
 
Branching and Merging Practices
Branching and Merging Practices Branching and Merging Practices
Branching and Merging Practices Rajesh Kumar
 
Team Foundation Server 2008 Overview
Team Foundation Server 2008 OverviewTeam Foundation Server 2008 Overview
Team Foundation Server 2008 OverviewSteve Lange
 
Team Foundation Server - Source Control
Team Foundation Server - Source ControlTeam Foundation Server - Source Control
Team Foundation Server - Source ControlDhirendra Singh
 
Team Foundation Server 2010 - Version Control
Team Foundation Server 2010 - Version ControlTeam Foundation Server 2010 - Version Control
Team Foundation Server 2010 - Version ControlSteve Lange
 
Branching Strategies: Feature Branches vs Branch by Abstraction
Branching Strategies: Feature Branches vs Branch by AbstractionBranching Strategies: Feature Branches vs Branch by Abstraction
Branching Strategies: Feature Branches vs Branch by AbstractionChris Birchall
 

Viewers also liked (12)

Don’t await … try async/await !
Don’t await … try async/await !Don’t await … try async/await !
Don’t await … try async/await !
 
Azure Application Insights
Azure Application InsightsAzure Application Insights
Azure Application Insights
 
Introduzione a ReactiveX
Introduzione a ReactiveXIntroduzione a ReactiveX
Introduzione a ReactiveX
 
Database under source control
Database under source controlDatabase under source control
Database under source control
 
There is a bot for that
There is a bot for thatThere is a bot for that
There is a bot for that
 
The five dysfunctions of a team
The five dysfunctions of a teamThe five dysfunctions of a team
The five dysfunctions of a team
 
Team Foundation Server Extensibility Enhancements
Team Foundation Server Extensibility EnhancementsTeam Foundation Server Extensibility Enhancements
Team Foundation Server Extensibility Enhancements
 
Branching and Merging Practices
Branching and Merging Practices Branching and Merging Practices
Branching and Merging Practices
 
Team Foundation Server 2008 Overview
Team Foundation Server 2008 OverviewTeam Foundation Server 2008 Overview
Team Foundation Server 2008 Overview
 
Team Foundation Server - Source Control
Team Foundation Server - Source ControlTeam Foundation Server - Source Control
Team Foundation Server - Source Control
 
Team Foundation Server 2010 - Version Control
Team Foundation Server 2010 - Version ControlTeam Foundation Server 2010 - Version Control
Team Foundation Server 2010 - Version Control
 
Branching Strategies: Feature Branches vs Branch by Abstraction
Branching Strategies: Feature Branches vs Branch by AbstractionBranching Strategies: Feature Branches vs Branch by Abstraction
Branching Strategies: Feature Branches vs Branch by Abstraction
 

Similar to Branching & Merging strategies (with TFS)

Alm pills - Sessione community tour Dot Net Umbria 2011
Alm pills - Sessione community tour Dot Net Umbria 2011Alm pills - Sessione community tour Dot Net Umbria 2011
Alm pills - Sessione community tour Dot Net Umbria 2011Gian Maria Ricci
 
Trunk Based Development is a social matter
Trunk Based Development is a social matterTrunk Based Development is a social matter
Trunk Based Development is a social matterAlessio Coser
 
MySQL Tech Tour 2015 - Soluzioni di alta disponibilità con MySQL
MySQL Tech Tour 2015 - Soluzioni di alta disponibilità con MySQLMySQL Tech Tour 2015 - Soluzioni di alta disponibilità con MySQL
MySQL Tech Tour 2015 - Soluzioni di alta disponibilità con MySQLPar-Tec S.p.A.
 
Gestione del codice sorgente con Visual Studio Online
Gestione del codice sorgente con Visual Studio OnlineGestione del codice sorgente con Visual Studio Online
Gestione del codice sorgente con Visual Studio OnlineDavide Benvegnù
 
Inversion of Control @ CD2008
Inversion of Control @ CD2008Inversion of Control @ CD2008
Inversion of Control @ CD2008Mauro Servienti
 
Le 7 sfide da affrontare nella migrazione da monolite a miniservizi
Le 7 sfide da affrontare nella migrazione da monolite a miniserviziLe 7 sfide da affrontare nella migrazione da monolite a miniservizi
Le 7 sfide da affrontare nella migrazione da monolite a miniserviziLuca Acquaviva
 
Exploring VS Code
Exploring VS CodeExploring VS Code
Exploring VS Codedotnetcode
 
DSTORIE DALLA TRINCEA: TEAM FOUNDATION SERVER IN CASI LIMITE E NON SOLO...
DSTORIE DALLA TRINCEA: TEAM FOUNDATION SERVER IN CASI LIMITE E NON SOLO...DSTORIE DALLA TRINCEA: TEAM FOUNDATION SERVER IN CASI LIMITE E NON SOLO...
DSTORIE DALLA TRINCEA: TEAM FOUNDATION SERVER IN CASI LIMITE E NON SOLO...DotNetCampus
 
Webcast - Introduzione a Visual Studio Online
Webcast - Introduzione a Visual Studio OnlineWebcast - Introduzione a Visual Studio Online
Webcast - Introduzione a Visual Studio OnlineDavide Benvegnù
 
Visual Studio Release Management - una nuova Weltanschauung o un'evoluzione n...
Visual Studio Release Management - una nuova Weltanschauung o un'evoluzione n...Visual Studio Release Management - una nuova Weltanschauung o un'evoluzione n...
Visual Studio Release Management - una nuova Weltanschauung o un'evoluzione n...Giulio Vian
 
Code Generation con i templates T4 in visual studio
Code Generation con i templates T4 in visual studioCode Generation con i templates T4 in visual studio
Code Generation con i templates T4 in visual studioMarco Parenzan
 
Progettare applicazioni con il modeling project di Visual Studio 2010
Progettare applicazioni con il modeling project di Visual Studio 2010Progettare applicazioni con il modeling project di Visual Studio 2010
Progettare applicazioni con il modeling project di Visual Studio 2010Michele Aponte
 
VMUG.IT @ ITway Campus 2014
VMUG.IT @ ITway Campus 2014VMUG.IT @ ITway Campus 2014
VMUG.IT @ ITway Campus 2014Andrea Mauro
 
Entity Framework 7, Back To The Future!
Entity Framework 7, Back To The Future!Entity Framework 7, Back To The Future!
Entity Framework 7, Back To The Future!Michael Denny
 
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLDTYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLDDotNetCampus
 
Slide typescript - net campus
Slide typescript - net campusSlide typescript - net campus
Slide typescript - net campusDotNetCampus
 

Similar to Branching & Merging strategies (with TFS) (20)

Alm pills - Sessione community tour Dot Net Umbria 2011
Alm pills - Sessione community tour Dot Net Umbria 2011Alm pills - Sessione community tour Dot Net Umbria 2011
Alm pills - Sessione community tour Dot Net Umbria 2011
 
Trunk Based Development is a social matter
Trunk Based Development is a social matterTrunk Based Development is a social matter
Trunk Based Development is a social matter
 
MySQL Tech Tour 2015 - Soluzioni di alta disponibilità con MySQL
MySQL Tech Tour 2015 - Soluzioni di alta disponibilità con MySQLMySQL Tech Tour 2015 - Soluzioni di alta disponibilità con MySQL
MySQL Tech Tour 2015 - Soluzioni di alta disponibilità con MySQL
 
Gestione del codice sorgente con Visual Studio Online
Gestione del codice sorgente con Visual Studio OnlineGestione del codice sorgente con Visual Studio Online
Gestione del codice sorgente con Visual Studio Online
 
Inversion of Control @ CD2008
Inversion of Control @ CD2008Inversion of Control @ CD2008
Inversion of Control @ CD2008
 
Le 7 sfide da affrontare nella migrazione da monolite a miniservizi
Le 7 sfide da affrontare nella migrazione da monolite a miniserviziLe 7 sfide da affrontare nella migrazione da monolite a miniservizi
Le 7 sfide da affrontare nella migrazione da monolite a miniservizi
 
Microsoft Fast - Overview
Microsoft Fast - OverviewMicrosoft Fast - Overview
Microsoft Fast - Overview
 
Exploring VS Code
Exploring VS CodeExploring VS Code
Exploring VS Code
 
DSTORIE DALLA TRINCEA: TEAM FOUNDATION SERVER IN CASI LIMITE E NON SOLO...
DSTORIE DALLA TRINCEA: TEAM FOUNDATION SERVER IN CASI LIMITE E NON SOLO...DSTORIE DALLA TRINCEA: TEAM FOUNDATION SERVER IN CASI LIMITE E NON SOLO...
DSTORIE DALLA TRINCEA: TEAM FOUNDATION SERVER IN CASI LIMITE E NON SOLO...
 
Webcast - Introduzione a Visual Studio Online
Webcast - Introduzione a Visual Studio OnlineWebcast - Introduzione a Visual Studio Online
Webcast - Introduzione a Visual Studio Online
 
Visual Studio Release Management - una nuova Weltanschauung o un'evoluzione n...
Visual Studio Release Management - una nuova Weltanschauung o un'evoluzione n...Visual Studio Release Management - una nuova Weltanschauung o un'evoluzione n...
Visual Studio Release Management - una nuova Weltanschauung o un'evoluzione n...
 
Code Generation con i templates T4 in visual studio
Code Generation con i templates T4 in visual studioCode Generation con i templates T4 in visual studio
Code Generation con i templates T4 in visual studio
 
Progettare applicazioni con il modeling project di Visual Studio 2010
Progettare applicazioni con il modeling project di Visual Studio 2010Progettare applicazioni con il modeling project di Visual Studio 2010
Progettare applicazioni con il modeling project di Visual Studio 2010
 
VMUG.IT @ ITway Campus 2014
VMUG.IT @ ITway Campus 2014VMUG.IT @ ITway Campus 2014
VMUG.IT @ ITway Campus 2014
 
Debugging with-z-ray
Debugging with-z-rayDebugging with-z-ray
Debugging with-z-ray
 
Alfresco Day Roma 2015: TAI
Alfresco Day Roma 2015: TAIAlfresco Day Roma 2015: TAI
Alfresco Day Roma 2015: TAI
 
Entity Framework 7, Back To The Future!
Entity Framework 7, Back To The Future!Entity Framework 7, Back To The Future!
Entity Framework 7, Back To The Future!
 
Drupal7
Drupal7Drupal7
Drupal7
 
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLDTYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
 
Slide typescript - net campus
Slide typescript - net campusSlide typescript - net campus
Slide typescript - net campus
 

Branching & Merging strategies (with TFS)

  • 1. Branching & Merging strategies (with TFS) 28 Aprile 2016 Sponsored by Come accelerare i tuoi rilasci a costo zero
  • 3. Presentazione • Igor Antonacci • DevOps Engineer & System Architect @ Fresenius Medical Care • Co-Fondatore di DotDotNet e GetLatestVersion.it • Twitter: @bitbreaker • Facebook: fb.me/igorantonacci • Email: igor@igorantonacci.me
  • 4. Agenda • Introduzione • Nomenclatura • Perchè ...Strategies – «Sto adottando la strategia giusta per il mio prodotto / Team / ciclo di sviluppo?» • Strategy #1 – Main Only • Strategy #2 – Release Isolation • Strategy #3 – Development Isolation • Strategy #4 – Development and Release Isolation • Strategy #5 – Servicing and Release Isolation • Strategy #6 – Servicing, Hotfix and Release Isolation • Strategy #7 – Feature Isolation • Strategy #8 – Code Promotion • Branching and Merging Anti-Patterns • Conclusioni • Reference
  • 5. Introduzione – 1 Context • Centralized Source Control – TFVC SOLO come esempio • Team con più di un membro (2 è sufficiente) • Prodotto/i (Software) da consegnare (artifacts)
  • 6. Gli Attori Team members Project Da consegnare in tempo! Utenti FELICI! Codebase Team
  • 7. Problematica da risolvere • Processo di sviluppo consolidato • Design  Sviluppo  Test  Deploy • Uno o più Prodotti Software • Versioni differenti (prossima, in rilascio, in manutenzione) • Clienti diversi / diverse personalizzazioni • Uno o più Team • «allocati» su Feature / Versioni differenti • UNICA CODEBASE NON ESISTE ALCUNO studio indipendente sulla correlazione tra Processo di Sviluppo e Metodologia di Branching
  • 8. Perchè ...Strategies • Approccio empirico al problema • Attaccare il «nemico» facendoci il meno male possibile La strategia si applica a tutti i campi in cui per raggiungere l'obiettivo sono necessarie una serie di operazioni separate, la cui scelta non è unica e/o il cui esito è incerto. (cit. Wikipedia – Strategia)
  • 9. Goal • Gestire il lavoro concorrente di UNO o più Team sulla stessa codebase • Isolare il rischio introdotto da diversi insiemi di modifiche alla codebase • Fare delle istantanee della codebase al fine di gestire successivi cambiamenti isolati (es. Branch per Release, Personalizzazioni ecc.)
  • 10. Nomenclatura Termine Descrizione Development Branch Branch che contiene i cambiamenti (alla codebase) per la prossima versione Forward Integrate (FI) Merge da un ramo padre ad uno figlio Reverse Integrate (RI) Merge da un ramo figlio ad uno padre Hotfix Cambiamento necessario a riparare un bug «bloccante» o un problema che impatta l’intero sistema. Main Branch E’ il branch «che congiunge» il ramo di sviluppo con quello di rilascio. Release Branch Branch dove confluirà il codice in preparazione per una specifica versione Release Vehicle Il modo in cui il prodotto viene «rilasciato» al cliente (Hotfix, Major Release, Service Pack etc.) Service Pack (SP) Un insieme di hotfix e funzionalità per una versione precedente del prodotto
  • 11. Strategy #1 – Main Only
  • 12. Strategy #2 – Release Isolation
  • 13. Strategy #3 – Development Isolation
  • 14. Strategy #4 – Development and Release Isolation
  • 15. Strategy #5 – Servicing and Release Isolation
  • 16. Strategy #6 – Servicing, Hotfix and Release Isolation
  • 17. Strategy #7 – Feature Isolation
  • 18. Strategy #8 – Code Promotion
  • 19. Branching and Merging Anti-Patterns • Merge Paranoia – evitare di fare Merge a tutti i costi • Merge Mania – Merge, Merge, Merge … come se piovesse  • Big Bang Merge – Merge UNA VOLTA per «TUTTI» alla fine della fase di sviluppo • Never-ending Merge - Merge continuo… • Wrong-way merge – Fare il Merge di una feature sul ramo di una versione PRECEDENTE • Branch-mania – come Merge-mania, ma per il Branch • Cascading Branches – Branch che non confluiscono mai nel branch padre • Mysterious Branches – Branch … e perché?  • Temporary Branches – Branch effettuato per un cambiamento … ma che poi diventa un workspace permanente • Volatile Branches – Branch di uno o più Changeset anche se si trovano in uno stato unstable • Development Freeze – SU LE MANIIIII • Berlin Wall – Branch per dividere i membri del Team… non il loro lavoro
  • 20. Conclusioni • L’adozione di una Branching Strategy è NECESSARIA all’interno di un Team • La scelta della corretta Strategy non è sempre facile e non avviene sempre al «primo colpo» • Ogni Business / Dev Process ha delle caratteristiche uniche  Create la Vs. Strategy … cum grano salis (cit.)
  • 21. Reference • Visual Studio ALM Rangers – Branching Strategies (https://vsarbranchingguide.codeplex.com/) • Branching Taxonomy – MS Research (http://research.microsoft.com/apps/pubs/?id=209683 ) • Defining Your Branching and Merging Strategy (https://msdn.microsoft.com/en-us/library/bb668955.aspx) • Branch Folders and Files (https://msdn.microsoft.com/en-us/library/ms181425(VS.110).aspx )