controlling technical debt with continuous delivery

49
@raquelpau @alexsotob #Voxxed Controlling Technical Debt with Continuous Delivery Raquel Pau - Alex Soto WalkMod - RedHat

Upload: walkmod

Post on 11-Apr-2017

123 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Controlling Technical Debt with Continuous Delivery

@raquelpau @alexsotob#Voxxed

Controlling Technical Debt with Continuous Delivery

Raquel Pau - Alex Soto WalkMod - RedHat

Page 2: Controlling Technical Debt with Continuous Delivery

W A L K M O D F O U N D E R

B E S T P R A C T I C E S E N T H U S I A S T

@ R A Q U E L PA U

R A Q U E L PA U

Page 3: Controlling Technical Debt with Continuous Delivery

R E D H AT E N G I N E E R

O P E N S O U R C E A D V O C AT E

@ A L E X S O T O B

A L E X S O T O

Page 4: Controlling Technical Debt with Continuous Delivery

Q U E S T I O N S

Page 5: Controlling Technical Debt with Continuous Delivery

S O F T WA R E I S E AT I N G T H E W O R L D

Page 6: Controlling Technical Debt with Continuous Delivery
Page 7: Controlling Technical Debt with Continuous Delivery
Page 8: Controlling Technical Debt with Continuous Delivery

FASTERSOONERBETTER

Page 9: Controlling Technical Debt with Continuous Delivery

W H AT I S C O N T I N U O U S D E L I V E RY ?

Page 10: Controlling Technical Debt with Continuous Delivery

D E L I V E R B U S I N E S S VA L U E M O R E F R E Q U E N T LY

Page 11: Controlling Technical Debt with Continuous Delivery
Page 12: Controlling Technical Debt with Continuous Delivery

O R C H E S T R AT I N G T H E B U I L D

Page 13: Controlling Technical Debt with Continuous Delivery
Page 14: Controlling Technical Debt with Continuous Delivery
Page 15: Controlling Technical Debt with Continuous Delivery
Page 16: Controlling Technical Debt with Continuous Delivery

M I C R O S E R V I C E S A N D

C O N T I N U O U S D E L I V E RY

Page 17: Controlling Technical Debt with Continuous Delivery
Page 18: Controlling Technical Debt with Continuous Delivery

N O M O R E J O B S P L E A S E

Page 19: Controlling Technical Debt with Continuous Delivery

P I P E L I N E A S C O D E

Page 20: Controlling Technical Debt with Continuous Delivery

F E AT U R E S O F P I P E L I N E E C O S Y S T E M

Configuration in Source Repository

Less click-and-type, more code

From simple to complex

Survives Jenkins restarts & connection losses

Reusable definitions

Build history/trend segregated per branches

Page 21: Controlling Technical Debt with Continuous Delivery

pipeline { agent any stages { stage('Test') { steps { sh './gradlew check' } } } post { always { junit 'build/reports/**/*.xml' } } }

Page 22: Controlling Technical Debt with Continuous Delivery

pipeline { agent { docker { image 'maven:3-alpine' args '-v "$PWD":/usr/src/mymaven -w /usr/src/mymaven’ } } stages { stage('Example Build') { steps { sh 'mvn -B clean verify' } } } }

Page 23: Controlling Technical Debt with Continuous Delivery

stage('Deploy - Staging') { steps { sh './deploy staging' sh './run-smoke-tests' } } post { (TODO test) failure { mail to: '[email protected]', subject: "Failed Pipeline: ${currentBuild.fullDisplayName}", body: "Somethig is wrong with ${env.BUILD_URL}" } }

stage('Sanity check') { steps { input "Does the staging environment look ok?" } }

Page 24: Controlling Technical Debt with Continuous Delivery
Page 25: Controlling Technical Debt with Continuous Delivery

T W O - P I Z Z A T E A M S

Page 26: Controlling Technical Debt with Continuous Delivery
Page 27: Controlling Technical Debt with Continuous Delivery

Fabric 8: Features

Create Build

Release Runtime Manage

Feedback Platform

wizards to create microservices packaging into multiple container images rolling upgrades across teams environments service discovery, scaling, failover, load balancing centralise logs, metrics, alerts, tracing, circuit breaker dashboards and metrics to get feedback on premise, public or hybrid cloud

Page 28: Controlling Technical Debt with Continuous Delivery

D I V E R S I F I E D T E A M S

Page 29: Controlling Technical Debt with Continuous Delivery

A N D O N E D AY… T E C H N I C A L D E B T S TA RT E D

Page 30: Controlling Technical Debt with Continuous Delivery

T O R E D U C E D E B T W E N E E D

M E T R I C S A N D T O O L S

Page 31: Controlling Technical Debt with Continuous Delivery
Page 32: Controlling Technical Debt with Continuous Delivery

feature#1234

feature#1354

C O N T I N U O U S I N S P E C T I O N

Page 33: Controlling Technical Debt with Continuous Delivery

@SupressWarnings(“PMD”) mvn pmd:check

Page 34: Controlling Technical Debt with Continuous Delivery
Page 35: Controlling Technical Debt with Continuous Delivery

M A N Y C O D I N G S T Y L E R U L E S A R E A U T O M AT I C A L LY F I X E A B L E

Page 36: Controlling Technical Debt with Continuous Delivery

mvn walkmod:patch gradle walkmodPatch

Page 37: Controlling Technical Debt with Continuous Delivery
Page 38: Controlling Technical Debt with Continuous Delivery

I T I S A L L A B O U T C O D E T R A N S F O R M AT I O N Spublic void visit(ImportDeclaration n, VisitorContext vc) { if (n.getUsages().isEmpty()){ n.remove(); } }

Page 39: Controlling Technical Debt with Continuous Delivery

* K I L L E R F E AT U R E * F O R M AT P R E S E R VAT I O N

Page 40: Controlling Technical Debt with Continuous Delivery

T R U S T T O O L S O R

E N S U R E T E S T C O V E R A G E

Page 41: Controlling Technical Debt with Continuous Delivery

F I X - U P S R E C I P E

mvn walkmod:patch

git apply walkmod.patch mvn test

git commit -a —fixup HEAD

git pull —rebase origin $branch git push origin HEAD:$branch

Page 42: Controlling Technical Debt with Continuous Delivery

feature#1354git commit -a --fixup HEAD

C O N T I N U O U S F I X I N G S

Page 43: Controlling Technical Debt with Continuous Delivery

P I P E L I N E L I B R A RY#!groovy @Library('github.com/walkmod/jenkins-pipeline-shared@maven')

… stage('Fixing Release') { steps { walkmodApply( validatePatch: false, branch:'master', alwaysApply: true, alwaysFail: true ) } }

Page 44: Controlling Technical Debt with Continuous Delivery

WA L K M O D P I P E L I N E A P I

walkmodApply: fixes your build

hasWalkmodPatch: checks if there are fixings

applyWalkModPatch: applies the patch

pushWalkModPatch : pushes the patch

Page 45: Controlling Technical Debt with Continuous Delivery

D E M O

Page 46: Controlling Technical Debt with Continuous Delivery

I N C R E M E N TA L E X E C U T I O N

M I C R O - S E R V I C E S - S TA R T I T N O W

L E G A C Y C O D E - A P P LY T H E M I N C R E M E N TA L LY

Page 47: Controlling Technical Debt with Continuous Delivery
Page 48: Controlling Technical Debt with Continuous Delivery

WA L K M O D H U B

Page 49: Controlling Technical Debt with Continuous Delivery

Q U E S T I O N S