Slide 1

Slide 1 text

Jenkins 2 Jug Summer Camp’16

Slide 2

Slide 2 text

About Jenkins An extensible automation server built on the JVM with hundreds of plugins to support nearly every continuous integration, delivery and deployment pipeline imaginable 2

Slide 3

Slide 3 text

About me Arnaud Héritier Long time Jenkins user and community member • August 2007 : My first discussion on the mailing list and my first ticket about Jenkins born Hudson 1.131 Contributor on various plugins: • Maven, Xcode, Appaloosa, … Member of the Jenkins infra team • I love to reboot confluence J Support Team Manager at CloudBees, Inc • I help our customers to get the best from Jenkins 3 @aheritier aheritier

Slide 4

Slide 4 text

About me Nicolas De Loof Jenkins contributor since 1664 Contributor on various plugins • build-flow (aka pipeline prequel) • maintainer on git-plugin for 1 year • Some docker plugins Docker Captain Senior Engineer at CloudBees, Inc • I write bugs so Arnaud has a Job 4 @ndeloof ndeloof

Slide 5

Slide 5 text

5 https://groups.google.com/d/msg/jenkinsci-dev/vbXK7JJekFw/BlEvO0UxBgAJ

Slide 6

Slide 6 text

Developers community reaction to the announce 6 https://www.flickr.com/photos/kilgarron/9151943045

Slide 7

Slide 7 text

My reaction as a Jenkins user 7 https://pixabay.com/en/fear-fright-danger-horror-scared-1172372/

Slide 8

Slide 8 text

Let’s discuss Why Jenkins 2? What is Jenkins 2? Road beyond 2… 8

Slide 9

Slide 9 text

Why Jenkins 2?

Slide 10

Slide 10 text

Why 2.x? 1.x line is now 11 years old. No, really. Lots of great stuff has gone into Jenkins in the last couple years but users don’t know about them! Oh, and some fairly big changes! 10 ~/Code/jenkinsci/jenkins/war (git:master %)$ mvn dependency:list ... [INFO] org.acegisecurity:acegi-security:jar:1.0.7:compile ... [INFO] org.springframework:spring-core:jar:2.5.6.SEC03:compile ... [INFO] com.google.guava:guava:jar:11.0.1:compile ... [INFO] org.codehaus.groovy:groovy-all:jar:1.8.9:compile ...

Slide 11

Slide 11 text

Overwhelmed by Jenkins? Me too. Dear Mr Jenkins, There are too many plugins these days. Please eliminate three hundred. P.S. I am not a crackpot. 11

Slide 12

Slide 12 text

Initial Experience is Complicated Installing Jenkins? That’s easy. • But then there’s finding the right plugins… • And setting up security… • And eighty other things you probably forgot about… That should be easier !! 12

Slide 13

Slide 13 text

Continuous Delivery of All the Things Continuous Delivery is eating the software that is eating the world. More shops moving in this direction. Jenkins is a key part of how they get there. New use cases need new user interfaces - one size doesn’t always fit all. How can we make adopting Jenkins for CD smoother without limiting the power Jenkins has for other use cases? 13

Slide 14

Slide 14 text

How do I…where do I…what do I… Documentation • jenkins-ci.org site was 6 years old ▸ Old tooling. ▸ Awkward content discovery. ▸ Not a great way to share documentation and guides. • wiki.jenkins-ci.org is there too, but it’s not easy to navigate. Brand • jenkins-ci.org ! CI ?!? ▸ Jenkins isn’t only a CI. 14

Slide 15

Slide 15 text

Meet Jenkins 2.x jenkins.io/2.0

Slide 16

Slide 16 text

2.0 Themes Improved “out of the box” user experience User interface improvements Pipeline as code Website, Infra, the community vibrant 16 jenkins.io/content/jenkins-20-proposals/

Slide 17

Slide 17 text

Better Out-of-the-box UX

Slide 18

Slide 18 text

Out of the Box User Experience New setup wizard! Security configuration is part of the setup wizard! • …because we all forget to configure security sometimes. A better, broader set of plugins included by default! • Less need to go hunting through 1100+ plugins. 18

Slide 19

Slide 19 text

Security - Unlock jenkins 19

Slide 20

Slide 20 text

Plugins installation wizard 20

Slide 21

Slide 21 text

Plugins installation wizard 21

Slide 22

Slide 22 text

Plugins installation wizard 22

Slide 23

Slide 23 text

Security – Create 1st administrator account 23

Slide 24

Slide 24 text

Let’s go 24

Slide 25

Slide 25 text

Configure Global Security – Secured by default! 25

Slide 26

Slide 26 text

User Interface Improvements 26

Slide 27

Slide 27 text

User Interface Improvements Improved “New Item” page Jobs configuration pages are going to be less messy! • Tabs for everyone! New Global Tool Configuration page More consistent terminology (exemple: agent vs node vs slave) 27

