synchronizing parallel delivery flows in jenkins using groovy, build flow and a bit of black magic
TRANSCRIPT
![Page 1: Synchronizing parallel delivery flows in jenkins using groovy, build flow and a bit of black magic](https://reader034.vdocuments.mx/reader034/viewer/2022042619/5879024d1a28ab49608b810d/html5/thumbnails/1.jpg)
Synchronizing parallel delivery flowsin Jenkins using Groovy, BuildFlow
and a bit of black magic
Andrey Devyatkin, Automation Nights v15.09-STHLM
![Page 2: Synchronizing parallel delivery flows in jenkins using groovy, build flow and a bit of black magic](https://reader034.vdocuments.mx/reader034/viewer/2022042619/5879024d1a28ab49608b810d/html5/thumbnails/2.jpg)
Andrey Devyatkin, @andrey9kin● Continuous Deliverer (CoDe:er with
DevOps at heart)● Coach● Open Source enthusiast● Traveler, runner, martial artist
Recent noticeable projects
● Continuous delivery pipeline setup for Ericsson new generation radio products
● ClearCase -> Git migration for 1000+ employees, 5-sites, 100 MLOC, 10 years legacy project
![Page 3: Synchronizing parallel delivery flows in jenkins using groovy, build flow and a bit of black magic](https://reader034.vdocuments.mx/reader034/viewer/2022042619/5879024d1a28ab49608b810d/html5/thumbnails/3.jpg)
Problem
How to secure delivery order in the long-running-delivery-pipeline as well as enable concurrent pipelines executions?
Example:● SCM check out can run concurrently, but the changelog computation
requires that the check out of the earlier build has completed● Sending out an e-mail with test results requires info about the
previous build, so that we can decide an e-mail is necessary or not● Rolling out database schema updates● Delivering incremental changes to users
Image source: http://desigeek.com/blog/amit/2010/08/08/race-conditions-explained/
![Page 4: Synchronizing parallel delivery flows in jenkins using groovy, build flow and a bit of black magic](https://reader034.vdocuments.mx/reader034/viewer/2022042619/5879024d1a28ab49608b810d/html5/thumbnails/4.jpg)
Problem
3
4
2
1
Build
Build
Build
Build
Pack
Pack
Pack
Test Test
Test
Test Test Deploy
We are heading to the trouble here!
![Page 5: Synchronizing parallel delivery flows in jenkins using groovy, build flow and a bit of black magic](https://reader034.vdocuments.mx/reader034/viewer/2022042619/5879024d1a28ab49608b810d/html5/thumbnails/5.jpg)
Idea
Use Jenkins CheckPoint API in order to sync pipelines implemented using Groovy and BuildFlow (potentially WorkFlow)
Image source: http://delivervalue.blogspot.se/2013/06/more-advanced-build-flows-with-jenkins.html
![Page 6: Synchronizing parallel delivery flows in jenkins using groovy, build flow and a bit of black magic](https://reader034.vdocuments.mx/reader034/viewer/2022042619/5879024d1a28ab49608b810d/html5/thumbnails/6.jpg)
Tools
● Docker
● Jenkins
● JobDSL
● Groovy
● BuildFlow
Image source: http://365psd.com/psd/drawing-tools-icon-psd-53148
![Page 7: Synchronizing parallel delivery flows in jenkins using groovy, build flow and a bit of black magic](https://reader034.vdocuments.mx/reader034/viewer/2022042619/5879024d1a28ab49608b810d/html5/thumbnails/7.jpg)
Setup
https://github.com/Andrey9kin/jenkins-checkpoints-demo
![Page 8: Synchronizing parallel delivery flows in jenkins using groovy, build flow and a bit of black magic](https://reader034.vdocuments.mx/reader034/viewer/2022042619/5879024d1a28ab49608b810d/html5/thumbnails/8.jpg)
Thank you!