Download - A [git] workflow

Transcript
Page 1: A [git] workflow

Continuous Delivery that doesn't hurt

madrid-rb@madridrb

Sergio Gil@porras

A [git] workflow

Page 2: A [git] workflow

DISCLAIMER I

Esto va más de workflow que de git. Aceptamos mercurial como animal de compañía

Page 3: A [git] workflow

DISCLAIMER II + RETO

Intentar no citar explicitamente un comando de git en toda la charla

Page 4: A [git] workflow
Page 5: A [git] workflow

http://gitimmersion.com/

Page 6: A [git] workflow

yo / nosotros

Page 7: A [git] workflow
Page 8: A [git] workflow

Hacemos productos

Page 9: A [git] workflow

Hacemos productosy los productos duran para siempre

Page 10: A [git] workflow

Nuestros productos son complejos

Page 11: A [git] workflow

Nuestros productos son complejos

Nos encanta el TDD

Page 12: A [git] workflow

Nuestros productos son complejos

Nos encanta el TDDNos encanta el feedback temprano

Page 13: A [git] workflow

Nuestros productos son complejos

Nos encanta el TDDNos encanta el feedback temprano

Siempre probamos en un entorno de staging

Page 14: A [git] workflow

“Máquina de convertir café

en código”

Page 15: A [git] workflow

“Máquina de convertir café

en código”hamburguesas

Page 16: A [git] workflow

“Máquina de convertir café

en código”features

hamburguesas

Page 17: A [git] workflow

“Máquina de convertir café

en código”featuresútiles

hamburguesas

Page 18: A [git] workflow

“Máquina de convertir café

en código”featuresútiles

en producción

hamburguesas

Page 19: A [git] workflow

“Máquina de convertir café

en código”featuresútiles

en producción

hamburguesas

idea implícita: tiempo

Page 20: A [git] workflow

T

U

Feature A en una semana

Feature A en un mes

Page 21: A [git] workflow

Featu

re A

hoy

Featu

re A

en 1

mes

Page 22: A [git] workflow

Feature A hoy

Page 23: A [git] workflow

Feature A hoy

Feature A + B en un mes

Page 24: A [git] workflow

Feature A hoy

Feature A + B en un mes

Feature A hoy + Feature B en un mes

Page 25: A [git] workflow

KANBAN

Page 26: A [git] workflow
Page 27: A [git] workflow

WIP (≤ X)

Page 28: A [git] workflow

master

Page 29: A [git] workflow

Feature A Task 1/3

master

Page 30: A [git] workflow

Feature A Task 1/3

Feature B Task 1/2

master

Page 31: A [git] workflow

Feature A Task 1/3

Feature B Task 1/2

Feature A Task 2/3

master

Page 32: A [git] workflow

Feature A Task 1/3

Feature B Task 1/2

Feature A Task 2/3

Feature B Task 2/2

master

Page 33: A [git] workflow

Feature A Task 1/3

Feature B Task 1/2

Feature A Task 2/3

Feature B Task 2/2B ya está, ¡a desplegar!

master

Page 34: A [git] workflow

Feature A Task 1/3

Feature B Task 1/2

Feature A Task 2/3

Feature B Task 2/2B ya está, ¡a desplegar!

¡NEGATIVO, Señor!A no está lista

master

Page 35: A [git] workflow

Problema del despliegue retrasado que retrasa el despliegue

Page 36: A [git] workflow

Problema del despliegue retrasado que retrasa el despliegue

o

Page 37: A [git] workflow

Problema del despliegue retrasado que retrasa el despliegue

oEspiral de mierda

Page 38: A [git] workflow

Si mientras esperamos que A esté lista empezamos C, ¡el problema

puede durar para siempre!

Problema del despliegue retrasado que retrasa el despliegue

oEspiral de mierda

Page 39: A [git] workflow

¡OK, usemos ramas!

Page 40: A [git] workflow

master

Page 41: A [git] workflow

master

feat_a

Page 42: A [git] workflow

master

feat_afeat_b

Page 43: A [git] workflow

master

feat_afeat_b

Page 44: A [git] workflow

master

feat_afeat_b

Page 45: A [git] workflow

master

feat_afeat_b

➜ staging

Page 46: A [git] workflow

master

feat_afeat_b

➜ staging OK

Page 47: A [git] workflow

master

feat_afeat_b

➜ staging OK ➜ producción

Page 48: A [git] workflow

master

feat_afeat_b

➜ staging OK ➜ producción

Page 49: A [git] workflow

master

feat_afeat_b

➜ staging OK ➜ producción

Page 50: A [git] workflow

master

feat_afeat_b

➜ staging OK

➜ staging

➜ producción

Page 51: A [git] workflow

master

feat_afeat_b

➜ staging OK

➜ staging OK

➜ producción

Page 52: A [git] workflow

master

feat_afeat_b

➜ staging OK

➜ staging OK

➜ producción

➜ producción

Page 53: A [git] workflow

master

Page 54: A [git] workflow

master

feat_a

Page 55: A [git] workflow

master

feat_afeat_b

Page 56: A [git] workflow

master

feat_afeat_b

Page 57: A [git] workflow

