1 / 94

Continuous Deployment with Gerrit and Jenkins

Continuous Deployment with Gerrit and Jenkins. R. Tyler Croy Lookout, Inc. http://mylookout.com/about/jobs. Who is this guy?. I work here. Brief overview of Continuous Deployment Meet Gerrit A Basic Commit-to-Deploy Pipeline Multiple branches with Gerrit + Jenkins The Human Factor

keziah
Download Presentation

Continuous Deployment with Gerrit and Jenkins

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Continuous Deployment with Gerrit and Jenkins R. Tyler Croy Lookout, Inc. http://mylookout.com/about/jobs

  2. Who is this guy?

  3. I work here

  4. Brief overview of Continuous Deployment Meet Gerrit A Basic Commit-to-Deploy Pipeline Multiple branches with Gerrit + Jenkins The Human Factor Pro-tips/best practices

  5. Continuous Deployment

  6. What it isn't

  7. What it is

  8. Who is using it?

  9. Why Code Review?

  10. Why Code Review?

  11. Meet Gerrit

  12. As a code review tool

  13. As a code review tool

  14. As a Git repository server ~ % git checkout -b change-4 Switched to a new branch 'change-4' ~ % git fetch gerrit refs/changes/04/4/1 From gerrit:ttyclock * branch refs/changes/04/4/1 -> FETCH_HEAD ~ % git cherry-pick FETCH_HEAD Finished one cherry-pick. [change-4 1d4351c] Greatly improve the stability of tty-clock 1 files changed, 3 insertions(+), 0 deletions(-) ~ %

  15. As a collaboration tool

  16. As a collaboration tool

  17. As a collaboration tool

  18. As a collaboration tool

  19. Code Review “Points”

  20. Code Review “Points”

  21. Changes in Gerrit Change 123 Patchset 1 Commit cdeb34 Patchset 2 Commit 41dbe5

  22. Changes in Gerrit Change 123 Patchset 1 Commit cdeb34 Patchset 2 Commit 41dbe5

  23. Developer Workflow

  24. The Gerrit Flow gerrit upstream dev-b dev-a

  25. Flow of changes Create Local Branch % git checkout -b topic-branch work Push to Gerrit % git push gerrit HEAD:refs/for/master

  26. Flow of changes Create Local Branch % git checkout -b topic-branch work Push to Gerrit % git push gerrit HEAD:refs/for/master

  27. Flow of changes Create Local Branch Fix commit work rejected rebased! Review Push to Gerrit Upstream repo approved/ submitted

  28. Flow of changes Create Local Branch Fix commit work rejected rebased! Review Push to Gerrit Upstream repo approved/ submitted

  29. Your development workflow in commands git checkout -b local-topic-branch work work work git rebase -i upstream/master # fix up commits git push gerrit HEAD:refs/for/master Create new commits based on reviews git rebase -i upstream/master # squash up git push gerrit HEAD:refs/for/master

  30. REBASE IS SCARY (but necessary)

  31. How it works upstream/master A B C % git rebase upstream/master local-topic-branch A B D E

  32. How it works upstream/master A B C local-topic-branch A B C D E

  33. How it works upstream/master A B C % git rebase -i upstream/master local-topic-branch A B C D E Change-Id: Icde43 Change-Id: I51bdc2

  34. ~ % git rebase -i origin/master pick e59df21 Greatly improve the stability of tty-clock squash 6c1ffe1 Fix some whitespace [detached HEAD 785692b] Greatly improve the stability of tty-clock 1 files changed, 2 insertions(+), 0 deletions(-) Successfully rebased and updated refs/heads/change-4. ~ %

  35. How it works upstream/master A B C local-topic-branch A B C DE Change-Id: Icde43

  36. How it works upstream/master A B C local-topic-branch A B C DE Change-Id: Icde43

  37. Gerrit Trigger Plugin

  38. Creating a role account ~ % ssh gerrit gerrit create-account

  39. gerrit Jenkins Commands sent over SSH Streamed events over SSH

  40. A simple pipeline

  41. Creating a Jenkins “verifier” job

  42. Creating a Jenkins “verifier” job

  43. Creating a Jenkins “verifier” job

More Related