KK-Jenkins and Continuous Delivery Revolution_部分1

2020-03-04 166浏览

  • 1.Jenkins and Continuous Delivery Revolution Kohsuke Kawaguchi kohsuke@cloudbees.com @kohsukekawa CTO, CloudBees, Inc.
  • 2.Automation is the Key © 2017 CloudBees, Inc. All Rights Reserved. 2 Photo courtesy of Steve Jurvetson via Flickr
  • 3.Time to Assemble a Model-T 12.5 hrs ↓ 1.5 hrs © 2017 CloudBees, Inc. All Rights Reserved. 3
  • 4.Incredible Efficiency of Assembly Line Ford built 300,000 cars with 13,000 employees That’s more than their 300 competitors combined, with 65,000 employees © 2017 CloudBees, Inc. All Rights Reserved. 4
  • 5.© 2017 CloudBees, Inc. All Rights Reserved. 5
  • 6.Software is eating the world © 2017 CloudBees, Inc. All Rights Reserved. 6
  • 7.© 2017 CloudBees, Inc. All Rights Reserved. 7 Photo courtesy of Steve Jurvetson via Flickr
  • 8.© 2017 CloudBees, Inc. All Rights Reserved. 8 Photo courtesy of Steve Jurvetson via Flickr
  • 9.© 2017 CloudBees, Inc. All Rights Reserved. 9
  • 10.© 2017 CloudBees, Inc. All Rights Reserved. 10
  • 11.© 2017 CloudBees, Inc. All Rights Reserved. 11
  • 12.Tomorrow is around the corner… © 2017 CloudBees, Inc. All Rights Reserved. 12
  • 13.Software is eating the world © 2017 CloudBees, Inc. All Rights Reserved. 13
  • 14.Evolution is required. But it is hard. (Millions) 30 25 “20If you don’t like change, 15you’re going to like 10irrelevance even less.” 5 0– General Eric Shinseki 1995 2000 2005 2010 Analog Digital © 2017 CloudBees, Inc. All Rights Reserved. 14
  • 15.“Nonstop demand is the #1 problem facing IT departments today.” “Reorganizing IT for faster software delivery” “Continually optimize the IT delivery model” “Real Time DevOps” “#3. Speed of IT Delivery” “DevOps helps drive faster software development” “DevOps can accelerate delivery 15-20%” “Agile & Incremental Software Delivery” “Continuous delivery” © 2017 CloudBees, Inc. All Rights Reserved. 15
  • 16.Speed + Friction = Heat © 2017 CloudBees, Inc. All Rights Reserved. 16
  • 17.Continuous Delivery and Automation are The Answer Commit Build Test Stage Deploy Development Feedback Loop $ The Business Production © 2017 CloudBees, Inc. All Rights Reserved. 17
  • 18.Continuous Delivery In Context Rapid Changes User Feedback Discipline AGILE An incremental approach to identifying, prioritizing, and coordinating feature development Continuous Integration Automated commit, build and testing of code in the development environment Continuous Continuous Delivery Deployment Software changes continuously delivered to stakeholders in any environment Software changes continuously deployed to live production Stage Env. Development Production / Prod-like Live Production Upstream (left) Downstream (right) Define Plan Code Compile Build Unit Test Analyze Integrate Int. Test Package Place Load Test Acct. Test Release Deploy Monitor Change Mgt. DevOps à Cultural approaches & technical practices Production Bugs © 2017 CloudBees, Inc. All Rights Reserved. 18
  • 19.© 2017 CloudBees, Inc. All Rights Reserved. 19
  • 20.Jenkins Installations 145,000 up 17% © 2017 CloudBees, Inc. All Rights Reserved. 20
  • 21.Jenkins Workload 12,600,000 jobs up 53% © 2017 CloudBees, Inc. All Rights Reserved. 21
  • 22.# of Computers 570,000 up 35% © 2017 CloudBees, Inc. All Rights Reserved. 22
  • 23.# of Plugins 1,350 up 250 © 2017 CloudBees, Inc. All Rights Reserved. 23
  • 24.From Survey of OSS Jenkins Users (2016) Steady push for more & more automation is continuing 2% 13% Increased No change 85% Decreased © 2017 CloudBees, Inc. All Rights Reserved. 24
  • 25.Demand for automation is strong © 2017 CloudBees, Inc. All Rights Reserved. 25
  • 26.Renaissance © 2017 CloudBees, Inc. All Rights Reserved. 26
  • 27.Pipelinehttps://flic.kr/p/nrFHFz© 2017 CloudBees, Inc. All Rights Reserved. 27
  • 28.Pipeline is a better way of configuring Jenkins Jenkinsfile in your VCS that fits your code review process What used to take 5 freestyle jobs is now 1 pipeline Grows with you from simple to complex Survives Jenkins restart Brings next level of reuse to Jenkins © 2017 CloudBees, Inc. All Rights Reserved. 28
  • 29.Define a series of stages… pipeline { agent any stages { stage('Build') { steps { sh 'mvn' } } } } © 2017 CloudBees, Inc. All Rights Reserved. 29
  • 30.Docker support is 1st class citizen stage('Build') { agent { docker { image 'maven:3-alpine'} } /* .. */ } © 2017 CloudBees, Inc. All Rights Reserved. 30
  • 31.All the familiar parts of Jenkins are right there stage('Build') { agent ... steps { sh 'mvn clean install' archiveArtifacts 'target/*.war' junit 'target/surefire-reports/*.xml' } } © 2017 CloudBees, Inc. All Rights Reserved. 31
  • 32.… and made even simpler stage('Build') { /* .. */ steps { withMaven { sh 'mvn clean package' } } } © 2017 CloudBees, Inc. All Rights Reserved. 32
  • 33.You can abstract them & reuse them yourself library 'mylib' pipeline { ... stage('Build') { ... steps { myBuild 'clean package' vars/myBuild.groovy in Git repo def call(v) { withMaven { sh 'mvn ${v}' } } © 2017 CloudBees, Inc. All Rights Reserved. 33
  • 34.Need to do something a little complicated? stage('Build') { /* .. */ steps { script { ['test-a','test-b','test-c'].each { v -> build v } } } } © 2017 CloudBees, Inc. All Rights Reserved. 34