master

feat_afeat_b

Page 58: A [git] workflow

master

feat_afeat_b

➜ staging

Page 59: A [git] workflow

master

feat_afeat_b

➜ staging FAIL

Page 60: A [git] workflow

master

feat_afeat_b

➜ staging FAIL

Page 61: A [git] workflow

master

feat_afeat_b

➜ staging FAIL

Page 62: A [git] workflow

master

feat_afeat_b

➜ staging FAIL

Page 63: A [git] workflow

master

feat_afeat_b

➜ staging FAIL

➜ staging

Page 64: A [git] workflow

master

feat_afeat_b

➜ staging FAIL

➜ staging OK

Page 65: A [git] workflow

master

feat_afeat_b

➜ staging FAIL

➜ staging OK ➜ producción

Page 66: A [git] workflow

master

feat_afeat_b

➜ staging FAIL

➜ staging OK ➜ producción

¡NO!

Page 67: A [git] workflow

master

feat_afeat_b

➜ staging FAIL

➜ staging OK ➜ producción

¡NO! la feature A está rota

Page 68: A [git] workflow

stablemaster

Page 69: A [git] workflow

stable

feat_a

master

Page 70: A [git] workflow

stable

feat_afeat_b

master

Page 71: A [git] workflow

stable

feat_afeat_b

master

Page 72: A [git] workflow

stable

feat_afeat_b

master

Page 73: A [git] workflow

stable

feat_afeat_b

➜ staging

master

Page 74: A [git] workflow

stable

feat_afeat_b

➜ staging

master

FAIL

Page 75: A [git] workflow

stable

feat_afeat_b

➜ staging

master

FAIL

Page 76: A [git] workflow

stable

feat_afeat_b

➜ staging

master

FAIL

Page 77: A [git] workflow

stable

feat_afeat_b

➜ staging

➜ staging

master

FAIL

Page 78: A [git] workflow

stable

feat_afeat_b

➜ staging

➜ stagingOK

master

FAIL

Page 79: A [git] workflow

stable

feat_afeat_b

➜ staging

➜ stagingOK

master

FAIL

Page 80: A [git] workflow

stable

feat_afeat_b

➜ staging

➜ stagingOK

➜ producción

master

FAIL

Page 81: A [git] workflow

stable

feat_afeat_b

➜ staging

➜ stagingOK

➜ producción

master

FAIL

feat_c

Page 82: A [git] workflow

stable

feat_afeat_b

➜ staging

➜ stagingOK

➜ producción

master

FAIL

feat_c

Page 83: A [git] workflow

stable

feat_afeat_b

➜ staging

➜ stagingOK

➜ producción

master

FAIL

feat_c

Page 84: A [git] workflow

stable

feat_afeat_b

➜ staging

➜ stagingOK

➜ producción

master

FAIL

➜ staging

feat_c

Page 85: A [git] workflow

stable

feat_afeat_b

➜ staging

➜ stagingOK

➜ producción

master

FAIL

➜ stagingOK

feat_c

Page 86: A [git] workflow

stable

feat_afeat_b

➜ staging

➜ stagingOK

➜ producción

master

FAIL

➜ stagingOK

feat_c

Page 87: A [git] workflow

stable

feat_afeat_b

➜ staging

➜ stagingOK

➜ producción

➜ producción

master

FAIL

➜ stagingOK

feat_c

Page 88: A [git] workflow
Page 89: A [git] workflow
Page 90: A [git] workflow

BONUS POINTS & PRO TIPS

Page 91: A [git] workflow

BONUS POINTS & PRO TIPS

recuerda publicar topic branches

Page 92: A [git] workflow

BONUS POINTS & PRO TIPS

recuerda publicar topic branchestaguea tus releases

Page 93: A [git] workflow

BONUS POINTS & PRO TIPS

recuerda publicar topic branchestaguea tus releases

rebasa tus ramas privadas sobre stable

Page 94: A [git] workflow

BONUS POINTS & PRO TIPS

recuerda publicar topic branchestaguea tus releases

rebasa tus ramas privadas sobre stablenunca rebases o enmiendes commits publicados

Page 95: A [git] workflow

BONUS POINTS & PRO TIPS

recuerda publicar topic branchestaguea tus releases

rebasa tus ramas privadas sobre stablenunca rebases o enmiendes commits publicados

--no-ff para una historia detallada

Page 96: A [git] workflow

BONUS POINTS & PRO TIPS

recuerda publicar topic branchestaguea tus releases

rebasa tus ramas privadas sobre stablenunca rebases o enmiendes commits publicados

--no-ff para una historia detalladareset: corte por donde tenga que cortar

Page 97: A [git] workflow

PROBLEMAS

Page 98: A [git] workflow

PROBLEMAS

A veces la integración da trabajo

Page 99: A [git] workflow

PROBLEMAS

Escala mal tanto en horizontal como en vertical

A veces la integración da trabajo

Page 100: A [git] workflow

PROBLEMAS

Escala mal tanto en horizontal como en vertical

A veces la integración da trabajo

WIN

Page 101: A [git] workflow

gracias

madrid-rb@madridrb

Sergio Gil@porras