Slide 1

Slide 1 text

How we use A love story to continuously integrate

Slide 2

Slide 2 text

This talk is: • 3 stories • Selling you on GitHub’s workflow • Helping you believe you can do it

Slide 3

Slide 3 text

Hi, I’m @bhuga I work on workflow I work at GitHub I’m @bhuga everywhere

Slide 4

Slide 4 text

My first day at GitHub Story 1 My Story, My life A tear-jerking coming-of-age story about

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

GitHub Flow

Slide 9

Slide 9 text

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.

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

My Story, My life An inspiring autobiography of hope by A Fix at GitHub Names have been changed to protect the innocent Story 2

Slide 12

Slide 12 text

Step 1: Decide what to do Step 1: Decide what to do

Slide 13

Slide 13 text

Step 1: Decide what to do

Slide 14

Slide 14 text

Step 2: Do it

Slide 15

Slide 15 text

Step 2: Do it

Slide 16

Slide 16 text

Step 2: Do it git push

Slide 17

Slide 17 text

ASYNCHRONO USLY • Not at the same time • At your leisure • When it’s not interrupting people

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

GitHub Flow

Slide 38

Slide 38 text

GitHub Flow is a version of Continuous Deployment

Slide 39

Slide 39 text

• 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:

Slide 40

Slide 40 text

…boring Continuous deployment is about developing and deploying in short, rapid increments.

Slide 41

Slide 41 text

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

Slide 42

Slide 42 text

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

Slide 43

Slide 43 text

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

Slide 44

Slide 44 text

My Life, My Story How I got from where you are to continuous deployment A drama Story 3 Starring You And Jackie Chan

Slide 45

Slide 45 text

Practices Part 1

Slide 46

Slide 46 text

Make TINY changes

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

Help your application understand development

Slide 49

Slide 49 text

• Feature flags

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

Use feature flags to make ships smaller and safer

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

• Feature flags

Slide 56

Slide 56 text

Tools Part 2

Slide 57

Slide 57 text

Chat Chat. chat, chat, chat, chat, chat, chat. With a robot.

Slide 58

Slide 58 text

Shared Console • /deploy • /ci build • /merge • /config

Slide 59

Slide 59 text

Exceptions

Slide 60

Slide 60 text

Graphs

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

Hackable toolchain

Slide 64

Slide 64 text

CD needs to be automated • Builds on every commit • Results of signoff (feedback) • Deployment • Setup for manual tests • Communication

Slide 65

Slide 65 text

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

Slide 66

Slide 66 text

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

Slide 67

Slide 67 text

VCS server (GitHub) Webhook Receiver HTTP POST WebHooks

Slide 68

Slide 68 text

VCS server (GitHub) Git push Webhook Receiver Commit Info

Slide 69

Slide 69 text

Disclaimer

Slide 70

Slide 70 text

• 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

Slide 71

Slide 71 text

VCS server (GitHub) Git push Webhook Receiver Issue Assigned HTTP POST Repository Starred Pull Request Opened Tests Failed

Slide 72

Slide 72 text

GitHub Events • There’s a ton

Slide 73

Slide 73 text

GitHub Events • There’s a ton

Slide 74

Slide 74 text

GitHub Events • There’s a ton

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

No content

Slide 77

Slide 77 text

Example: Announce Issue Creation

Slide 78

Slide 78 text

Announce Issue Creation Developer GitHub Webhook Receiver Create Issue Issue Event

Slide 79

Slide 79 text

No content

Slide 80

Slide 80 text

No content

Slide 81

Slide 81 text

Example: Build Every Commit

Slide 82

Slide 82 text

No content

Slide 83

Slide 83 text

No content

Slide 84

Slide 84 text

Build Every Commit Developer GitHub CI Server Commit Push Event Build Starts Update Status - Pending Update Status - Success Notifications

Slide 85

Slide 85 text

No content

Slide 86

Slide 86 text

Example: Deployment

Slide 87

Slide 87 text

No content

Slide 88

Slide 88 text

No content

Slide 89

Slide 89 text

No content

Slide 90

Slide 90 text

Deployment Developer GitHub Deploy Server Create Deployment Deployment Event Deploy Starts Deployment Status - Started Deployment Status - Finished Notifications

Slide 91

Slide 91 text

Example: Signoff

Slide 92

Slide 92 text

No content

Slide 93

Slide 93 text

No content

Slide 94

Slide 94 text

Signoff Developer GitHub QA Team Create pull request Notification Testing Comment ! Notifications Issue Comment Webhook Deployment Server Close Deploy Comment

Slide 95

Slide 95 text

No content

Slide 96

Slide 96 text

198 API Endpoints

Slide 97

Slide 97 text

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

Slide 98

Slide 98 text

No content

Slide 99

Slide 99 text

Dziękuję! questions?