Continuous delivery with Gradle

1,660 views
1,391 views

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,660
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
16
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Continuous delivery with Gradle

  1. 1. CONTINUOUS DELIVERY WITH GRADLE BOB PAULIN / @BOBPAULIN / BOB@BOBPAULIN.COM
  2. 2. ABOUT ME Independent Consultant Business Enablement Web Centric Platforms Automation
  3. 3. I LOVE DELIVERING SOFTWARE I WANT TO DELIVER SOFTWARE ALL THE TIME! MULTIPLE TIMES A DAY!
  4. 4. WAIT PEOPLE ACTUALLY DO THAT?
  5. 5. SEVERAL MAJOR ECOMMERCE SHOPS ETSY.COM DEPLOYS ABOUT 30 TIMES EACH DAY MY PERSONAL RECORD 5
  6. 6. BENEFITS OF CONTINUOUS DELIVERY Shorten the time it takes from conception to customer impact Experiment more frequently Do more concurrently Delivery becomes a non-event
  7. 7. DELIVERING SOFTWARE CAN BE PAINFUL! Needs to be Assembled Needs to be Deployed Needs to be Tested How can I make sure I don't break existing stuff? What happens if I do break something? What about dependent systems? How do I know what changed? How do I control what goes in and what does not?
  8. 8. ALL THAT'S GOING TO TAKE ME AT LEAST 2 WEEKS!
  9. 9. RELEASE MANAGEMENT 101 Consistent Build Process Functional/Regression Testing Versioning Source Code Management Deployment Process Rollback
  10. 10. RELEASE MANAGEMENT 501 Config Switches Feature Branching Modular Deployment Throttling Auto Provisioning Auto-Scaling
  11. 11. TOOLS TO THE RESCUE!
  12. 12. BUILD TOOLS
  13. 13. Dependency Management Packaging Plugin Architecture Lifecycle Management Versioning
  14. 14. A RECIPE FOR CONTINUOUS DELIVERY Gradle Artifactory Git
  15. 15. GRADLE Build Tool Groovy Combines some of the best features of Ant and Maven Conventions Plugins
  16. 16. ARTIFACTORY Binary Repository JEE Web App Supports Maven and Ivy Open Source and Pro Licensed
  17. 17. GIT Source Control Management Distributed Tagging/Branch/Merge
  18. 18. HOW DOES ALL THIS STUFF WORK TOGETHER?
  19. 19. STEPS
  20. 20. SYSTEM INTERACTION
  21. 21. A BRIEF ASIDE ON SEMANTIC VERSIONING
  22. 22. LETS LOOK AT SOME CODE!
  23. 23. GRADLE PLUGINS War Plugin Cargo Plugin Maven Plugin
  24. 24. GRADLE CONFIGURATIONS CONFIG + CODE!
  25. 25. c ro { ag cn an rd =' o ct x ot i eI tm a7 ' pr = It gr pr en ( eP oe t( rj c .n + "d po Pr ") ot ne e. a sI tg tr p ry po et ev .e l yo t) dp oa l { el y be cn et =a tf c I ot x ri at d fl = po et fl (r i at on od ah ie rj c. i ea tf cD w la Pt ) } rm t { eo e hs nm = gt rp ry p oe te v+ "d p oH sn m" ot a e eP o et (r jc . n . el yo t ae ) ue nm = gt rp ry p oe te v+ "d p oU eN m" sr a e eP o et (r jc . n . el ys r ae ) ps wr = gt rp ry p oe te v+ "d p oP sw r" as o d eP o et (r jc . n . el ya s od ) } }
  26. 26. DON'T EMBED ENVIRONMENT DATA INTO THE BUILD SCRIPT! CREATE A USER PROPERTIES FILE INSTEAD.
  27. 27. DEPENDENCY MANAGEMENT FOR YOUR APPLICATION AND FOR YOUR BUILD
  28. 28. b id ci t{ u ls r p rp st re { eo i oi s mv n{ ul "t p :/ s. oa y eo gc ne tg o p/ ul c} ae r h ts /o s sn tp .r /o t n/ ru sp b i" mv ne ta ( ae C nr l) } dp ne ce { ee d ni s ca sa h "a a .e ve :e v e- p: ." ls p t j vx sr l ts rl ta i2 5 , "r .r de ai p ui sg al - ag -l gn 06 1 , og g al .p .l gn : rd ec ro pu i :. ." "r .j br tr g al -i :. . " og a oe sa :r de g t0 63 } }
  29. 29. d pn ec e { e ed n is df cr oe so = '. .' e a gV ri n 13 3 df sr nV ri n = '. . .E ES ' e p ig es o 3 23 RL A E df wo Je so = '. .' e r 4V ri n 16 3 df ap la ne e so = ' .' e o Al ic Vr in 10 cr o " r. oe as cr o cr oc r- br a :c ro es o " " r. o ea sc ro ag o gc dh u .a g: ag - oe ue jr $a g Vr in , og cd hu . ag cm ie "r .p ig rm w r: pi ga p $ p ig es o" " r. pi g rm wr :p op l og sr n fa eo ks r n- o: sr nV r in, og sr nf ae o ks " r. p ig rm wr :p i gc ne t$ pi g es o" "r . pi gr mw r: p ig og sr nf ae o ks rn -o t x: sr nV ri n,o gs rn fa e ok sr n" r. p ig rm wr :p i ge pe so :s r nV ri n, " r. pi gr mw r :p og sr nf ae o ks rn -x r si n$ pi ge s o" o gs rn f ae ok sr " r. p ig rm wr :p i gw b$ pi ge s o" " r. pi gr mw r :p ig wb og sr nf ae o ks rn -e : sr nV ri n, o gs r nf ae ok sr n -e " aa . ev e: sl 12 , og sf js fj a i1 56," r .l 4: c- vr s fj jv xs rl tj t :. "" r. l 4: l4 -p :. . " og sf jj l oe -l 4: " r. o ea sj cs nj c sn mp e- s: . .""o al a c: oa la c: a pl og cd hu .a k o: ak o- a pr al 19 3,a pl in ea pl i ne $o Al cm ie "r .p ig rm w r. aa sr n- a am no b1 0 4R LA E ) op l (og sr n fa eo kd t :p ig dt -o g d: .. .E ES " { ec ue md l: xl d o ue " l4 -p " s fj a i } cm ie "r .p ig rm w r: pi gc r: s rn Vr in ) op l (og sr n fa eo ks r n- oe $p ig e so "{ ec ue md l: xl d o ue ' om n- og n ' c mo s lg ig } cm ie ( r .s cw oj w oj cr :w oJ e so " op l "o id . r4 :r 4- o e$ r4 Vr in ) { ec ue md l: xl d o ue " l4 -p " s fj a i } cm ie "o id .r 4: r 4- xe so s $ r 4V ri n) op l ( r. sc w oj wo je t ni n: wo Je s o" { ec ue md l: xl d o ue " l4 -p " s fj a i ec ue md l: xl d o ue " l4 -o 41 " s fj l gj 2 } po ie Cm ie "a a. l e- p: ." " aa .e v e. s: s- p: . " " a a. rv d do pl j vx e: la i 10 , j v xs rl tj p jp ai 20 , jv xs ts Cm ie "u i: ui : .. " "r .p ig rm w r: pi gt s: s rn Vr in et o pl jn t jn t3 81 , og sr n fa eo ks r n- et $p ig e so }
  30. 30. GRADLE TASKS
  31. 31. t s u d tU la eP md p ns n 'e Ba cN m' < { a k pa ep od d o( ee dO : gt rn h ae ) < d fp m es o = p oe tv ri n e oV ri n r jc . es o i ( p o et gt rd e) g ta kr p ( .a T s( :e es " ) f! rj c. eG a l( .e Ts G ah )h sa k " r la e ) pm es o + " $ rn ha e oV r in = . b ac N m" u la A ci e. eo io i sm vn el yr p mv ri n= p me so po dr hv sr p st re .a e Dp oe .o .e s o o Vr in }
  32. 32. t s t g tp :G ta ){ a k a( ye i T g tg ae =v ri n aN m es o ms ae = " ee s o $ v ri n" es g R la e f {e so } } t s p s TR mt (y e Gt uh { a k uh oe oe t p: i Ps ) ps Al =t u uh l re }
  33. 33. t s q R la e{ a k ae es dp ns nt s, w r g t rn ha e ud tU la e Pm u la Ac ie ,u d tV r ee d O et a , eB ac N m, pa e po dd o, p od rh v s pa ee }
  34. 34. GRADLE TASK DEPENDENCIES
  35. 35. / Ts D pn ec e / ak e ed ni s w rm sR nf e ts a .u t uA tr e t t gm sR nf e wr a .u t uA tr a u dt Ul ae Pm m sR nf e tg p ae p od do .u tu A tr a u la Ac ie .u t uA tr ud t Ul ae Pm p od r hv sm sR nf e p ae po dd o u dt Vr in ub r ms Rn fe u la Ac i e p ae e so Nm e. ut u At r po dr hv s a de so Ud t . u tu At ru d tV ri nu br d Vr i np ae ms Rn f e pa ee so N me c mi Vr in pa e ms Rn fe a de so U dt o mt e so Ud t. ut u At r dV ri np ae p sT Rm t . ut u At rc mi V ri np ae u ho e oe ms Rn fe om te so Ud t
  36. 36. DEMO TIME! A SIMPLE BOOK REVIEW WEBSITE
  37. 37. ADDING BOOK RATINGS SCORE TO THE SITE
  38. 38. CREATING A FEATURE BRANCH
  39. 39. WRITE THE CODE... WE ALREADY KNOW HOW TO DO THIS!
  40. 40. BUILD PROCESS When you say you're code is done the fun is just beginning...
  41. 41. TESTING PROCESS Are you sure you're done?
  42. 42. RELEASE PROCESS Yup we're done!
  43. 43. DEPLOYMENT PROCESS Oh yeah now we're done
  44. 44. AN ASIDE Why is deploy separate from release?
  45. 45. DEPLOYMENT PROCESS: TAKE 2 Oh ****! What have we done?!?!
  46. 46. KNOW YOUR ROLLBACK STRATEGY BEFORE EVERY DEPLOYMENT
  47. 47. ENTERPRISE ARCHITECTURE
  48. 48. SOME PARTING THOUGHTS ON GRADLE AND CONTINOUS DELIVERY
  49. 49. REFERENCES CODE AND PRESENTATION GRADLE GRADLE RELEASE PLUGIN GIT ARTIFACTORY CARGO SEMANTIC VERSIONING ETSY'S MIKE BRITTAIN "CONTINUOUS DELIVERY: THE DIRTY DETAILS"
  50. 50. BOB PAULIN BOB PAULIN / @BOBPAULIN / BOB@BOBPAULIN.COM

×