Slide 28

Slide 28 text

New item page 28

Slide 29

Slide 29 text

New configuration tabs 29

Slide 30

Slide 30 text

Global Tool Configuration 30

Slide 31

Slide 31 text

Blue Ocean A new user experience for Jenkins 31 https://jenkins.io/projects/blueocean/

Slide 32

Slide 32 text

Modern Technologies Modern JavaScript toolchain • EcmaScript6, React, NPM • js-modules Client side Extension points • Blue Ocean libraries are built on ES6 and React.js and provide an extensible client side component model Server Sent Events • UI update in real time 32

Slide 33

Slide 33 text

Jenkins Design “Language” 33

Slide 34

Slide 34 text

Blue Ocean – Dashboard 34

Slide 35

Slide 35 text

Blue Ocean – Pipeline Job - Activity 35

Slide 36

Slide 36 text

Blue Ocean – Pipeline Job - Branches 36

Slide 37

Slide 37 text

Blue Ocean – Pipeline Job – Pull requests 37

Slide 38

Slide 38 text

Blue Ocean – Pipeline Build - KO 38

Slide 39

Slide 39 text

Blue Ocean – Pipeline Build - OK 39

Slide 40

Slide 40 text

Blue Ocean - Notifications 40

Slide 41

Slide 41 text

Blue Ocean - Notifications 41

Slide 42

Slide 42 text

Blue Ocean - Notifications 42

Slide 43

Slide 43 text

Blue Ocean - Personalized view 43

Slide 44

Slide 44 text

Pipeline as Code 44

Slide 45

Slide 45 text

Pipeline as Code Introduce “pipeline” as a new type in Jenkins Codify an implicit series of stages/steps directly in your job definition or into an explicit Jenkinsfile in your/a source repository Built-in global library to share Pipeline scripts, functions, variables across jobs on your master. Extend the DSL with your own steps. Durable tasks keep running while the Jenkins master restarts. 45

Slide 46

Slide 46 text

Pipeline as Code Execute arbitrary build steps in parallel easily. Have jobs wait for input from users before continuing to the next step. No more need to glue multiple jobs together to do one connected pipeline across multiple nodes or repos! Run part of the job on one node, then switch to another node! Check out multiple SCM repositories into one job! Resumability from checkpoints (CloudBees Jenkins Platform only) 46

Slide 47

Slide 47 text

Pipeline sample 47 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() } github.com/jenkinsci/pipeline-examples

Slide 48

Slide 48 text

Pipeline configuration 48

Slide 49

Slide 49 text

Jenkinsfile 49 github.com/jenkins-demo

Slide 50

Slide 50 text

Snippet Generator 50

Slide 51

Slide 51 text

Pipeline Stage View 51

Slide 52

Slide 52 text

Pipeline Stage View 52

Slide 53

Slide 53 text

Pipeline Stage View 53

Slide 54

Slide 54 text

Pipeline Features. Multi-Branch Multi-Branch Pipeline Plugin • Job configuration only contains reference to the SCM (Git/GitHub, BitBucket, …) • Jenkins takes Pipeline from Jenkinsfile in SCM • Jenkins creates separate subtasks for branches, builds and reports results separately • Pull-request builds Organization Folder Plugin (Same thing for GitHub and BitBucket orgs) • 1 single spec in Jenkins for the many projects • Jenkins creates separate multi-branch folders for each repository 54

Slide 55

Slide 55 text

Pipeline Multi-Branch 55

Slide 56

Slide 56 text

Pipeline Multi-Branch 56

Slide 57

Slide 57 text

Pipeline Organization Folder 57 github.com/jenkins-demo

Slide 58

Slide 58 text

Pipeline Organization Folder 58 github.com/jenkins-demo

Slide 59

Slide 59 text

Pipeline Organization Folder 59 github.com/jenkins-demo

Slide 60

Slide 60 text

Pipeline - Coming soon… More plugin integrations Pipeline syntax highlighting and docs in IDE Shared libraries Declarative DSL (Kyoto) Graphical editor of Jenkins pipelines… 60

Slide 61

Slide 61 text

Graphical Pipeline Editor 61 https://github.com/jenkinsci/pipeline-editor-plugin

Slide 62

Slide 62 text

Community 62

Slide 63

Slide 63 text

Website as part of release? Wait, why is this part of the 2.0 release? Can’t you just update the website whenever? Sure, but like we said, the changes we’re making to the website are to address a lot of the things 2.0 proper is addressing: • On-boarding • Plugin discovery • Documentation • Examples and resources 63

Slide 64

Slide 64 text

New website: the guts Previous website • Drupal • Dynamically generated • Hard to contribute to - gotta get an account, submit a blog post, etc… Current website • Static site generation • Awestruct and Asciidoc • Contributing? Just submit a pull request to https://github.com/jenkins-infra/jenkins.io and tada! 64

