How we use GitHub to continuously integrate GitHub

Fcb052cb03de0357fc30978d9434bcb4?s=47 Ben Lavender
June 20, 2014
92

How we use GitHub to continuously integrate GitHub

Fcb052cb03de0357fc30978d9434bcb4?s=128

Ben Lavender

June 20, 2014
Tweet

Transcript

  1. How we use A love story to continuously integrate

  2. This talk is: • 3 stories • Selling you on

    GitHub’s workflow • Helping you believe you can do it
  3. Hi, I’m @bhuga I work on workflow I work at

    GitHub I’m @bhuga everywhere
  4. My first day at GitHub Story 1 My Story, My

    life A tear-jerking coming-of-age story about
  5. None
  6. None
  7. None
  8. GitHub Flow

  9. The Rules • Anything on master is deployable. And will

    be. Like right now. • Work off of short-lived named branches • Open a pull request for help, feedback, and signoff • Once you merge, deploy immediately.
  10. Do work on a branch Decide what's worth doing Automated

    tests Deploy to production Merge to master Manual tests auto-deploy feedback feedback feedback SCRUM or whatever
  11. My Story, My life An inspiring autobiography of hope by

    A Fix at GitHub Names have been changed to protect the innocent Story 2
  12. Step 1: Decide what to do Step 1: Decide what

    to do
  13. Step 1: Decide what to do

  14. Step 2: Do it

  15. Step 2: Do it

  16. Step 2: Do it git push

  17. ASYNCHRONO USLY • Not at the same time • At

    your leisure • When it’s not interrupting people
  18. None
  19. None
  20. None
  21. None
  22. None
  23. None
  24. None
  25. None
  26. None
  27. None
  28. None
  29. None
  30. None
  31. None
  32. None
  33. None
  34. None
  35. None
  36. None
  37. GitHub Flow

  38. GitHub Flow is a version of Continuous Deployment

  39. • Techniques such as automated testing, continuous integration and continuous

    deployment allow software to be developed to a high standard and easily packaged and deployed to test environments, resulting in the ability to rapidly, reliably and repeatedly push out enhancements and bug fixes to customers at low risk and with minimal manual overhead. Professor Wikipedia says:
  40. …boring Continuous deployment is about developing and deploying in short,

    rapid increments.
  41. Benefits for Developers: • A simple, easy-to-learn workflow • No

    release process • Frequent feedback • Low-risk, low-stress ships • Merge conflicts become trivial • Ownership, agency, quick wins, and responsibility
  42. My Life, My Story How I got from where you

    are to continuous deployment A drama Story 3
  43. My Life, My Story How I got from where you

    are to continuous deployment A drama Story 3 Starring You
  44. My Life, My Story How I got from where you

    are to continuous deployment A drama Story 3 Starring You And Jackie Chan
  45. Practices Part 1

  46. Make TINY changes

  47. None
  48. Help your application understand development

  49. • Feature flags

  50. None
  51. None
  52. Use feature flags to make ships smaller and safer

  53. None
  54. None
  55. • Feature flags

  56. Tools Part 2

  57. Chat Chat. chat, chat, chat, chat, chat, chat. With a

    robot.
  58. Shared Console • /deploy • /ci build • /merge •

    /config
  59. Exceptions

  60. Graphs

  61. None
  62. None
  63. Hackable toolchain

  64. CD needs to be automated • Builds on every commit

    • Results of signoff (feedback) • Deployment • Setup for manual tests • Communication
  65. Implement on new branch Run build Communicate Build status Respond

    to build issues Create pull request (request feedback) Communicate ready for feedback Review Communicate review Respond to review signoff branch deploy Test in production Fix issues Re-deploy branch Merge branch integrate master Deploy master ! integrate master
  66. Implement on new branch Run build Communicate Build status Respond

    to build issues Create pull request (request feedback) Communicate ready for feedback Review Communicate review Respond to review signoff branch deploy Test in production Fix issues Re-deploy branch Merge branch integrate master Deploy master ! integrate master
  67. VCS server (GitHub) Webhook Receiver HTTP POST WebHooks

  68. VCS server (GitHub) Git push Webhook Receiver Commit Info

  69. Disclaimer

  70. • Gerrit - https://github.com/jtolds/gerrit-webhooks • Stash - https://marketplace.atlassian.com/plugins/ com.atlassian.stash.plugin.stash-web-post-receive-hooks-plugin •

    Bitbucket - https://confluence.atlassian.com/display/BITBUCKET/ POST+hook+management
  71. VCS server (GitHub) Git push Webhook Receiver Issue Assigned HTTP

    POST Repository Starred Pull Request Opened Tests Failed
  72. GitHub Events • There’s a ton

  73. GitHub Events • There’s a ton

  74. GitHub Events • There’s a ton

  75. None
  76. None
  77. Example: Announce Issue Creation

  78. Announce Issue Creation Developer GitHub Webhook Receiver Create Issue Issue

    Event
  79. None
  80. None
  81. Example: Build Every Commit

  82. None
  83. None
  84. Build Every Commit Developer GitHub CI Server Commit Push Event

    Build Starts Update Status - Pending Update Status - Success Notifications
  85. None
  86. Example: Deployment

  87. None
  88. None
  89. None
  90. Deployment Developer GitHub Deploy Server Create Deployment Deployment Event Deploy

    Starts Deployment Status - Started Deployment Status - Finished Notifications
  91. Example: Signoff

  92. None
  93. None
  94. Signoff Developer GitHub QA Team Create pull request Notification Testing

    Comment ! Notifications Issue Comment Webhook Deployment Server Close Deploy Comment
  95. None
  96. 198 API Endpoints

  97. Buy instead of Build? • github/hubot - Chat robot. http://ciel.im/2013/11/21/hubot-heroku-hipchat/

    • atmos/heaven - GitHub-style deployments to Heroku • github/janky - Hubot integration for Jenkins • Travis CI, Circle CI, Codeship, many more - CI/CD as a service • travis-ci/dpl - Library for deploying to a number of providers • sprint.ly - GitHub-integrated sprinting
  98. None
  99. Dziękuję! questions?