e git branching for - eclipsecon 2020...continuous delivery e ^ @devtoolsuperfan sarah goff-dupont...

36

Upload: others

Post on 11-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda
Page 2: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Git Branching for Continuous Delivery

extreme^

Page 3: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

@DevToolSuperFan

Sarah Goff-Dupont

Developer Advocate & Agile Delivery Nerd

not afraid to ham it up in photos

Page 4: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Agenda

Git + CD = BFFs

Branching models

Pointers & pro-tips

1

2

3

Page 5: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Why Git for CD?

Page 6: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Challenge #1: dependencieseasy to navigate, right?

Page 7: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

look Ma, a goat!

I do my thing, too

I do my thing

Challenge #2: code line chaos

Page 8: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Build in narrow vertical slices

DATABASE

BACK END

FRONT END

TESTING

Time

“big bang” launch

DATABASE

BACK END

FRONT END

TESTING

pint-sized release

Page 9: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Branching & merging is a breeze

In Git

Page 10: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Keep the main line clean

dev branch = isolation chamber

Page 11: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Clarity & traceability

Page 12: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Branch-per-Issue Workflow

Page 13: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

sgd-IRKD-30

sgd-IRKD-45

master

A branch for every issue

fortunately, no goats here

Page 14: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

A branch for every issue

master

sgd-IRKD-30

gatekeeper

Page 15: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

A branch for every issuestill no goats!

Page 16: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

sgd-IRKD-30

sgd-IRKD-45

master

Surprise!

Page 17: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

sgd-IRKD-30

sgd-IRKD-45

master

Using an integration branch

integration

Page 18: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

sgd-IRKD-30

sgd-IRKD-45

master

Using an integration branch

integration

Page 19: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Branch-per-Issue Workflow

for installed app teams

Page 20: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

sgd-IRKD-30

master

Multiple-version support

v 1.2

v 1.1

Page 21: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

sgd-IRKD-30

master

Pre-release changes

v 1.2

v 1.1

sgd-IRKD-31

Page 22: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

sgd-IRKD-30

master

Post-release updates

v 1.2

v 1.1bugfix-IRKD-32

Page 23: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

master

Post-release updates

v 1.2

v 1.1

bugfix-IRKD-32

Page 24: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Other “Stuff” to Consider

Page 25: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Running CI on dev branches

all active branches are under test

Page 26: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

1

2

3

Running CI on dev branches

Manually clone master’s CI configs

Automate with plugin or Git hook

bitbucket.org/tpettersen/git-ci-hooks

Page 27: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Running CI on dev branches

Page 28: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Using build power efficiently

sgd-IRKD-30

master

v 1.2

trigger CI with every commit here

push-button builds here

Page 29: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Peer code review

Page 30: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Peer code review

1

2

3

Create request via UI or git request-pull

Review, revise, rinse & repeat

Approve & merge

Page 31: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Take it to the extreme

Let dev branches do the dirty work

1

2

3 Keep master releasable at all times

Reach continuous delivery nirvana4

Build small pieces, end-to-end

Page 32: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

More info at...

1

2

http://atlassian.com/git

@Atlassian

Page 33: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

Q & A

Page 34: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda
Page 35: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda

@DevToolSuperFan

Sarah Goff-Dupont

Developer Advocate & Agile Delivery Nerd

[email protected]

Page 36: e Git Branching for - EclipseCon 2020...Continuous Delivery e ^ @DevToolSuperFan Sarah Goff-Dupont Developer Advocate & Agile Delivery Nerd not afraid to ham it up in photos Agenda