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

Implementing a CI and CD Pipeline with GitHub

Implementing a CI and CD Pipeline with GitHub

GitHub makes it easy to collaborate on code, but its true power comes when it is used as the centerpiece of a modern deployment pipeline.

This workshop will start with an overview of Git and GitHub, then deep dive into the concepts behind Continuous Integration (CI) and Continuous Delivery (CD), two cornerstones of good software development. After that, we'll cover how to start incorporating these practices into your workflow, by using GitHub to integrate with best-of-breed 3rd party tools.

This workshop is designed for those with intermediate Git and GitHub knowledge, but limited hands-on experience implementing CI/CD practices.

Pre-Requisites: If you haven't done so already, please sign up for https://github.com, https://www.heroku.com and https://travis-ci.org accounts before the workshop (it's free). Everyone will use their individual Heroku and Travis CI accounts to deploy their own version of a sample app.

Stefan Stölzle

June 29, 2016
Tweet

More Decks by Stefan Stölzle

Other Decks in Technology

Transcript

  1. How people build software ! " Implementing a CI and

    CD Pipeline with GitHub DevOpsDays Amsterdam June 29 2016
  2. How people build software ! ! $ • have a

    VCS (!) • 1 branch/trunk/mainline • ~ year scale release cadence ancient
  3. How people build software ! ! % • several long-running

    branches • human gates • ~ month scale release cadence (at best) waterfall
  4. How people build software ! ! CI/CD benefits & '

    ( better feedback at all stages shorter cycle time granular releases
  5. How people build software ! ! CI/CD benefits ) *

    + less stress more time for creative work measure success/failure consistently
  6. How people build software ! ! CI/CD benefits Cost per

    Defect $0 $2,000 $4,000 $6,000 $8,000 $10,000 $12,000 $14,000 $16,000 Requirements Design Coding Testing Maintenance $139 $455 $977 $7,136 $14,103 taken from https://agileelements.wordpress.com/2008/04/22/cost-of-software-defects/ adapted from Jones, Software Assessments, Benchmarks, and Best Practices (2000)
  7. How people build software ! ! continuous delivery/deployment automated software

    delivery process • frequent branching + pull requests • primarily automated gates • ~ minute scale release cadence
  8. How people build software ! ! Fig 5.2 Humble, Farley

    Continuous Delivery (2010) Delivery Team Version Control Build &
 Unit Tests Automated Acceptance Tests User Acceptance Tests Release Trigger Trigger Trigger Trigger Trigger Check in Check in Check in Feedback Feedback Feedback Feedback Feedback Feedback Approval Approval !
  9. How people build software ! ! Getting started CREATE A

    BRANCH OPEN A PULL REQUEST MERGE AND DEPLOY
  10. How people build software ! ! Integrate new practices &

    tools CREATE A BRANCH OPEN A PULL REQUEST MERGE AND DEPLOY Protected Branches automated gates Status API 
 CI
  11. How people build software ! ! CI aims , -

    . catch bugs early reduce merge conflicts regularly prove app working
  12. How people build software ! ! CI in practice (cultural)

    • agreed failure threshold • test locally first • don’t base new work on broken build • revert if needed • share code ownership CI a process, not a tool!
  13. How people build software ! ! CI in practice (technical)

    • short-lived branches (< 3 days) • build/test every push • display results prominently
  14. How people build software ! ! Fig 5.2 Humble, Farley

    Continuous Delivery (2010) Tooling GitHub 3rd Party Your Server Create Deployment GitHub Deployments API Deployment Created Deployment Event SSH + Deploy Deployment Status Deployment Status Deploy Completed