SlideShare ist ein Scribd-Unternehmen logo
1 von 29
#DOH17#DOH17
dall'idea al deploy
un lungo viaggio che passa per
GitFlow e SemVer
Mauro Servienti
@mauroservienti
@mauroservienti
#DOH17
3
Organizer & sponsors
GetLatestVersion.it
@mauroservienti
4
DevOps è prima di tutto una
forma mentis.
Gli strumenti sono una conseguenza
@mauroservienti
#DOH17
backlog
La gestione delle «idee»
«In progress»
@mauroservienti
#DOH17
develop
feature/super-segreta
feature/meno-segreta
master
release/1.0.0
@mauroservienti
#DOH17
Assiomi
•develop è sempre rilasciabile come beta
•master è sempre rilasciabile in produzione
@mauroservienti
#DOH17
Supponiamo che…
• Progetto vuoto: v0.0.0
• Feature A: v0.1.0
• Release: v0.1.0
• Feature B e Feature C in parallelo: v?
• Il lavoro in parallelo complica il tener traccia
• Della versione
• Di cosa si è rilasciato
• Della retro-compatibilità
• Con patch e hotfix si complica ancora di più
Introduzione a GitVersion
@mauroservienti
#DOH17
GitVersion
• Assegnare un numero di release è un task da macchina
• non da umano senziente
• Cosa ci impedisce di guardare alla history e
• fare dei ragionamenti sullo stato attuale?
• generare un numero di versione sensato?
• develop -> unstable/beta
• master -> stable/release
• Disponibile come:
• Task di MSBuild
• Library
• Command line
Cosa fa GitVersion per noi
@mauroservienti
#DOH17
gestione della release
develop
feature/super-segreta
feature/meno-segreta
master
release/1.0.0
@mauroservienti
#DOH17
gestione delle nuove feature
• feature/xyz
• Anche nome branch che volete voli
• Pull Request
develop
feature/super-segreta
<intermezzo>
Piccola divagazione
@mauroservienti
#DOH17
Pull Request e Review
• Nulla di diverso dal branch-per-feature tradizionale
• Un sistema basato sui concetti di GitHub introduce
• Pull Request
• Review
• Il nostro flusso diventa quindi:
• Branch -> Lavoro -> Push -> PR -> Review -> Merge
@mauroservienti
#DOH17
PR -> review -> merge
You cannot merge your own PR
• Importantissime in un processo attento alla qualità
• Le review sono la base della condivisione del sapere
• Siccome ci piace automatizzare:
• Introduzione delle build automatiche sulle PR
• Simili ad un gated check-in (per certi versi)
</intermezzo>
Torniamo a noi…
@mauroservienti
#DOH17
gestione delle hotfix/patch
develop
master
hotfix/1.1.1
bug
@mauroservienti
#DOH17
gestione delle hotfix/patch nel passato
develop
master
support/1.0
bug
hotfix/1.0.1
@mauroservienti
#DOH17
Perché siamo così
ossessionati dal
numero di versione?
@mauroservienti
#DOH17
Semantic Versioning
È vitale che una libreria
comunichi le tipologie di
cambiamento tra una
versione e l’altra
@mauroservienti
#DOH17
SemVer: Major.Minor.Patch
• Il numero di versione ha una semantica ben precisa
• Major: la nuova versione contiene breaking changes
• Minor: nuove feature retro-compatibili
• Patch: bug fixing retro-compatibile
• Fondamentale per permettere a chi vi usa di capire cosa succederà
• Soprattutto se aggiorna senza ricompilare, come per le hotfix…
@mauroservienti
#DOH17
senza ricompilare…breaking changes
• Voi usate un mio assembly che contiene:
void Foo() -> int Foo()
enum Bar{ Coffee, Tea } -> enum Bar{ Coffee, Cappuccino, Tea }
void FooBar() -> void FooBar( int arg: 10 )
@mauroservienti
#DOH17
ApprovalTests (salvaci tu)
• Rompe la build se:
• ci sono breaking changes
• non rispettiamo SemVer
• OSS: //github.com/approvals/ApprovalTests.Net
• Tanto semplice quanto scrivere un test:
@mauroservienti
#DOH17
//apicomparer.particular.net/compare/rabbitmq.client/3.4.3...3.5.7
@mauroservienti
#DOH17
Riassumendo
• Se non avete un processo basato su CI non avete un processo
• Continuous Integration è la base della serenità
• GitFlow vi da la possibilità di gestire tutti gli scenari
• Automatizzate tutto l’automatizzabile
• Le persone sono fatte per pensare non per eseguire
• Semantic Versioning è semplicemente buona educazione
• Spingetevi alla paranoia se ne avete bisogno
• ApprovalTests + ApiComparer
#DOH17#DOH17
Mauro Servienti
Solution Architect @ Particular Software
makers of NServiceBus
mauro.servienti@particular.neti
@mauroservienti
//github.com/mauroservienti
#DOH17#DOH17
Grazie!