Slide 65

Slide 65 text

Better home for documentation and reference What we’re calling “Solutions Pages” • Landing pages for collections of docs, blog posts, reference material and advice for specific Jenkins use cases. • i.e., a Ruby solution page, a Docker solution page, etc A one-stop-shop for finding what you *need* to know for your Jenkins usage. ASAP: The Jenkins definitive guide, a real browsable end-user documentation 65

Slide 66

Slide 66 text

http://jenkins-ci.org 66

Slide 67

Slide 67 text

https://jenkins.io 67

Slide 68

Slide 68 text

Project Voltron 68

Slide 69

Slide 69 text

Infrastructure Moving to Azure On demand build jobs for plugins using pipeline … 69 © 2016 CloudBees, Inc. All Rights Reserved.

Slide 70

Slide 70 text

2.x Timeline / Roadmap 70

Slide 71

Slide 71 text

71

Slide 72

Slide 72 text

2.x Timeline / Roadmap April 21st: • Jenkins 2.0 was tagged and released April 25th: • Jenkins 2.0 is announced July 6th: • The first LTS based on 2.x: 2.7.1 • 1.x maintenance is stopped Sept 8th: • Jenkins OSS LTS 2.7.4 72

Slide 73

Slide 73 text

Road Beyond 2.0

Slide 74

Slide 74 text

2.0 Retrospective 74

Slide 75

Slide 75 text

2.0 Retrospective Discussing “2.0” started conversations about much bigger and involved changes The “weekly incremental release” model has left big challenges unaddressed Aging user interface layer is difficult to substantially improve 75 https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+2.0

Slide 76

Slide 76 text

ten·ta·tive (tĕn′tə-tĭv) adj. Not fully worked out, concluded, or agreed upon; provisional 76

Slide 77

Slide 77 text

Themes Continuous Delivery Scalability & Availability User Experience 77

Slide 78

Slide 78 text

Continuous Delivery 78

Slide 79

Slide 79 text

Continuous Delivery Model “Application” and “Environments” in Jenkins Inform Jenkins of what happens with them • synchronous: build owns the deployment • asynchronous: external reporters/deployment tools notify Jenkins upon completion Expose what’s “in” Environments • Differences between deployments, e.g. commits, tickets, etc 79

Slide 80

Slide 80 text

Scalability & Availability 80

Slide 81

Slide 81 text

Storage & Availability Configurations, build records, logs, fingerprints and artifacts all currently live on master node Reduce local disk dependency on master node Storage backend pluggability • BYODB (bring your own data backend) 81

Slide 82

Slide 82 text

Storage & Availability: Clustering Break a single-JVM master node into a conceptual “master” across multiple JVMs Prevent need for “hard downtime” to modify, etc Must still run as a single instance Evaluate multi-tenancy via: • Access controls • Per-folder configuration separation • ? 82

Slide 83

Slide 83 text

Storage & Availability: Clustering Defer more “master” work out to separate JVMs Develop more “stateless” components which can scale horizontally 83

Slide 84

Slide 84 text

More UI improvements … 84

Slide 85

Slide 85 text

Plugin Manager… 85

Slide 86

Slide 86 text

Conclusion

Slide 87

Slide 87 text

Conclusion Jenkins 2.0 is a new start for the community. But 2.0 is just a drop-in replacement for 1.x • With the exception of the servlet 3.1 (Java EE 7) container pre- requisite (Apache Tomcat 8, Wildfly 8, Glassfish 4, Websphere 9...) and the removal of the AJP connector from the embedded Winstone-Jetty container All the technical evolutions (like javascript modularization) are in place to revolution Jenkins in a near future. The usage of major versions is a good change which will enforce to identify and accept breaking changes to • define a clearer roadmap for users ( 3.x, 4.x, …. ) • organize this middle/long term work within the team 87

Slide 88

Slide 88 text

Try out Jenkins 2.x now! Jenkins 2 is here !! Download and discover it from • jenkins.io / jenkins.io/2.0 Give a try to weekly releases and share your feedback with the community • [email protected] • #jenkins IRC channel on Freenode 88

Slide 89

Slide 89 text

Questions And (perhaps) answers

Slide 90

Slide 90 text

Useful links Jenkins project • Website: https://jenkins.io • GitHub: https://github.com/jenkinsci/ Demo • Samples: https://github.com/jenkins-demo CloudBees • Website: https://www.cloudbees.com • CloudBees Jenkins Platform ▸ https://www.cloudbees.com/products/cloudbees-jenkins-platform 90

Slide 91

Slide 91 text

Greatings Thanks to R. Tyler Croy, Oleg Nenashev, James Dumay for all the inputs to create this presentation 91

Slide 92

Slide 92 text

Thanks 92