scm ágil – integración continua vs controlada – the raise of dvcs

63

Upload: agile-spain

Post on 01-Jun-2015

675 views

Category:

Documents


3 download

DESCRIPTION

Pablo Santos

TRANSCRIPT

Page 1: SCM ágil – integración continua vs controlada – the raise of DVCS
Page 2: SCM ágil – integración continua vs controlada – the raise of DVCS

Integración continua vs controlada

pablo santos luaces

@psluaces

@plasticscm

Page 3: SCM ágil – integración continua vs controlada – the raise of DVCS

Sobre mi• Plastic SCM - founder• Coder• Blog writer… (a ratos) ;)

@psluaces

Page 4: SCM ágil – integración continua vs controlada – the raise of DVCS

En el show de hoy…• La guerra de la integración

• Qué método es más «agile»?

Page 5: SCM ágil – integración continua vs controlada – the raise of DVCS

Hay una guerra ahí fuera

Page 6: SCM ágil – integración continua vs controlada – the raise of DVCS

Y hay que elegir un bando

Page 7: SCM ágil – integración continua vs controlada – the raise of DVCS

Una guerra ahí fuera

Page 8: SCM ágil – integración continua vs controlada – the raise of DVCS

Una guerra … de bandos… ;)

Page 9: SCM ágil – integración continua vs controlada – the raise of DVCS

De opciones

Page 10: SCM ágil – integración continua vs controlada – the raise of DVCS

Las opciones son• Integración continua

• Integración controlada

Page 11: SCM ágil – integración continua vs controlada – the raise of DVCS

Las opciones son• Integración continua (piedra angular de agile)

• Integración controlada

Page 12: SCM ágil – integración continua vs controlada – the raise of DVCS

Las opciones son• Integración continua != integración constante (!)

• Integración controlada

Page 13: SCM ágil – integración continua vs controlada – the raise of DVCS

Pero antes un paso atrás…

SCM es importante en «agile» porque:• Collective code ownership• Continuous Integration• Mapeo entre tareas y código• Coordinación del equipo

Page 14: SCM ágil – integración continua vs controlada – the raise of DVCS

Qué es «mainline» development?• Trabajar en una única rama…

Page 15: SCM ágil – integración continua vs controlada – the raise of DVCS

Qué es «mainline» development?• Trabajar en una única rama…

• ¿Es bueno?

Page 16: SCM ágil – integración continua vs controlada – the raise of DVCS

Qué es «mainline» development?• Trabajar en una única rama…

• ¿Es bueno?

• Sí, si no hay otra opción … :P

Page 17: SCM ágil – integración continua vs controlada – the raise of DVCS

¿Cómo reconocer «mainline»?• Fácil… sólo hay una rama…

0

Page 18: SCM ágil – integración continua vs controlada – the raise of DVCS

¿Cómo reconocer «mainline»?• Fácil… sólo hay una rama…

Page 19: SCM ágil – integración continua vs controlada – the raise of DVCS

¿Cómo reconocer «mainline»?• Fácil… sólo hay una rama…

Page 20: SCM ágil – integración continua vs controlada – the raise of DVCS

¿Cómo reconocer «mainline»?• Fácil… sólo hay una rama…

Page 21: SCM ágil – integración continua vs controlada – the raise of DVCS

¿Cómo reconocer «mainline»?• Fácil… sólo hay una rama…

Page 22: SCM ágil – integración continua vs controlada – the raise of DVCS

¿Cómo reconocer «mainline»?• Si tu desarrollo tiene esta pinta… es lineal,

mainline, no paralelo!

Page 23: SCM ágil – integración continua vs controlada – the raise of DVCS

Esto es desarrollo lineal

Page 24: SCM ágil – integración continua vs controlada – the raise of DVCS

Y esto es desarrollo paralelo

Page 25: SCM ágil – integración continua vs controlada – the raise of DVCS

Si no hay ramas… no es paralelo

Page 26: SCM ágil – integración continua vs controlada – the raise of DVCS

Refuerzo positivo…

Page 27: SCM ágil – integración continua vs controlada – the raise of DVCS

La batalla entre diferentes visiones

Page 28: SCM ágil – integración continua vs controlada – the raise of DVCS

De dónde viene todo esto?

Page 29: SCM ágil – integración continua vs controlada – the raise of DVCS

Ventajas del desarrollo paralelo• Romper la dependencia de tareas

Page 30: SCM ágil – integración continua vs controlada – the raise of DVCS

Ventajas del desarrollo paralelo• Romper la dependencia de tareas

Page 31: SCM ágil – integración continua vs controlada – the raise of DVCS

Ventajas del desarrollo paralelo• Puntos de partida conocidos – do not shoot a moving target!!!

Page 32: SCM ágil – integración continua vs controlada – the raise of DVCS

Ventajas del desarrollo paralelo• Puntos de partida conocidos

Page 33: SCM ágil – integración continua vs controlada – the raise of DVCS

Ventajas del desarrollo paralelo• Reforzar la creación de baselines estables

Page 34: SCM ágil – integración continua vs controlada – the raise of DVCS

Ventajas del desarrollo paralelo• Código siempre bajo control

