Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

There is no snapshot

580 Aufrufe

Veröffentlicht am

How we changed full release and deploy from half a day to half an hour using Gradle and Jenkins.

Veröffentlicht in: Software
  • Als Erste(r) kommentieren

There is no snapshot

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

×