Upload
walkmod
View
123
Download
1
Embed Size (px)
Citation preview
@raquelpau @alexsotob#Voxxed
Controlling Technical Debt with Continuous Delivery
Raquel Pau - Alex Soto WalkMod - RedHat
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
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
Q U E S T I O N S
S O F T WA R E I S E AT I N G T H E W O R L D
FASTERSOONERBETTER
W H AT I S C O N T I N U O U S D E L I V E RY ?
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
O R C H E S T R AT I N G T H E B U I L D
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
N O M O R E J O B S P L E A S E
P I P E L I N E A S C O D E
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
pipeline { agent any stages { stage('Test') { steps { sh './gradlew check' } } } post { always { junit 'build/reports/**/*.xml' } } }
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' } } } }
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?" } }
T W O - P I Z Z A T E A M S
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
D I V E R S I F I E D T E A M S
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
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
feature#1234
feature#1354
C O N T I N U O U S I N S P E C T I O N
@SupressWarnings(“PMD”) mvn pmd:check
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
mvn walkmod:patch gradle walkmodPatch
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(); } }
* 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
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
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
feature#1354git commit -a --fixup HEAD
C O N T I N U O U S F I X I N G S
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 ) } }
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
D E M O
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
WA L K M O D H U B
Q U E S T I O N S