Page 35: SCM ágil – integración continua vs controlada – the raise of DVCS
Page 36: SCM ágil – integración continua vs controlada – the raise of DVCS

Ventajas del desarrollo paralelo• Detener la «bug spreading»

Page 37: SCM ágil – integración continua vs controlada – the raise of DVCS

Ventajas del desarrollo paralelo• Detener la «bug spreading»

Page 38: SCM ágil – integración continua vs controlada – the raise of DVCS

Ventajas del desarrollo paralelo• Trazabilidad mejorada

Page 39: SCM ágil – integración continua vs controlada – the raise of DVCS

Ventajas del desarrollo paralelo• Keep the mainline … pristine

Page 40: SCM ágil – integración continua vs controlada – the raise of DVCS
Page 41: SCM ágil – integración continua vs controlada – the raise of DVCS

Integración continua – mainline glorificado

• The «poorman’s approach»

Page 42: SCM ágil – integración continua vs controlada – the raise of DVCS

Refuerzo positivo…

Page 43: SCM ágil – integración continua vs controlada – the raise of DVCS

Lo opuesto solía ser «big bang»

Page 44: SCM ágil – integración continua vs controlada – the raise of DVCS

Lo opuesto solía ser «big bang»

Page 45: SCM ágil – integración continua vs controlada – the raise of DVCS

Y para arreglarlo, integración frecuente

Page 46: SCM ágil – integración continua vs controlada – the raise of DVCS

El futuro de CI• How can builds get faster?

• How can broken builds be prevented?

http://codicesoftware.blogspot.com/2008/03/continuous-integration-future.html

Page 47: SCM ágil – integración continua vs controlada – the raise of DVCS

El futuro de CI

Page 48: SCM ágil – integración continua vs controlada – the raise of DVCS

El futuro de CI

Page 49: SCM ágil – integración continua vs controlada – the raise of DVCS
Page 50: SCM ágil – integración continua vs controlada – the raise of DVCS
Page 51: SCM ágil – integración continua vs controlada – the raise of DVCS

Feature branches

Page 52: SCM ágil – integración continua vs controlada – the raise of DVCS

¿Qué es una tarea?• ¿Usáis un issue tracker?• Cada entrada en el issue tracker

Nota: las tareas son cortas…http://www.plasticscm.com/infocenter/quick-start/intro-task-driven-development.aspx

Page 53: SCM ágil – integración continua vs controlada – the raise of DVCS

Integración controlada

http://drdobbs.com/architecture-and-design/205917960

Page 54: SCM ágil – integración continua vs controlada – the raise of DVCS

main line

task 1140

task 1120

task 1121

baseline

Developer

baseline

Developer

task 1129

rebased

ReleaseEngineer

ReleaseEngineer

Integration Server For each taskto check whether it isvalid or not

Alternativas de integración

• El integrador hace merge• El integrador ejecuta tests• El integrador empaqueta y etiqueta

Page 55: SCM ágil – integración continua vs controlada – the raise of DVCS

main line

task 1140

task 1120

task 1121

baseline

Developer

baseline

Developer

task 1129

rebased

ReleaseEngineer

Integration Server

Integration is just labelling and packing and running specific integration tests

Alternativas• Los desarrolladores hacen merge y ejecutan tests• El integrador empaqueta y etiqueta…• Evita mini-big-bangs• Recorta tiempos de compilación

Page 56: SCM ágil – integración continua vs controlada – the raise of DVCS

main line

task 1140

task 1120

task 1121

baseline

Developer

baseline

Developer

task 1129

rebased

ReleaseEngineer

Integration Server

Integration is just promoting, labelling and packing and running specific integration tests

integration linePr

omot

e to

the

mai

nlin

e

Alternativas de integración

• Desarrolladores hacen merge y ejecutan tests• La línea principal se mantiene limpia

Page 57: SCM ágil – integración continua vs controlada – the raise of DVCS

En el mundo distribuido – integration manager workflow

1. The project maintainer pushes to their public repository.

2. A contributor clones that repository and makes changes.

3. The contributor pushes to their own public copy.

4. The contributor sends the maintainer an e-mail asking them to pull changes.

5. The maintainer adds the contributor’s repo as a remote and merges locally.

6. The maintainer pushes merged changes to the main repository.

Page 58: SCM ágil – integración continua vs controlada – the raise of DVCS

Dictator…

1. Regular developers work on their topic branch and rebase their work on top of master. The master branch is that of the dictator.

2. Lieutenants merge the developers’ topic branches into their master branch.

3. The dictator merges the lieutenants’ master branches into the dictator’s master branch.

4. The dictator pushes their master to the reference repository so the other developers can rebase on it.

Page 59: SCM ágil – integración continua vs controlada – the raise of DVCS

Distributed branch per task

Page 60: SCM ágil – integración continua vs controlada – the raise of DVCS
Page 61: SCM ágil – integración continua vs controlada – the raise of DVCS

Conclusión - Alternativas

Page 62: SCM ágil – integración continua vs controlada – the raise of DVCS

Conclusión – Que no te limite

tu SCM

Page 63: SCM ágil – integración continua vs controlada – the raise of DVCS

pablo santos luaces@psluaces

@plasticscm