Weitere ähnliche Inhalte

Ähnlich wie Dall'idea al deploy un lungo viaggio che passa per git flow e semver

Development process
Development processDevelopment process
Development processEmidio Croci
 
Exploring VS Code
Exploring VS CodeExploring VS Code
Exploring VS Codedotnetcode
 
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
 
Corso Python Deltapromo - Lezione 3
Corso Python Deltapromo - Lezione 3Corso Python Deltapromo - Lezione 3
Corso Python Deltapromo - Lezione 3Paolo Ferretti
 
Introduzione a Git e GitLab
Introduzione a Git e GitLabIntroduzione a Git e GitLab
Introduzione a Git e GitLabYefry Figueroa
 
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
 
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
 
Hybrid DevOps Stack
Hybrid DevOps StackHybrid DevOps Stack
Hybrid DevOps StackMatteo Emili
 
Wpc2019 - Distruggere DevOps, la storia di un vero team
Wpc2019 - Distruggere DevOps, la storia di un vero teamWpc2019 - Distruggere DevOps, la storia di un vero team
Wpc2019 - Distruggere DevOps, la storia di un vero teamAlessandro Alpi
 
L’Open Source è davvero gratis?
L’Open Source è davvero gratis?L’Open Source è davvero gratis?
L’Open Source è davvero gratis?Andrea Giannantonio
 
Enabling DevOps for Machine Learning with Azure Pipelines
Enabling DevOps for Machine Learning with Azure PipelinesEnabling DevOps for Machine Learning with Azure Pipelines
Enabling DevOps for Machine Learning with Azure PipelinesLuca Milan
 
Introduzione a Drupal 7 - 14/03/2013
Introduzione a Drupal 7 - 14/03/2013Introduzione a Drupal 7 - 14/03/2013
Introduzione a Drupal 7 - 14/03/2013Alessandro del Gobbo
 
Html5 e css3 nei miei progetti: cosa ho fatto
Html5 e css3 nei miei progetti: cosa ho fattoHtml5 e css3 nei miei progetti: cosa ho fatto
Html5 e css3 nei miei progetti: cosa ho fattoRocco Passaro
 

Ähnlich wie Dall'idea al deploy un lungo viaggio che passa per git flow e semver (20)

Xamarin DevOps
Xamarin DevOpsXamarin DevOps
Xamarin DevOps
 
Development process
Development processDevelopment process
Development process
 
Containerized Liferay
Containerized LiferayContainerized Liferay
Containerized Liferay
 
Exploring VS Code
Exploring VS CodeExploring VS Code
Exploring VS Code
 
Anatomia di un progetto open-source
Anatomia di un progetto open-sourceAnatomia di un progetto open-source
Anatomia di un progetto open-source
 
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)
 
Corso Python Deltapromo - Lezione 3
Corso Python Deltapromo - Lezione 3Corso Python Deltapromo - Lezione 3
Corso Python Deltapromo - Lezione 3
 
Introduzione a Git e GitLab
Introduzione a Git e GitLabIntroduzione a Git e GitLab
Introduzione a Git e GitLab
 
Game matching with SignalR
Game matching with SignalRGame matching with SignalR
Game matching with SignalR
 
Game matching with SignalR
Game matching with SignalRGame matching with SignalR
Game matching with SignalR
 
Wp talk
Wp talkWp talk
Wp talk
 
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
 
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...
 
Azure dev ops meetup one
Azure dev ops meetup oneAzure dev ops meetup one
Azure dev ops meetup one
 
Hybrid DevOps Stack
Hybrid DevOps StackHybrid DevOps Stack
Hybrid DevOps Stack
 
Wpc2019 - Distruggere DevOps, la storia di un vero team
Wpc2019 - Distruggere DevOps, la storia di un vero teamWpc2019 - Distruggere DevOps, la storia di un vero team
Wpc2019 - Distruggere DevOps, la storia di un vero team
 
L’Open Source è davvero gratis?
L’Open Source è davvero gratis?L’Open Source è davvero gratis?
L’Open Source è davvero gratis?
 
Enabling DevOps for Machine Learning with Azure Pipelines
Enabling DevOps for Machine Learning with Azure PipelinesEnabling DevOps for Machine Learning with Azure Pipelines
Enabling DevOps for Machine Learning with Azure Pipelines
 
