There is-no-snapshot
-
Upload
ole-christian-langfjaeran -
Category
Software
-
view
224 -
download
0
Transcript of There is-no-snapshot
![Page 1: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/1.jpg)
THERE IS NO SNAPSHOTHvordan vi senket release fra halv dag til halv time
![Page 2: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/2.jpg)
Compile once
Gradle
YOU WILL LEARN
![Page 3: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/3.jpg)
DISCLAIMERIt’s JVM
![Page 4: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/4.jpg)
BACKGROUND
• Monolitt
• 46 modules
• ca 2100 .scala
![Page 5: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/5.jpg)
• Build
• Test
• Integrasjonstest
• Release
• Deploy
• Maven
![Page 6: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/6.jpg)
COMPILE, COMPILE, COMPILE
Compile + test
Integration-test mvn release
![Page 7: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/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.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/8.jpg)
SUM• min 2t 30 mins
• til tider 5t eller mer
• samtidige bygg == crash
![Page 9: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/9.jpg)
TENK NYTT
![Page 10: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/10.jpg)
HOW?
![Page 11: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/11.jpg)
COMPILE, COMPILE, COMPILE
Compile + test
Integration-test mvn release
![Page 12: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/12.jpg)
COMPILE, COMPILE, COMPILE
Compile + test Snapshots
![Page 13: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/13.jpg)
COMPILE, COMPILE, COMPILE
Compile + test1.10.69
major.minor.buildnumber
![Page 14: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/14.jpg)
OTHERS
????
![Page 15: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/15.jpg)
DOOR #1
![Page 16: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/16.jpg)
MAVEN
![Page 17: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/17.jpg)
DOOR #2
![Page 18: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/18.jpg)
SBT
![Page 19: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/19.jpg)
![Page 20: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/20.jpg)
DOOR #3
![Page 21: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/21.jpg)
![Page 22: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/22.jpg)
GRADLE
![Page 23: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/23.jpg)
PROS• Inkrementell og parallell
kompilering • Zinc• Deployscripts i Groovy • Unittest buildscripts• gradle wrapper • Stort community• ++
![Page 24: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/24.jpg)
![Page 25: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/25.jpg)
PLUGINS
Promoted Build
Clone Workspace Copy Artifact
Parameterized Trigger Gradle
![Page 26: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/26.jpg)
PLUGINS (NICE)
Cloudbees Folders Build Pipeline
Git Pull Request Builder
Disk UsageJob Config History
Jenkins slaves
![Page 27: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/27.jpg)
PSEUDO EKSEMPEL
![Page 28: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/28.jpg)
Default parameter VERSION=0.9
![Page 29: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/29.jpg)
echo version=${VERSION}.${BUILD_NUMBER} >> gradle.properties
![Page 30: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/30.jpg)
gradle.properties: version=0.9.3
![Page 31: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/31.jpg)
gradle clean test assemble --parallel
![Page 32: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/32.jpg)
archive artifact: embedded-jetty-app.jar
![Page 33: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/33.jpg)
archive workspace
![Page 34: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/34.jpg)
Trigger Send med JOB_NAME, BUILD_NUMBER, Git commit
![Page 35: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/35.jpg)
Clone workspace
![Page 36: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/36.jpg)
gradle integrationtest -x compileScala (++)
![Page 37: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/37.jpg)
git pull ${init_job_git_commit}
![Page 38: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/38.jpg)
Sjekk for snapshot avhengigheter
![Page 39: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/39.jpg)
Logg inn som PROD-deploy-bruker
![Page 40: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/40.jpg)
Press Play on tape
![Page 41: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/41.jpg)
curl slack.com channel #prod: “🚀 we have liftoff”
![Page 42: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/42.jpg)
Promote to PROD
![Page 43: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/43.jpg)
PROMOTED BUILD
![Page 44: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/44.jpg)
PROMOTED BUILD
👎
Foretrekk Build Pipeline
![Page 45: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/45.jpg)
git tag v0.9.3
![Page 46: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/46.jpg)
Keep build forever (look Ma! No Nexus/Artifactory!)
![Page 47: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/47.jpg)
IN REAL LIFE
Create release version in JIRA
Update minor version in step one
![Page 48: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/48.jpg)
CLEAN, COMPILE, TEST,INTEGRATIONTEST
• avg = 25 mins• spikes på 30+ mins skyldes
samtidige pull request bygg• alle bygg har final
versjonsnummer
• who broke the build?
![Page 49: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/49.jpg)
WILL MY PULL REQUEST COMPILE?
![Page 50: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/50.jpg)
![Page 51: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/51.jpg)
![Page 52: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/52.jpg)
Github flow
The git-flow process is designed largely around the “release”. We don’t really have “releases” because we deploy to
production every day – often several times a day.
![Page 53: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/53.jpg)
COMMIT STATUS APIhttps://github.com/blog/1227-commit-status-api
![Page 54: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/54.jpg)
![Page 55: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/55.jpg)
![Page 56: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/56.jpg)
![Page 57: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/57.jpg)
masterFFS-666
![Page 58: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/58.jpg)
![Page 59: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/59.jpg)
WILL YOU APPROVE MY
PULL REQUEST?
![Page 60: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/60.jpg)
DEPLOYFeature toggleRelease branch
![Page 61: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/61.jpg)
WILL YOU SUM IT UP
• Bygg alt med unikt nummer
• Kompiler én gang
• Gradle(sbt) > Maven
![Page 62: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/62.jpg)
![Page 63: There is-no-snapshot](https://reader033.fdocuments.net/reader033/viewer/2022052912/55a209a51a28ab96368b45a7/html5/thumbnails/63.jpg)
ANSWER YOUR
QUESTIONS
I WILL