CS314 Software Engineering Continuous Integration Dave Matthews - - PDF document

cs314 software engineering continuous integration
SMART_READER_LITE
LIVE PREVIEW

CS314 Software Engineering Continuous Integration Dave Matthews - - PDF document

2/13/18 CS314 Software Engineering Continuous Integration Dave Matthews Continuous Integration Improving Software Quality and Reducing Risk Paul M. Duvall 1 2/13/18 CI Value Reduce risks Reduce repetitive manual processes


slide-1
SLIDE 1

2/13/18 1

CS314 Software Engineering Continuous Integration

Dave Matthews

Continuous Integration

Improving Software Quality and Reducing Risk Paul M. Duvall

slide-2
SLIDE 2

2/13/18 2

CI Value

  • Reduce risks
  • Reduce repetitive manual processes
  • Generate deployable software at any time and any place
  • Enable better project visibility
  • Establish greater confidence in the software product from

the development team

Paul M. Duvall, Continuous Integration: Improving Software Quality and Reducing Risk, 2007

Introduction

  • Build software at every change
  • Continuous database integration
  • Continuous testing
  • Continuous inspection
  • Continuous deployment
  • Continuous feedback

Paul M. Duvall, Continuous Integration: Improving Software Quality and Reducing Risk, 2007

slide-3
SLIDE 3

2/13/18 3

Build Software at Every Change

  • Automate builds
  • Perform single command builds
  • Separate build scripts from your IDE
  • Centralize software assets
  • Create a consistent directory structure
  • Fail builds fast
  • Build for any environment
  • Use a dedicated integration build machine
  • Use a CI Server
  • Run fast builds
  • Stage builds

Paul M. Duvall, Continuous Integration: Improving Software Quality and Reducing Risk, 2007

Continuous Database Integration

  • Automate database integration
  • Use a local database sandbox
  • Use a version control repository to share database assets
  • Give developers the capability to modify the database
  • Make DBA part of the development team

Paul M. Duvall, Continuous Integration: Improving Software Quality and Reducing Risk, 2007

slide-4
SLIDE 4

2/13/18 4

Continuous Testing

  • Automate unit tests
  • Automate component tests
  • Automate system tests
  • Automate functional tests
  • Categorize developer tests
  • Run faster tests first
  • Write tests for defects
  • Make component tests repeatable
  • Limit test cases to one asset

Paul M. Duvall, Continuous Integration: Improving Software Quality and Reducing Risk, 2007

Continuous Inspection

  • Reduce code complexity
  • Perform design reviews continuously
  • Maintain organizational standards with code audits
  • Reduce duplicate code
  • Assess code coverage

Paul M. Duvall, Continuous Integration: Improving Software Quality and Reducing Risk, 2007

slide-5
SLIDE 5

2/13/18 5

Continuous Deployment

  • Release working software any time, any place
  • Label a repository’s assets
  • Produce a clean environment
  • Label each build
  • Run all tests
  • Create build feedback reports
  • Possess capability to roll back release

Paul M. Duvall, Continuous Integration: Improving Software Quality and Reducing Risk, 2007

Travis

https://travis-ci.com/ https://docs.travis-ci.com/

slide-6
SLIDE 6

2/13/18 6

Travis Introduction

  • automatically build and test code changes
  • provide immediate feedback on success of changes
  • automate other parts of the development process
  • automate other parts of delivery workflow
  • process

– clones GitHub repo to a new virtual environment – carries out specified tasks: build, test, inspect – build passes if no task fails, deploy code to S3, Heroku

Travis Supports

  • GitHub public and private repositories
  • Many languages
  • Multiple operating systems
  • Containers
  • Isolated virtual machines give clean state for build/test
  • Services to test databases, messaging, headless

browsers, etc.

slide-7
SLIDE 7

2/13/18 7

Travis-CI for CS 314

  • pom.xml (Maven configuration)
  • .travis.yml
  • build, test, inspect, deploy

Deployment

slide-8
SLIDE 8

2/13/18 8

cs314 Deployment

  • Web farm hosted on kiwis.cs.colostate.edu:314##

– access anytime – demo will use the last version deployed via checkin

  • checkin script will deploy a jar

– deploys your latest server and client – script can be run by any team member – you may checkin until Wednesday night at 11:59

  • more details on Piazza