Successfully reported this slideshow.
Your SlideShare is downloading. ×

Build pipelines with TeamCity and Kotlin DSL

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
Kubernetes Introduction
Kubernetes Introduction
Loading in …3
×

Check these out next

1 of 52 Ad

More Related Content

Slideshows for you (20)

Similar to Build pipelines with TeamCity and Kotlin DSL (20)

Advertisement

More from Anton Arhipov (20)

Recently uploaded (20)

Advertisement

Build pipelines with TeamCity and Kotlin DSL

  1. 1. Build Pipelines with TeamCity @antonarhipov
  2. 2. Build pipeline Step 4Step 2 Step 3Step 1
  3. 3. Build pipeline Step 4Step 2 Step 3Step 1
  4. 4. Build pipeline Step 4Step 2 Step 3Step 1 Result
  5. 5. Build pipeline Step 4Step 2 Step 3Step 1 More steps Result
  6. 6. CI/CD pipeline AuditTest PackageCompile Test Build pipeline a.k.a CI pipeline TEST PRODDEV CD pipeline .rpm SW
  7. 7. Check out sources Compile Run tests Generate report Publish the results
  8. 8. Looks simple! Check out sources Compile Run tests Generate report Publish the results
  9. 9. Looks simple!Why do I need a “pipeline”? Check out sources Compile Run tests Generate report Publish the results
  10. 10. How long it takes to run the tests?
  11. 11. Check out sources Compile Run tests Generate report Publish the results
  12. 12. Check out sources Compile Run fast tests Generate report Publish the results
  13. 13. Check out sources Compile Run fast tests Generate report Publish the results Run integration, UI tests
  14. 14. Check out sources Compile Run fast tests Generate report Publish the results Run integration, UI tests Pipeline!!
  15. 15. Build Test Check out sources Compile Run fast tests Generate report Publish the results Run integration, UI tests
  16. 16. Test Reports & notifications Build
  17. 17. UI-testing Reports & notifications Build Integration testing More integration testing
  18. 18. Tests Reports & notifications Build Tests Tests Build
  19. 19. Tests Reports & notifications Build Tests Tests Build Dependencies
  20. 20. Tests Reports & notifications Build Tests Tests Build Dependencies
  21. 21. TeamCity @ JetBrains 1800+ projects 10000+ build configurations 500+ agents Average build time ~25 mins est 2006
  22. 22. Build chains
  23. 23. Build chains
  24. 24. Step 1 Step 2 Step 3 Step 4
  25. 25. Step 1 Step 2 Step 3 Step 4 rev 1 rev 2 rev 3
  26. 26. Step 1 Step 3 Step 4 rev 1 rev 3 rev 3 Step 2
  27. 27. Step 1 Step 3 Step 4 rev 1 rev 3 rev 3 Step 2
  28. 28. rev 1 rev 3 rev 3 Step 1 Step 3 Step 2 Step 4
  29. 29. rev 3 “snapshot dependency” Step 1 Step 3 Step 2 Step 4 rev 1 rev 3
  30. 30. Demo
  31. 31. import jetbrains.buildServer.configs.kotlin.v2018_1.* version = "2018.1" project { }
  32. 32. object ApplicationVcs : GitVcsRoot({ name = "ApplicationVcs" url = "http://localhost:3000/anton/application.git" })
  33. 33. object ApplicationVcs : GitVcsRoot({ name = "ApplicationVcs" url = "http://localhost:3000/anton/application.git" }) // alternatively you could write this, but... val applicationVcs = GitVcsRoot { id("ApplicationVcs") name = "ApplicationVcs" url = "http://localhost:3000/anton/application.git" }
  34. 34. import jetbrains.buildServer.configs.kotlin.v2018_1.* version = "2018.1" project { vcsRoot(ApplicationVcs) } object ApplicationVcs : GitVcsRoot
  35. 35. object Application : BuildType({ name = "Application" artifactRules = """ target/application-1.0-SNAPSHOT.jar """.trimIndent() vcs { root(ApplicationVcs) } steps { maven { goals = "clean package"
  36. 36. object Application : BuildType({ name = "Application" artifactRules = """ target/application-1.0-SNAPSHOT.jar """.trimIndent() vcs { root(ApplicationVcs) } steps { maven { goals = "clean package" //alternatively, this also works, but val application = BuildType { id("Application") name = "Application" …
  37. 37. object Application : BuildType({ name = "Application" artifactRules = """ target/application-1.0-SNAPSHOT.jar """.trimIndent() vcs { root(ApplicationVcs) } steps { maven { goals = "clean package"
  38. 38. object Application : BuildType({ name = "Application" artifactRules = … vcs { root(ApplicationVcs) } steps { maven { goals = "clean package" } }
  39. 39. object Application : BuildType({ name = "Application" artifactRules = … vcs { root(ApplicationVcs) } steps { maven { goals = "clean package" } } })
  40. 40. import jetbrains.buildServer.configs.kotlin.v2018_1.* version = "2018.1" project { vcsRoot(ApplicationVcs) buildType(Application) } object Application : BuildType
  41. 41. object Application : BuildType({ name = "Application" dependencies { dependency(Library) { snapshot {} artifacts { artifactRules = "library-*.jar" } } }
  42. 42. object Application : BuildType({ name = "Application" dependencies { dependency(Library) { snapshot {} artifacts { artifactRules = "library-*.jar" } } }
  43. 43. object Application : BuildType({ name = "Application" dependencies { dependency(Library) { snapshot {} artifacts { artifactRules = "library-*.jar" } } }
  44. 44. import jetbrains.buildServer.configs.kotlin.v2018_1.* version = "2018.1" project { vcsRoot(ApplicationVcs) vcsRoot(LibraryVcs) buildType(Library) buildType(Application) }
  45. 45. https://medium.com/@antonarhipov/building-dependant-maven-projects-d2b71963827a ApplicationLibrary refs/heads/master refs/heads/feature-001 refs/heads/feature-002 refs/heads/master refs/heads/feature-001 refs/heads/feature-002 github.com/antonarhipov/library.git github.com/antonarhipov/application.git library-1.0.0-SNAPSHOT.jar Branches
  46. 46. Demo
  47. 47. @antonarhipov ?anton.arhipov@jetbrains.com jetbrains.com/teamcity medium.com/@antonarhipov

×