Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Buildautomatisierung mit Jenkins, wirklich!

Buildautomatisierung mit Jenkins, wirklich!

Vorgetragen auf der SEROM (https://serom.de) am 04.11.2016 in Vechta.

B020706c99d30be902d8cdf28e8a8c5b?s=128

Christian Siewert

November 04, 2016
Tweet

Transcript

  1. Buildautomatisierung Jenkins mit ...wirklich!

  2. Christian Siewert Christian Siewert Anwendungsentwickler Anwendungsentwickler i-write-co.de i-write-co.de @csiewert711 @csiewert711

  3. Continuous Integration?

  4. Warum?

  5. None
  6. None
  7. None
  8. None
  9. None
  10. None
  11. Daily Builds

  12. None
  13. 1. Repositories 2. Environment 4. Projects 3. Tests 5. Tools

    6. Packaging
  14. Projekte 85

  15. Repositories 3

  16. Jobs 100

  17. Duplication

  18. None
  19. None
  20. None
  21. Don‘t Repeat Yourself* *not only in code

  22. master trunk ( )

  23. „Everyone Commits To the Mainline Every Day“ - Martin Fowler

  24. „Bei uns geht das nicht!“

  25. feature branch - master

  26. Everyone commits and integrates every day, without impacting the Mainline

  27. Config Repository

  28. None
  29. job('Project B') { customWorkspace('${REPO}/ProjectB') steps { batchFile('call build.bat') } publishers

    { warnings(['Delphi'], [:]) { thresholds(['unstableTotal':['all':0]]) } mailer('${DEV_MULTIEYE}') hipChat { notifyBackToNormal() notifyFailure() notifyNotBuilt() notifyUnstable() rooms('123456') } } } job('Project A') { customWorkspace('${REPO}/ProjectA') steps { batchFile('call build.bat') } publishers { warnings(['Delphi'], [:]) { thresholds(['unstableTotal':['all':0]]) } mailer('${DEV_MULTIEYE}') hipChat { notifyBackToNormal() notifyFailure() notifyNotBuilt() notifyUnstable() rooms('123456') } } } job('Project A') { customWorkspace('${REPO}/ProjectA') steps { batchFile('call build.bat') } publishers { warnings(['Delphi'], [:]) { thresholds(['unstableTotal':['all':0]]) } mailer('${DEV_MULTIEYE}') hipChat { notifyBackToNormal() notifyFailure() notifyNotBuilt() notifyUnstable() rooms('123456') } } } job('Project B') { customWorkspace('${REPO}/ProjectB') steps { batchFile('call build.bat') } publishers { warnings(['Delphi'], [:]) { thresholds(['unstableTotal':['all':0]]) } mailer('${DEV_MULTIEYE}') hipChat { notifyBackToNormal() notifyFailure() notifyNotBuilt() notifyUnstable() rooms('123456') } } }
  30. # concourse.yml jobs: - name: hello-world plan: - task: say-hello

    config: platform: linux image_resource: type: docker-image # travis.yml language: csharp solution: solution-name.sln script: say-hello - ./build.sh - ./test.sh - grep "Test Results" build.log # concourse.yml jobs: - name: hello-world plan: - task: say-hello config: platform: linux image_resource: type: docker-image # concourse.yml jobs: - name: hello-world plan: - task: say-hello config: platform: linux image_resource: type: docker-image # travis.yml language: csharp solution: solution-name.sln script: say-hello - ./build.sh - ./test.sh - grep "Test Results" build.log # concourse.yml jobs: - name: hello-world plan: - task: say-hello config: platform: linux image_resource: type: docker-image
  31. { "repositories": [ … ], "environment": [ … ], "tests":

    [ … ], "projects": [ … ], "tools": [ … ], "packaging": [ … ] }
  32. { "repositories": [ { "type": "git", "url": "https://server:resources.git", "branch": "master"

    } ], "environment": [ … ], "tests": [ … ], "projects": [ … ], "tools": [ … ], "packaging": [ … ] }
  33. … "projects": [ { "name": "Projekt A", "path": "/core/projectA", "filename":

    "Projekt_A.sln", "type": "msbuild-vc12" }, { "name": "Projekt B", "path": "/core/projectB", "filename": "Projekt_B.dproj", "type": "msbuild-dcc" }, { "name": "Projekt C", "path": "/core/projectC", "filename": "Projekt_C.sln", "type": "msbuild-vc12", "warnings": { "limit": 4 } }, … "name": "Projekt A", "path": "/core/projectA", "filename": "Projekt_A.sln", "type": "msbuild-vc12" "name": "Projekt B", "path": "/core/projectB", "filename": "Projekt_B.dproj", "type": "msbuild-dcc" "warnings": { "limit": 4 }
  34. JSON Ruby

  35. Screenshot mit ansicht von build muliteye job... Forever Alone

  36. None
  37. None
  38. None
  39. Backup Recovery Nachvollziehbar

  40. None
  41. Danke! i-write-co.de @csiewert711

  42. Bilder i-write-co.de @csiewert711 Ford Company, Public Domain, https://commons.wikimedia.org/wiki/File:A-line1913.jpg fxxu, CC0

    Public Domain, https://pixabay.com/photo-1669187/ condesign, CC0 Public Domain, https://pixabay.com/photo-514998/ Ana_J, CC0 Public Domain, https://pixabay.com/photo-429228/ Forever Alone, http://knowyourmeme.com/memes/forever-alone Luis de la Cerda Gonzalez, FCA: Corporate, New 2012 Fiat 500, CC BY-NC-ND 2.0 (https://creativecommons.org/licenses/by-nc-nd/2.0/legalcode), https://www.flickr.com/photos/chryslergroup/5515673032/