Introduzione a Drupal 7 - 14/03/2013
Introduzione a Drupal 7 - 14/03/2013Introduzione a Drupal 7 - 14/03/2013
Introduzione a Drupal 7 - 14/03/2013
 
Html5 e css3 nei miei progetti: cosa ho fatto
Html5 e css3 nei miei progetti: cosa ho fattoHtml5 e css3 nei miei progetti: cosa ho fatto
Html5 e css3 nei miei progetti: cosa ho fatto
 

Mehr von Mauro Servienti

Welcome to the (state) machine @ ExploreDDD 2019
Welcome to the (state) machine @ ExploreDDD 2019Welcome to the (state) machine @ ExploreDDD 2019
Welcome to the (state) machine @ ExploreDDD 2019Mauro Servienti
 
Designing a ui for microservices @ .NET Day Switzerland 2019
Designing a ui for microservices @ .NET Day Switzerland 2019Designing a ui for microservices @ .NET Day Switzerland 2019
Designing a ui for microservices @ .NET Day Switzerland 2019Mauro Servienti
 
Welcome to the (state) machine @ Xe One Day Enterprise Applications
Welcome to the (state) machine @ Xe One Day Enterprise ApplicationsWelcome to the (state) machine @ Xe One Day Enterprise Applications
Welcome to the (state) machine @ Xe One Day Enterprise ApplicationsMauro Servienti
 
All our aggregates are wrong @ NDC Copenhagen 2019
All our aggregates are wrong @ NDC Copenhagen 2019All our aggregates are wrong @ NDC Copenhagen 2019
All our aggregates are wrong @ NDC Copenhagen 2019Mauro Servienti
 
Be like water, my friend @ Agile for Innovation 2019
Be like water, my friend @ Agile for Innovation 2019Be like water, my friend @ Agile for Innovation 2019
Be like water, my friend @ Agile for Innovation 2019Mauro Servienti
 
Microservices architecture is it the right choice to design long-living syste...
Microservices architecture is it the right choice to design long-living syste...Microservices architecture is it the right choice to design long-living syste...
Microservices architecture is it the right choice to design long-living syste...Mauro Servienti
 
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019Mauro Servienti
 
Living organizations, particular software @ do IT Better Parma
Living organizations, particular software @ do IT Better ParmaLiving organizations, particular software @ do IT Better Parma
Living organizations, particular software @ do IT Better ParmaMauro Servienti
 
Welcome to the (state) machine @ Crafted Software
Welcome to the (state) machine @ Crafted SoftwareWelcome to the (state) machine @ Crafted Software
Welcome to the (state) machine @ Crafted SoftwareMauro Servienti
 
PO is dead, long live the PO - Italian Agile Day 2018
PO is dead, long live the PO - Italian Agile Day 2018PO is dead, long live the PO - Italian Agile Day 2018
PO is dead, long live the PO - Italian Agile Day 2018Mauro Servienti
 
Design a UI for your Microservices @ Do IT Better
Design a UI for your Microservices @ Do IT BetterDesign a UI for your Microservices @ Do IT Better
Design a UI for your Microservices @ Do IT BetterMauro Servienti
 
Microservices and pineapple on pizza what do they have in common - dos and ...
Microservices and pineapple on pizza   what do they have in common - dos and ...Microservices and pineapple on pizza   what do they have in common - dos and ...
Microservices and pineapple on pizza what do they have in common - dos and ...Mauro Servienti
 
All our aggregates are wrong (ExploreDDD 2018)
All our aggregates are wrong (ExploreDDD 2018)All our aggregates are wrong (ExploreDDD 2018)
All our aggregates are wrong (ExploreDDD 2018)Mauro Servienti
 
Designing a ui for microservices
Designing a ui for microservicesDesigning a ui for microservices
Designing a ui for microservicesMauro Servienti
 
Po is dead, long live the po
Po is dead, long live the poPo is dead, long live the po
Po is dead, long live the poMauro Servienti
 
Shipping code is not the problem, deciding what to ship it is!
Shipping code is not the problem, deciding what to ship it is!Shipping code is not the problem, deciding what to ship it is!
Shipping code is not the problem, deciding what to ship it is!Mauro Servienti
 
GraphQL - Where are you from? Where are you going?
GraphQL - Where are you from? Where are you going?GraphQL - Where are you from? Where are you going?
GraphQL - Where are you from? Where are you going?Mauro Servienti
 
Progettare una UI per i Microservices
Progettare una UI per i MicroservicesProgettare una UI per i Microservices
Progettare una UI per i MicroservicesMauro Servienti
 
