Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

There is-no-snapshot

590 vues

Publié le

Publié dans : Logiciels
  • Soyez le premier à commenter

There is-no-snapshot

  1. 1. THERE IS NO SNAPSHOT Hvordan vi senket release fra halv dag til halv time
  2. 2. YOU WILL LEARN Compile once Gradle
  3. 3. DISCLAIMER It’s JVM
  4. 4. BACKGROUND • Monolitt • 46 modules • ca 2100 .scala
  5. 5. • Build • Test • Integrasjonstest • 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 2t 30 mins • til tider 5t eller mer • samtidige bygg == crash
  9. 9. TENK NYTT
  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 • Inkrementell og parallell kompilering • Zinc • Deployscripts i Groovy • Unittest buildscripts • gradle wrapper • Stort community • ++
  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 EKSEMPEL
  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. Sjekk for snapshot avhengigheter
  36. 36. Logg inn som PROD-deploy-bruker
  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  Foretrekk Build Pipeline
  42. 42. git tag v0.9.3
  43. 43. Keep build forever (look Ma! No Nexus/Artifactory!)
  44. 44. IN REAL LIFE Create release version in JIRA Update minor version in step one
  45. 45. 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?
  46. 46. WILL MY PULL REQUEST COMPILE?
  47. 47. 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.
  48. 48. COMMIT STATUS API https://github.com/blog/1227-commit-status-api
  49. 49. FFS-666 master
  50. 50. WILL YOU APPROVE MY PULL REQUEST?
  51. 51. DEPLOY Feature toggle Release branch
  52. 52. WILL YOU SUM IT UP • Bygg alt med unikt nummer • Kompiler én gang • Gradle(sbt) > Maven
  53. 53. ANSWER YOUR QUESTIONS I WILL

×