Anúncio

SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code

DevOps Evangelist at CloudBees em CloudBees
17 de Mar de 2016
Anúncio

Mais conteúdo relacionado

Apresentações para você(20)

Similar a SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code(20)

Anúncio

SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code

  1. Jenkins 2.0 and Beyond
  2. About Jenkins Jenkins 2.0 is an automation engine with an unparalleled plugin ecosystem to support all of your favorite tools in your delivery pipelines, whether your goal is continuous integration, automated testing, or continuous delivery.
  3. Let’s discuss ●Why Jenkins 2.0 exists ●What is Jenkins 2.0 ●Pipelines ●Other stuff
  4. Meet Jenkins
  5. Jenkins 101 6 • 2005 – Hudson (Sun) • 2008 – It becomes popular, Duke's Choice Award • 2011 – Conflict with Oracle, renaming to Jenkins • License: MIT (core) • https://github.com/jenkinsci/
  6. Why “automation”? 7 Continuous Integration Continuous Integration Continuous Delivery DevOps Accounting automation Home Automation CRON + WebUI
  7. Jenkins weaknesses. Growth Problems 8 Jenkins used to grow faster than its Dev community
  8. Jenkins weaknesses. Compatibility costs 9 • More than 5 years of backward compatibility • Hudson 2 plugins still work on Jenkins! • BUT: • Architecture design issues, complex APIs • Outdated libs • Outdated UI • Plugin integration issues ...Fixes are on the way
  9. Pipelines in Jenkins 1.x ●Create jobs ●Trigger “downstream” jobs for next stage ●Easy!
  10. Pipelines in Jenkins 1.x
  11. Pipelines in Jenkins 1.x
  12. Pipelines in Jenkins 1.x
  13. Pipelines in Jenkins 1.x
  14. Pipelines in Jenkins 1.x
  15. Pipelines in Jenkins 1.x
  16. Classic Job Configuration UI ● All the options you could ever want ○ and more! ● Consistent for almost a decade
  17. Low maintenance ●Many users install Jenkins once ●Usage pattern: “set it, and forget it!”
  18. Meet Jenkins 2.0 jenkins-ci.org/2.0
  19. ©2015CloudBees,Inc.AllRightsReserved 20 • CI-to-CD with Pipeline-as-Code • Improved “out of the box” experience • Updated easier to use UI • New Jenkins.xx site Jenkins 2.0 Themes
  20. Pipeline as Code
  21. ©2015CloudBees,Inc.AllRightsReserved 22 • Entire flow is one concise Groovy script using Workflow DSL – For loops, try-finally, fork-join, etc • Can restart Jenkins while flow is running • Allocate build nodes and workspaces – As many as you want, when you want • Stages throttle concurrency of builds • Human input/approval integrated into flow • Standard project concepts: SCM, artifacts, plugins Key Pipeline Features
  22. ©2015CloudBees,Inc.AllRightsReserved 23 Jenkins Powered CD Pipelines: Jenkins Workflow Development Production Commit Build Stage Deploy ? ? Pipelines Need: ✓ Branching ✓ Looping ✓ Restarts ✓ Checkpoints ✓ Manual Input Sonar Test Selenium Test Perf Test Jenkins Workflow
  23. ©2015CloudBees,Inc.AllRightsReserved 24 A Real-world CD Pipeline with Jenkins Workflow Development Production Jenkins Workflow
  24. Pipeline as Code ● Introduce “pipeline” as a new type in Jenkins ● Codify an implicit series of stages into an explicit .Jenkinsfile in your source repository ● Resumability/durability of the pipeline state ● Extend the DSL with your own steps github.com/jenkinsci/pipeline-examples
  25. Pipeline DSL node('docker') { checkout scm /* Grab the abbreviated SHA1 of our pipeline’s commit. */ sh 'git rev-parse HEAD > GIT_COMMIT' def shortCommit = readFile('GIT_COMMIT').take(6) stage 'Build' def image = docker.build("jenkinsciinfra/bind:build-${shortCommit}") stage 'Deploy' image.push() }
  26. ©2015CloudBees,Inc.AllRightsReserved 27 CloudBees Jenkins Pipeline Stage View Jenkins Pipeline Stage View SOURCE CODE CONTROL SYSTEM Code Commit < / > Development Production Jenkins Pipeline
  27. Better Out-of-the-box UX
  28. Better Out-of-the-box UI
  29. User Interface Improvements
  30. User Interface Improvements ● Improved “New Item” page ● More consistent terminology
  31. 2.0 is a drop-in replacement for 1.x ● Evolution not revolution ● No need to wait
  32. Better Out-of-the-box UX
  33. Better Out-of-the-box UX
  34. Better Out-of-the-box UI
  35. User Interface Improvements
  36. User Interface Improvements
  37. User Interface Improvements ●Improved “New Item” page ●More consistent terminology
  38. 2.0 is a drop-in replacement for 1.x
  39. Get Involved Jenkins is made of people
  40. Try out Jenkins 2.0 ●jenkins-ci.org/2.0 ●jenkinsci-users@googlegroups.com ●#jenkins on Freenode
  41. Get Jenkins 2.0 (alpha) now jenkins-ci.org/2.0
  42. New Community Site: jenkins.io (Beta) ● Modern platform and UI ● Easier to use ● 1-2-3-4 Quickstart ● Centralized Documentation ● Solution-oriented Use Cases ● Events listings ● Launching March 22nd
  43. Feedback
  44. Q1 – CloudBees Jenkins Platform: Private SaaS Edition Launched – Jenkins and CJP Certification Later in 2016 – Jenkins 2.0 Release – Jenkins 2.0 LTS Release – Updated User Interface: Blue Ocean – CloudBees Jenkins Platform 16.05 Release – Jenkins World (September) Recent and Upcoming Activities
  45. Questions and Answers

Notas do Editor

  1. Here are some really cool features in Jenkins Workflow. SAs talk here about coolness of Workflow.
  2. As we said, CD involves creating Pipelines for application code. This means that for every code “check-in” by every developer, the new code needs to go through the Pipeline that will take it from Dev to Prod. So, the CD Platform needs to manage the execution of many of these Pipelines. And the pipelines can be complex. They may have decision points or branches. They may need to be paused or restarted. Modeling the real-world process of application delivery requires that these pipelines be robust, flexible and powerful.
  3. Here’s a real-world example of a complex CD Pipeline used by a Jenkins Workflow user.
  4. The CloudBees Jenkins Platform also provides a dashboard that shows the current state of the pipeline activity, such as this example, which is critical to providing a full understanding of how things are performing.
Anúncio