20. 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
21. pipeline {
agent any
stages {
stage('Test') {
steps {
sh './gradlew check'
}
}
}
post {
always {
junit 'build/reports/**/*.xml'
}
}
}
27. 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
38. 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 S
public void visit(ImportDeclaration n, VisitorContext vc) {
if (n.getUsages().isEmpty()){
n.remove();
}
}
39. * 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
40. 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
41. 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
43. 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 )
}
}
44. 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
46. 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 RT 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