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

How we use GitHub to continuously integrate GitHub

Ben Lavender
June 20, 2014
160

How we use GitHub to continuously integrate GitHub

Ben Lavender

June 20, 2014
Tweet

Transcript

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

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

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

    life A tear-jerking coming-of-age story about
  4. 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.
  5. 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
  6. My Story, My life An inspiring autobiography of hope by

    A Fix at GitHub Names have been changed to protect the innocent Story 2
  7. ASYNCHRONO USLY • Not at the same time • At

    your leisure • When it’s not interrupting people
  8. • 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:
  9. 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
  10. My Life, My Story How I got from where you

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

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

    are to continuous deployment A drama Story 3 Starring You And Jackie Chan
  13. CD needs to be automated • Builds on every commit

    • Results of signoff (feedback) • Deployment • Setup for manual tests • Communication
  14. 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
  15. 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
  16. VCS server (GitHub) Git push Webhook Receiver Issue Assigned HTTP

    POST Repository Starred Pull Request Opened Tests Failed
  17. Build Every Commit Developer GitHub CI Server Commit Push Event

    Build Starts Update Status - Pending Update Status - Success Notifications
  18. Deployment Developer GitHub Deploy Server Create Deployment Deployment Event Deploy

    Starts Deployment Status - Started Deployment Status - Finished Notifications
  19. Signoff Developer GitHub QA Team Create pull request Notification Testing

    Comment ! Notifications Issue Comment Webhook Deployment Server Close Deploy Comment
  20. 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