The road to a Service Oriented Architecture is paved with messages
The road to a Service Oriented Architecture is paved with messagesThe road to a Service Oriented Architecture is paved with messages
The road to a Service Oriented Architecture is paved with messagesMauro Servienti
 
La via verso SOA è lastricata di messaggi
La via verso SOA è lastricata di messaggiLa via verso SOA è lastricata di messaggi
La via verso SOA è lastricata di messaggiMauro Servienti
 

Mehr von Mauro Servienti (20)

Welcome to the (state) machine @ ExploreDDD 2019
Welcome to the (state) machine @ ExploreDDD 2019Welcome to the (state) machine @ ExploreDDD 2019
Welcome to the (state) machine @ ExploreDDD 2019
 
Designing a ui for microservices @ .NET Day Switzerland 2019
Designing a ui for microservices @ .NET Day Switzerland 2019Designing a ui for microservices @ .NET Day Switzerland 2019
Designing a ui for microservices @ .NET Day Switzerland 2019
 
Welcome to the (state) machine @ Xe One Day Enterprise Applications
Welcome to the (state) machine @ Xe One Day Enterprise ApplicationsWelcome to the (state) machine @ Xe One Day Enterprise Applications
Welcome to the (state) machine @ Xe One Day Enterprise Applications
 
All our aggregates are wrong @ NDC Copenhagen 2019
All our aggregates are wrong @ NDC Copenhagen 2019All our aggregates are wrong @ NDC Copenhagen 2019
All our aggregates are wrong @ NDC Copenhagen 2019
 
Be like water, my friend @ Agile for Innovation 2019
Be like water, my friend @ Agile for Innovation 2019Be like water, my friend @ Agile for Innovation 2019
Be like water, my friend @ Agile for Innovation 2019
 
Microservices architecture is it the right choice to design long-living syste...
Microservices architecture is it the right choice to design long-living syste...Microservices architecture is it the right choice to design long-living syste...
Microservices architecture is it the right choice to design long-living syste...
 
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
 
Living organizations, particular software @ do IT Better Parma
Living organizations, particular software @ do IT Better ParmaLiving organizations, particular software @ do IT Better Parma
Living organizations, particular software @ do IT Better Parma
 
Welcome to the (state) machine @ Crafted Software
Welcome to the (state) machine @ Crafted SoftwareWelcome to the (state) machine @ Crafted Software
Welcome to the (state) machine @ Crafted Software
 
PO is dead, long live the PO - Italian Agile Day 2018
PO is dead, long live the PO - Italian Agile Day 2018PO is dead, long live the PO - Italian Agile Day 2018
PO is dead, long live the PO - Italian Agile Day 2018
 
Design a UI for your Microservices @ Do IT Better
Design a UI for your Microservices @ Do IT BetterDesign a UI for your Microservices @ Do IT Better
Design a UI for your Microservices @ Do IT Better
 
Microservices and pineapple on pizza what do they have in common - dos and ...
Microservices and pineapple on pizza   what do they have in common - dos and ...Microservices and pineapple on pizza   what do they have in common - dos and ...
Microservices and pineapple on pizza what do they have in common - dos and ...
 
All our aggregates are wrong (ExploreDDD 2018)
All our aggregates are wrong (ExploreDDD 2018)All our aggregates are wrong (ExploreDDD 2018)
All our aggregates are wrong (ExploreDDD 2018)
 
Designing a ui for microservices
Designing a ui for microservicesDesigning a ui for microservices
Designing a ui for microservices
 
Po is dead, long live the po
Po is dead, long live the poPo is dead, long live the po
Po is dead, long live the po
 
Shipping code is not the problem, deciding what to ship it is!
Shipping code is not the problem, deciding what to ship it is!Shipping code is not the problem, deciding what to ship it is!
Shipping code is not the problem, deciding what to ship it is!
 
GraphQL - Where are you from? Where are you going?
GraphQL - Where are you from? Where are you going?GraphQL - Where are you from? Where are you going?
GraphQL - Where are you from? Where are you going?
 
Progettare una UI per i Microservices
Progettare una UI per i MicroservicesProgettare una UI per i Microservices
Progettare una UI per i Microservices
 
The road to a Service Oriented Architecture is paved with messages
The road to a Service Oriented Architecture is paved with messagesThe road to a Service Oriented Architecture is paved with messages
The road to a Service Oriented Architecture is paved with messages
 
La via verso SOA è lastricata di messaggi
La via verso SOA è lastricata di messaggiLa via verso SOA è lastricata di messaggi
La via verso SOA è lastricata di messaggi
 

Dall'idea al deploy un lungo viaggio che passa per git flow e semver