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

The Plumbers Guide to the Galaxy

The Plumbers Guide to the Galaxy

Implementing a CI/CD Pipeline with GitHub

GitHub makes it easy to collaborate on code, but its true power comes when used as the centerpiece of a modern deployment pipeline. This class will start with an overview of 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 class is designed for those with intermediate Git and GitHub knowledge, but limited hands-on experience implementing CI/CD practices.

Stefan Stölzle

September 13, 2016
Tweet

More Decks by Stefan Stölzle

Other Decks in Technology

Transcript

  1. The Plumbers Guide to the Galaxy Implementing a CI and

    CD Pipeline with GitHub September 13 2016
  2. CI/CD benefits # $ % better feedback at all stages

    shorter cycle time granular releases
  3. CI/CD benefits & ' ( less stress more time for

    creative work measure success/failure consistently
  4. 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)
  5. continuous delivery/deployment automated software delivery process • frequent branching +

    pull requests • primarily automated gates • ~ minute scale release cadence
  6. Fig 5.2 Humble, Farley Continuous Delivery (2010) Trigger Trigger Trigger

    Trigger Trigger Check in Check in Check in Feedback Feedback Feedback Feedback Feedback Feedback Approval Approval Delivery Team Version Control Build &
 Unit Tests Automated Acceptance Tests User Acceptance Tests Release
  7. Integrate new practices & tools Protected Branches automated gates Status

    API 
 CI Create a Branch Open a Pull Request Merge and deploy
  8. CI aims ) * + catch bugs early reduce merge

    conflicts regularly prove app working
  9. 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!
  10. CI in practice (technical) • short-lived branches (< 3 days)

    • build/test every push • display results prominently
  11. GitHub Deployments API Fig 5.2 Humble, Farley Continuous Delivery (2010)

    Create Deployment Deployment Created Deployment Event SSH + Deploy Deployment Status Deployment Status Deploy Completed Tooling GitHub 3rd Party Your Server