there is no snapshot
DESCRIPTION
How we changed full release and deploy from half a day to half an hour using Gradle and Jenkins.TRANSCRIPT
![Page 1: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/1.jpg)
THERE IS NO SNAPSHOTHow we changed a full release from half a day to half an hour
![Page 2: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/2.jpg)
Compile once
Gradle
IN THIS EPISODE
![Page 3: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/3.jpg)
DISCLAIMERIt’s mostly JVM, but the essence is transferable to other
languages
![Page 4: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/4.jpg)
BACKGROUND
• Monolith
• 46 modules
• about 2100 .scala
![Page 5: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/5.jpg)
• Build
• Test
• Integrationtest
• Release
• Deploy
• Maven
![Page 6: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/6.jpg)
COMPILE, COMPILE, COMPILE
Compile + test
Integration-test mvn release
![Page 7: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/7.jpg)
COMPILE, COMPILE, COMPILE
Compile + test
Integration-test mvn release
25-60 mins 50-120 mins 60-120 mins
![Page 8: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/8.jpg)
SUM• min 2h 30 mins
• at times 5 hours or more
• parallel builds == crash
![Page 9: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/9.jpg)
THINK NEW
![Page 10: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/10.jpg)
HOW?
![Page 11: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/11.jpg)
COMPILE, COMPILE, COMPILE
Compile + test
Integration-test mvn release
![Page 12: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/12.jpg)
COMPILE, COMPILE, COMPILE
Compile + test Snapshots
![Page 13: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/13.jpg)
COMPILE, COMPILE, COMPILE
Compile + test1.10.69
major.minor.buildnumber
![Page 14: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/14.jpg)
OTHERS
????
![Page 15: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/15.jpg)
DOOR #1
![Page 16: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/16.jpg)
MAVEN
![Page 17: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/17.jpg)
DOOR #2
![Page 18: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/18.jpg)
SBT
![Page 19: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/19.jpg)
![Page 20: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/20.jpg)
DOOR #3
![Page 21: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/21.jpg)
![Page 22: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/22.jpg)
GRADLE
![Page 23: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/23.jpg)
PROS• Incremental and parallel
compiling• Zinc• Deployscripts in Groovy• Unittest buildscripts• ++
![Page 24: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/24.jpg)
PLUGINS
Promoted Build
Clone Workspace Copy Artifact
Parameterized Trigger Gradle
![Page 25: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/25.jpg)
PLUGINS (NICE)
Cloudbees Folders Build Pipeline
Git Pull Request Builder
Disk UsageJob Config History
Jenkins slaves
![Page 26: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/26.jpg)
PSEUDO EXAMPLE
![Page 27: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/27.jpg)
Default parameter VERSION=0.9
![Page 28: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/28.jpg)
echo version=${VERSION}.${BUILD_NUMBER} >> gradle.properties
![Page 29: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/29.jpg)
gradle.properties: version=0.9.3
![Page 30: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/30.jpg)
gradle clean test assemble --parallel
![Page 31: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/31.jpg)
archive artifact: embedded-jetty-app.jar
![Page 32: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/32.jpg)
archive workspace
![Page 33: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/33.jpg)
Trigger Send med JOB_NAME, BUILD_NUMBER, Git commit
![Page 34: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/34.jpg)
Clone workspace
![Page 35: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/35.jpg)
gradle integrationtest -x compileScala (++)
![Page 36: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/36.jpg)
git pull ${init_job_git_commit}
![Page 37: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/37.jpg)
Check for snapshot dependencies
![Page 38: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/38.jpg)
Log in as PROD-deployer
![Page 39: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/39.jpg)
Press Play on tape
![Page 40: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/40.jpg)
curl slack.com channel #prod: “🚀 we have liftoff”
![Page 41: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/41.jpg)
Promote to PROD
![Page 42: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/42.jpg)
PROMOTED BUILD
![Page 43: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/43.jpg)
PROMOTED BUILD
👎
Prefer Build Pipeline
Hard to read
![Page 44: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/44.jpg)
git tag v0.9.3
![Page 45: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/45.jpg)
Keep build forever (look Ma! No Nexus/Artifactory!)
![Page 46: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/46.jpg)
CLEAN, COMPILE, TEST,INTEGRATIONTEST
• avg = 25 mins• spikes at 30+ mins when
pull requests starts to buildat the same time
• All builds have final release version
• who broke the build?
![Page 47: There is no snapshot](https://reader033.vdocuments.us/reader033/viewer/2022052621/557d5f15d8b42ae1438b4ec8/html5/thumbnails/47.jpg)
?