creative branching models for multiple release streams

55
MATT SHELTON ENGINEERING MANAGER NUANCE COMMUNICATIONS @MATTSHELTON Creative Branching Models for Multiple Release Streams

Upload: atlassian

Post on 12-Feb-2017

3.863 views

Category:

Software


2 download

TRANSCRIPT

MATT SHELTON • ENGINEERING MANAGER • NUANCE COMMUNICATIONS • @MATTSHELTON

Creative Branching Models for Multiple Release Streams

M AV E N

G I T M I G R AT I O N

S U C C E S S ?

K E Y TA K E AWAY S

Agenda

Git Migration

B R A N C H I N G M O D E L S

W H Y G I T ?

G I T- F L O W

Git Migration

If you don’t like speed, being productive and more reliable coding practices then you shouldn’t use Git.N I C O L A PA O L U C C I , AT L A S S I A N

“”

Tools IntegrationSolid integration with JIRA Software, Bamboo, Crucible is paramount.

AutomationBranch Isolation

The team wanted three things:

Keep developers productive and unblocked while letting the team be flexible about what makes it into a release.

Nothing should be manual if at all possible. The development process should “just work”.

B R A N C H I N G M O D E L S

W H Y G I T ?

G I T- F L O W

Git Migration

A branching what?

Feature

Branching Models

Single Branch

Feature Branching

Master

Master

Branching Models

Continuous

Deliverystaging

release

feature

feature

Branching Models

Product Releases

BitBucket Server

Team

bit.ly/bitbucket-server-branching

feature

feature

master

release/2.3

release/2.2

bugfix

Don’t go it alone!

www.atlassian.com/git/Deeper Dive Coming Soon!

Git Workflows a-la-cartebit.ly/gitalacarte - Summit 2013

Git Microsite

B R A N C H I N G M O D E L S

W H Y G I T ?

G I T- F L O W

Git Migration

We chose git-flow

bit.ly/git-flow-nvie

Git-Flow Extensiongithub.com/nvie/gitflow

Original Post

Git-Flow Branching Model

Master with Active Develop Branch

Master

Develop

2.0

Hotfix Branches

Hotfix

Master

Develop

2.0 2.0.1

Feature Branches

Hotfix

Master

Develop

Feature

2.0 2.0.1

Release Branches

Release

Hotfix

Master

Develop

Feature

2.0 2.0.1 2.1

Support Branches

Release

Hotfix

Master

Develop

Feature

2.0 2.0.1 2.1

ReleaseReleaseRelease

Support

1.9.1 1.9.21.9

Matt… why do you need this?

Maven

B U I L D I S O L AT I O N

D E P E N D E N C Y ! V E R S I O N S !

N O T H I N G I S S I M P L E …

Maven

Project Dependencies

product M product C product B

common

product T

Artifact Repositories

Hotfix

Master

Develop

Feature

Release

Support

NONE - Does Not Build

libs-snapshot

libs-snapshot

NONE - Does Not Build

libs-release

libs-release

libs-release

libs-qa

SNAPSHOT / PRE-RELEASE RELEASE

libs-staging

libs-staging

libs-staging

So what’s the big deal?

Different Product Dev With Shared Common

develop

feature/BA-7

feature/AB-1

common-2.1.0-SNAPSHOT

Artifactory Repository

common-2.1.0-SNAPSHOT.jar

Version Pollution2.1.0-SNAPSHOT

2.1.0-AB-1-SNAPSHOT

2.1.0-AB-7-SNAPSHOT

develop

feature/AB-1

2.1.0-AB-1-SNAPSHOT 2.1.0-AB-7-SNAPSHOT

feature/BA-7

What about automation?

2.1.0-SNAPSHOT

Modify on Branch/Merge2.1.0-SNAPSHOT

2.1.0-SNAPSHOT

2.1.0-AB-1-SNAPSHOT

2.1.0-AB-1-SNAPSHOT

feature/AB-1

develop

Modify on Branch Only2.1.0-SNAPSHOT

2.1.0-SNAPSHOT

2.1.0-AB-1-SNAPSHOT

feature/AB-1

develop

2.1.0-SNAPSHOT

ours

B U I L D I S O L AT I O N

D E P E N D E N C Y ! V E R S I O N S !

N O T H I N G I S S I M P L E …

Maven

libs-snapshot

Artifact Repositories

Hotfix

Master

Develop

Feature

Release

Support

NONE - Does Not Build

libs-snapshot

libs-feature/${git.branch}

NONE - Does Not Build

libs-release

libs-release

libs-release

libs-qa

RELEASESNAPSHOT / PRE-RELEASE

libs-staging

libs-staging

libs-staging

Matt! That sounds so simple!

B U I L D I S O L AT I O N

D E P E N D E N C Y ! V E R S I O N S !

N O T H I N G I S S I M P L E …

Maven

© 2002 Warner Brothers via giphy

That plugin was our last hope.No. There is another.M E ( N O T S TA R WA R S )

“”

© 2006 Laney Griner via memeurl

Open Source?

Success?

Git-Flow + Support Branch

Release

Hotfix

Master

Develop

Feature

ReleaseReleaseRelease

Support

W O R K F L O W I N E F F I C I E N C I E S

G R E AT S T U F F

Success!

Create in JIRA Software

Branches are easy!

Pull, Checkout, Work!

Bamboo Branch Detection

The Tools Work Well Together

Code Reviews

HipChat AlertsJIRA ties all of the other tools together for one view

All feature builds in one plan

Feature branches discovered when they are created

Team can review in Crucible

Build failures and feature branch creation alerts keep team on top of their status

Merge Sanity Check

Pull Requests

Developer Gate

Most pull-requests are approved quickly since code has been approved

Approver can quickly review the diff to make sure it lines up with their understanding.

New teams, click-happy folks, etc.

W O R K F L O W I N E F F I C I E N C I E S

G R E AT S T U F F

Success!

Create in JIRA Software

Branching is Repetitive

Pull, Checkout, Work!Once you’re done branching, anyway…

Create in JIRA SoftwareCreate in JIRA SoftwareCreate in JIRA Software

Branch Name MattersExtension is purposefully picky

Each project’s artifacts need to be in the same branch-repository

Where are my builds?

Extra Clicks To See All Builds

Empty Plans Required

Some build plans only run branch builds which are not displayed immediately.

The “master” branch build plans require an empty plan that does nothing.

Key Takeaways

For Product Release Branching, git-flow

is great!

Maven is a tough adversary, but can be convinced to be

an ally.

Regardless of your branching model,

the tools work well together.

Happy Developers Make Good

Software

Thank you!

MATT SHELTON • ENGINEERING MANAGER • NUANCE COMMUNICATIONS • @MATTSHELTON