45
2016 Rangle.io 129 Spadina Ave., Suite 600 Toronto, ON M5V 2L3 Canada +1 (416) 737-1555 [email protected] Fixing Continuous Delivery for Mobile Nick van Weerdenburg Founder / CEO rangle.io @n1cholasv @rangleio Twitter:

Fixing Continuous Delivery for Mobile

Embed Size (px)

Citation preview

Page 1: Fixing Continuous Delivery for Mobile

2016

Rangle.io 129 Spadina Ave., Suite 600

Toronto, ON M5V 2L3 Canada

+1 (416) 737-1555

[email protected]

Fixing Continuous Delivery for MobileNick van WeerdenburgFounder / CEO

rangle.io

@n1cholasv

@rangleio

Twitter:

Page 2: Fixing Continuous Delivery for Mobile

Continuous Integration

Continuous Delivery

Continuous Deployment

what is continuous delivery?

Page 3: Fixing Continuous Delivery for Mobile

“Build” multiple days times per day / after every merge.

Add unit tests, linting, beautification, etc.

Linked together with a tools such as Gulp.

Many solutions. We like CircleCI.

Why? To keep master “clean” and “working”.

continuous integration

Page 4: Fixing Continuous Delivery for Mobile

Producing something of value* at frequent intervals.

Keeping master deployable.

continuous delivery

Page 5: Fixing Continuous Delivery for Mobile

Actually deploying “deployable” code.

Can be tricky on the backend, easy for the front end…excluding mobile apps.

continuous deployment

Page 6: Fixing Continuous Delivery for Mobile

Why Do Continuous Deployment?

Page 7: Fixing Continuous Delivery for Mobile

continuous deployment = better Agile

CD Agile

Page 8: Fixing Continuous Delivery for Mobile

Build what is actually needed.

discuss working software

focus on what's next

ruthlessly prioritize

Avoid work in progress.

Save Money

Realize ROI and learning earlier

Deliver 80% of the value with 20% of the effort.

Like Agile, it helps…

Page 9: Fixing Continuous Delivery for Mobile

Deliver Early for Value and/or Learning

Image by xoque

Lean towards learning

(lean startup)

Lean towards tangible

value(classic scrum)

Page 10: Fixing Continuous Delivery for Mobile

Good user stories/feature slicing

Limit WIP

Reduce cycle time

How to Achieve CD In General?

Page 11: Fixing Continuous Delivery for Mobile

Buggy Software = Work in Process

Page 12: Fixing Continuous Delivery for Mobile

Deferred Bug Fixing Costs More

Page 13: Fixing Continuous Delivery for Mobile

Ergo, leaving testing to testers is often problematic.

Effectively, you end up with a mini-waterfall inside the iteration.

We aim for truly continuous delivery, where every merge is deployable.

So, how do you approach testing?

Short answer: testing is everyone’s job.

This raises the urgency of deploying your software.

Again… Deferred Bug Fixing Costs More

Page 14: Fixing Continuous Delivery for Mobile

Rangle Flow

Page 15: Fixing Continuous Delivery for Mobile

Cycle time

WIP

If these are high, debug the process.

How to Measure if CD is Working

Page 16: Fixing Continuous Delivery for Mobile

Issues that Arise

Page 17: Fixing Continuous Delivery for Mobile

Handoffs driving Rework

Design Development

TestingFeedback

Page 18: Fixing Continuous Delivery for Mobile

Life of A Pull Request

Testing is one of the biggest lags

Design too, often due to regressions found during development.

Access to running code on device is essential.

Cost of fixing bugs?

The impact of PRs stacking is massive.

UX Design Dev Design Test

Page 19: Fixing Continuous Delivery for Mobile

Solution

Page 20: Fixing Continuous Delivery for Mobile

Designer works with the team

Pair designing as well as pair programming when friction occurs

Relentlessly measure WIP and Cycle Time and fix issues

expect team to need time to ramp up

automate everything

understand the value (tacit knowledge)

Solutions in the Team

Page 21: Fixing Continuous Delivery for Mobile

PRs need to be closed in < x hrs

What is x? It depends on when you feel friction or pain

WIP goes up? It usually means PRs not being closed

This results in more development against slightly different codebases

This means more regressions

So…

Solutions in the CD Pipeline

Page 22: Fixing Continuous Delivery for Mobile

Define

PrepareMinutes Count

Page 23: Fixing Continuous Delivery for Mobile

Builds take time

Deploys take time

Testers can't be immediately available

Massive impact on flow, leading to…

Bigger PRs

Longer PRs

More regressions, more testing

But…

Page 24: Fixing Continuous Delivery for Mobile

CodePush

Circle CI

Heroku-style PR deploys

deploy different PRs as needed

which enables to…

Our Solution

Page 25: Fixing Continuous Delivery for Mobile

Hot push across dev lifecycle

Page 26: Fixing Continuous Delivery for Mobile

phonegap-plugin-contentsync

Ionic push

nordnet cordova-hot-code-push

Microsoft Code Push

Rangle Cordwood

It’s too much! But we wanted hot push across dev lifecycle.

But…lots of Recent Hot Push Solutions

Page 27: Fixing Continuous Delivery for Mobile

Cordwood

Page 28: Fixing Continuous Delivery for Mobile

CircleCI hooks

Per-PR hot push

client-side UI to pick PRs

deploy once, and presto! On demand device config for testing across the dev. lifecycle

but Cordwood is dead (more later)

Cordwood has…

Page 29: Fixing Continuous Delivery for Mobile
Page 30: Fixing Continuous Delivery for Mobile
Page 31: Fixing Continuous Delivery for Mobile
Page 32: Fixing Continuous Delivery for Mobile
Page 33: Fixing Continuous Delivery for Mobile

Define

PrepareWe killed it.

Page 34: Fixing Continuous Delivery for Mobile

Many options arose at same time so it didn’t make sense to continue

Our goal: a solution that worked across all our JavaScript mobile projects

Lots of Recent Hot Push Solutions

Page 35: Fixing Continuous Delivery for Mobile

CodePush

Page 36: Fixing Continuous Delivery for Mobile

https://microsoft.github.io/code-push/

Handles the push well

No solution for per-PR pushes

Circle-CI, some node scripts, and some API digging solved this.

https://github.com/rangle/code-push-demo

CodePush

Page 37: Fixing Continuous Delivery for Mobile
Page 38: Fixing Continuous Delivery for Mobile

Now in slow motion…

Page 39: Fixing Continuous Delivery for Mobile
Page 40: Fixing Continuous Delivery for Mobile
Page 41: Fixing Continuous Delivery for Mobile
Page 42: Fixing Continuous Delivery for Mobile
Page 43: Fixing Continuous Delivery for Mobile

That’s it!

Q&A

Page 44: Fixing Continuous Delivery for Mobile

https://github.com/rangle/code-push-demo

https://microsoft.github.io/code-push/

Page 45: Fixing Continuous Delivery for Mobile

Thank YouNick van Weerdenburg

[email protected]

@n1cholasv

@rangleio

129 Spadina Ave., Suite 600Toronto, ON M5V 2L3 Canada