Old Jenkins, New Jenkins (ENG)

568e3391c8b528f2b255443e4cca27ca?s=47 Oleg Nenashev
September 23, 2019

Old Jenkins, New Jenkins (ENG)

In 2019 the Jenkins community has celebrated 15 years of the project. It is a really long time for a developer tool, but the project keeps changing every year. Jenkins in 2019 is not Jenkins we used to see in 2015. What are the current issues with the project? In which directions does it evolve? Let's talk about the recent changes, including Configuration as Code, Jenkinsfile Runner, improved Docker and Kubernetes support, etc. We will also talk about Continuous Delivery Foundation and changes it brings to the project.

568e3391c8b528f2b255443e4cca27ca?s=128

Oleg Nenashev

September 23, 2019
Tweet

Transcript

  1. © 2019 CloudBees, Inc. All Rights Reserved. Old Jenkins /

    New Jenkins Oleg Nenashev (@oleg_nenashev) Jenkins project / CloudBees Paris, Sep 23, 2019 1
  2. © 2019 CloudBees, Inc. All Rights Reserved. > whoami 2

    @oleg_nenashev oleg-nenashev • Based in Neuchatel, Switzerland • Principal SW Engineer, CloudBees • Jenkins core maintainer
  3. © 2019 CloudBees, Inc. All Rights Reserved. > whoami -jenkins

    3 @oleg_nenashev oleg-nenashev
  4. © 2019 CloudBees, Inc. All Rights Reserved. DevOptics Software Delivery

    Visibility & Insights Core Unified Software Delivery & Governance CodeShip CI/CD as a Service Flow Adaptive Release Orchestration DevOps Excellence Jenkins CloudBees Jenkins Distribution CloudBees Jenkins X Distribution 24x7 Technical Support Assisted Updates Support Accelerator Training Customer Success Managers DevOps Consultants Rollout Feature Flag Management Continuous Delivery Products and Services
  5. © 2019 CloudBees, Inc. All Rights Reserved. > whoami -cloudbees

    5 • CloudBees Jenkins Distribution • CloudBees Jenkins Support • Community (e.g. Java 11 support, Jenkinsfile Runner, JCasC) https://www.cloudbees.com
  6. © 2019 CloudBees, Inc. All Rights Reserved. About you 6

  7. © 2019 CloudBees, Inc. All Rights Reserved. Agenda ➢ Old

    Jenkins ➢ New Jenkins ➢ Jenkins #NEXT ? ➢ Q&A 7 Disclaimer: Opinions are mine, typos are mine
  8. © 2019 CloudBees, Inc. All Rights Reserved. Disclaimer ❖ Opinions

    are mine, typos are mine ❖ See also: Jeremy Hartley at DW|JW US “Jenkins state of the Union” (2019) 8
  9. © 2019 CloudBees, Inc. All Rights Reserved. 1. It’s a

    framework => flexible 2. It’s open source => customizable 3. More than 1600 plugins 4. Big community 5. Commercial support is available Who is Mr. Jenkins?
  10. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins Popularity 10

    >250.000 active installations >1600 plugins ~500 committers this quarter ~2 new plugins every week ~40 plugin releases every week
  11. © 2019 CloudBees, Inc. All Rights Reserved. Integrations 11 >1600

    plugins Integrations with hundreds of tools Automation management Automation for any kind of tasks Code & Commit Build & Config Scan & Test Release Deploy
  12. © 2019 CloudBees, Inc. All Rights Reserved. 2018 – Dev

    Ecosystem survey by JetBrains 12 https://www.jetbrains.com/research/devecosystem-2018/team-tools/
  13. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins – CI/CD

    server for software Do you agree? 13
  14. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins – CI/CD

    server for software 14
  15. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins – CI/CD

    server for software 15
  16. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins CI/CD? 16

    Continuous Integration Continuous Delivery DevOps Accounting automation Home Automation CRON с WebUI
  17. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins – Automation

    Server Do you agree now? 17
  18. © 2019 CloudBees, Inc. All Rights Reserved. 18 Image: https://www.dronetrest.com/t/diy-self-build-drones-or-ready-to-fly-rtf-drones/1414

  19. © 2019 CloudBees, Inc. All Rights Reserved. 19 Expectation

  20. © 2019 CloudBees, Inc. All Rights Reserved. 20 Expectation Reality

  21. © 2019 CloudBees, Inc. All Rights Reserved. Система Docs Plugins

    Configs Infra- structure Samples Demos CI/CD System from Jenkins Infra- structure Infra- structure 21
  22. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins – Automation

    Framework/Engine Disclaimer: IMHO 22
  23. © 2019 CloudBees, Inc. All Rights Reserved. 23

  24. © 2019 CloudBees, Inc. All Rights Reserved. 24

  25. © 2019 CloudBees, Inc. All Rights Reserved. It is hard

    to maintain Jenkins • Fine-tuning is needed • Maintenance is needed • Expertise is needed 25
  26. © 2019 CloudBees, Inc. All Rights Reserved. Learning Curve 26

    Scripts, CRON Plugins Advanced features, Custom setups
  27. © 2019 CloudBees, Inc. All Rights Reserved. >10 years of

    compatibility 27 Hudson 2 plugins still work! BUT: • Architecture issues • Old libraries • Obsolete UI • Plugin compatibility issues • Regular Security-updates
  28. © 2019 CloudBees, Inc. All Rights Reserved. Web UI… 28

  29. © 2019 CloudBees, Inc. All Rights Reserved. Scalability 29 Jenkins

    master handles the most of the workload Jobs run on master, agents execute subtasks
  30. © 2019 CloudBees, Inc. All Rights Reserved. Approach: Using “classic”

    Job types: Freestyle, Matrix, JobDSL, … Classic Approaches Keywords: • Script steps to run the logic • Custom Tools Plugin to manage tools • Throttle Concurrent Builds and Lockable Resources to dispatch access to hardware • Naginator Plugin to restart builds on-demand • Parameterized Trigger / Copy artifacts to parallelize tests and to collect results 30
  31. © 2019 CloudBees, Inc. All Rights Reserved. Classic Approaches Spaghetti

    Automation • Many job dependencies • Difficult build flow tracking • Complex configurations • Duplication Expensive maintenance 31
  32. © 2019 CloudBees, Inc. All Rights Reserved. Система Docs Plugins

    Configs Infra- structure Samples Demos Infra- structure Infra- structure 32 ? * without proper maintenance
  33. © 2019 CloudBees, Inc. All Rights Reserved. Back to the

    Future… 2015? 2018? 33
  34. © 2019 CloudBees, Inc. All Rights Reserved. https://digitalsavvy.com/elephant-in-the-room-2/ 34

  35. © 2019 CloudBees, Inc. All Rights Reserved. What changed? Cloud

    SaaS Containers DevOps 35
  36. © 2019 CloudBees, Inc. All Rights Reserved. JENKINS CHANGES! 36

  37. © 2019 CloudBees, Inc. All Rights Reserved. 37 Jenkins in

    2019 Config-as-Code Jenkins Pipeline Modern platforms Jenkins X
  38. © 2019 CloudBees, Inc. All Rights Reserved. ✓ Store together

    with the project ✓ Modify together with the project ✓ Test together with the project Automation … as code? 38
  39. © 2019 CloudBees, Inc. All Rights Reserved. Система Docs Plugins

    Configs Infra- structure Samples Demos Automation Framework … as code Infra- structure Infra- structure SCM Infrastructure as Code Configuration as Code Documentation as Code Pipeline Libraries Pipelines 39
  40. © 2019 CloudBees, Inc. All Rights Reserved. Configuration as Code

    in Jenkins Job Configuration System Configuration 40
  41. © 2019 CloudBees, Inc. All Rights Reserved. Configuration as Code

    in Jenkins Job Configuration System Configuration 41
  42. © 2019 CloudBees, Inc. All Rights Reserved. Configuration as Code

    for jobs Job DSL Job Builder Plugin Jenkins Pipeline Offered by default in Jenkins 2.0 … Groovy YAML Groovy 42
  43. © 2019 CloudBees, Inc. All Rights Reserved. Automation as Code

    43 Job DSL Pipeline (бывш. Workflow) По-умолчанию предлагается в Jenkins 2.0 Jenkins Job Builder Groovy Groovy YAML Ещё несколько десятков плагинов…
  44. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins Pipeline 44

    https://jenkins.io/doc/book/pipeline/
  45. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins Pipeline is

    a… Groovy DSL for automatic flow description ➢ Defined in SCM (Jenkinsfile) or in Job configuration ➢ Scripted or Declarative // Run on a node having the “my_fpga” label node("linux && ml509") { git url:"http://github.com/myorg/myproject.git" sh "make all" } http://bit.ly/pipeline-tutorial 45
  46. © 2019 CloudBees, Inc. All Rights Reserved. Syntax sugar on

    the top of Pipeline • “pipeline { }” closure Common configuration sections • Easy to set up • More static checks • Less flexibility 46 Declarative Pipeline https://github.com/jenkinsci/pipeline-model- definition-plugin/wiki
  47. © 2019 CloudBees, Inc. All Rights Reserved. 47 Example. Declarative

    Pipeline pipeline { agent label:"generic-linux" tools { maven "Maven 3.3.9" jdk "Oracle JDK 8u40" } stages { stage("build") { steps { sh 'mvn clean install -Dmaven.test.failure.ignore=true' } } } post { always { junit "path/to/xml" } failure { mail to:"me@ema.il", subject:"FAILURE:${currentBuild.name}", …} } }
  48. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins Pipeline is

    a… Groovy DSL for automatic flow description Item type in Jenkins Pipeline Job Multi-Branch Pipeline Organization Folder • GitHub org • BitBucket* • … 48
  49. © 2019 CloudBees, Inc. All Rights Reserved.

  50. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins Pipeline is

    a… Groovy DSL for automatic flow description Item type Pipeline as Code Ecosystem 50
  51. © 2019 CloudBees, Inc. All Rights Reserved. Branch- Source, BlueOcean,

    ... 89 - explicit support 42 - Pipeline- specific Documentation Samples Development Tools Jenkins Pipeline Ecosystem Plugins: 51
  52. © 2019 CloudBees, Inc. All Rights Reserved. Main features Independent

    from node/workspace Parallelization Stages Robustness 52
  53. © 2019 CloudBees, Inc. All Rights Reserved. Pipeline Shared Libraries

    ➢ Libs are located in SCM ➢ Versioning ➢ Encapsulation ➢ Visibility scopes 53
  54. © 2019 CloudBees, Inc. All Rights Reserved. Library usage 1.

    Take library components 54
  55. © 2019 CloudBees, Inc. All Rights Reserved. Library usage 1.

    Take library components 2. Build your own bicycle Pipeline Add some glue! 55
  56. © 2019 CloudBees, Inc. All Rights Reserved. More about Pipeline

    Features • http://bit.ly/pipeline-docs • http://bit.ly/pipeline-compatibility 56
  57. © 2019 CloudBees, Inc. All Rights Reserved. Configuration as Code

    in Jenkins Job Configuration System Configuration 57
  58. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins Configuration… as

    Code External Tools Jenkins CLI and REST API python- jenkins jenkins- client (java) Configuration Management systems Puppet, Ansible, Chef Docker Solutions within Jenkins project Groovy Hooks Scriptler Plugin JCasC Plugin Just examples… 58
  59. © 2019 CloudBees, Inc. All Rights Reserved. JCasC Plugin! Jenkins

    Configuration-as-Code Plugin https://plugins.jenkins.io/configuration-as-code 59
  60. © 2019 CloudBees, Inc. All Rights Reserved. 60 JCasC Plugin

    • Sub-project in Jenkins • Feb 2018 - first alpha • Sep 2018 - 1.0 • Now - 1.8 • Configuration via YAML jenkinsci/configuration-as-code-plugin
  61. © 2019 CloudBees, Inc. All Rights Reserved. jenkins: systemMessage: "JCasC

    Demo" numExecutors: 1 scmCheckoutRetryCount: 4 mode: NORMAL securityRealm: local: allowsSignup: false users: - id: demoAdmin password: ${adminpw} jenkins.yaml 61
  62. © 2019 CloudBees, Inc. All Rights Reserved. • YAML specification

    • Configuration export from Jenkins • CLI and REST API for configuration management • Pre-flight validations and dry-run • Support of many plugins out-of-the-box • [SOON] – JSON Schema for instances Features 62
  63. © 2019 CloudBees, Inc. All Rights Reserved. https://github.com/oleg-nenashev/demo- jenkins-config-as-code/tree/casc-plugin 63

    https://github.com/cloudbees-oss/cjd-jcasc-demo
  64. © 2019 CloudBees, Inc. All Rights Reserved. Demo. Local Pipeline

    Development Env Intellij IDEA Filesystem SCM Plugin • Documentation, Syntax • Static analysis • Debug (only for hooks) Local Jenkins instance Source Code (local .git repos) • Configuration-as-Code • Same as production • Repos with libs • Jenkinsfile JENKINS_HOME (volume) 64
  65. © 2019 CloudBees, Inc. All Rights Reserved. JCasC Limitations (temporary?)

    • Not all plugins are supported • YAML - No dynamic logic / scripting • Startup Chicken&Egg for plugins & jobs • Handling of removed sections • Export from UI – many open issues • No read-only admin access 65
  66. © 2019 CloudBees, Inc. All Rights Reserved. Combining JCasC and

    Groovy hooks 66 JOBS_LOADED EXTENSIONS_AUGMENTED COMPLETED Groovy Hooks: init() JCasC PLUGINS_STARTED . . . Groovy hooks run after JCasC Hooks can fine-tune the configuration: • Missing integrations • Dynamic scripting • Job configurations and migrations Use JCasC where possible!
  67. © 2019 CloudBees, Inc. All Rights Reserved. Comparison JCasC Plugin

    Groovy Hooks YAML – standard declarative definition Low barrier to entry Limited integrations Forward compatibility risks External rollback Apply changes w/o restart No debugging, YAGNI? Dry run mode + validation Export from UI CLI and REST API for CM Plugin management Groovy – general-purpose OOP language High barrier to entry Can manage everything Compatible if API is stable External rollback Restart is required Debugging support Plugin Management 67
  68. © 2019 CloudBees, Inc. All Rights Reserved. © 2019 CloudBees,

    Inc. All Rights Reserved. Platforms 68
  69. © 2019 CloudBees, Inc. All Rights Reserved. Platform SIG Started

    in Jul 2018 Platform support (OS, JVM) Installers Docker packaging https://jenkins.io/sigs/platform/ 69
  70. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins & Docker.

    Packaging https://hub.docker.com/r/jenkins/ 70
  71. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins & Docker.

    Plugins Docker Plugin Docker Pipeline Plugin Docker Custom Build Environment Plugin … Yet Another Docker Plugin Kubernetes Plugin Kubernetes Pipeline Plugin … 71
  72. © 2019 CloudBees, Inc. All Rights Reserved. Example: Docker Pipeline

    Plugin https://plugins.jenkins.io/docker-workflow docker.image('onenashev/gcc-riscv:6.4-rc').inside { checkout scm sh "make clean test" } 72
  73. © 2019 CloudBees, Inc. All Rights Reserved. Kubernetes ➢ Plugins

    (Kubernetes Plugin & Co) ➢ Helm charts ➢ Kubernetes operator 73
  74. © 2019 CloudBees, Inc. All Rights Reserved. Example: Kubernetes Plugin

    def label = "gcc-riscv-${UUID.randomUUID().toString()}" podTemplate(name: 'test', label: label, containers: [ containerTemplate(name: 'gcc-riscv', image: 'onenashev/gcc-riscv:6.4-rc’, resourceRequestCpu: ‘2’, resourceLimitMemory: ‘8Gi' ttyEnabled: true, command: 'cat')]) { node(label) { checkout scm sh "make clean test" step([$class: 'TapPublisher', testResults: 'output/test/report.tap', ...]) } } https://plugins.jenkins.io/kubernetes 74
  75. © 2019 CloudBees, Inc. All Rights Reserved. Cloud Providers Plugins

    for all major Cloud Providers Jenkins on [some] marketplaces 75
  76. © 2019 CloudBees, Inc. All Rights Reserved. Not only about

    containers… 76
  77. © 2019 CloudBees, Inc. All Rights Reserved. JVM Java 11

    is fully supported in Jenkins 2.164+ Jenkins is a member of Quality Outreach Support beyond OpenJDK 77
  78. © 2019 CloudBees, Inc. All Rights Reserved. 78 https://jenkins.io/blog/2019/03/11/let-s-celebrate-java-11-support/

  79. © 2019 CloudBees, Inc. All Rights Reserved. © 2019 CloudBees,

    Inc. All Rights Reserved. Jenkins #NEXT 79
  80. © 2019 CloudBees, Inc. All Rights Reserved. 80 Permanent agents

    On-demand agents from cloud providers Jenkins Master Web UI
  81. © 2019 CloudBees, Inc. All Rights Reserved. Master as a

    SPoF Macroservice 81 Permanent agents On-demand agents from cloud providers Web UI Jenkins Master
  82. © 2019 CloudBees, Inc. All Rights Reserved. Aug 31, 2018

    – Kohsuke Kawaguchi, “Jenkins: Shifting Gears” https://jenkins.io/blog/2018/08/31/shifting-gears/ Slides: https://drive.google.com/file/d/160LjRKw42XXuXT2n4j8BLCzsSL5z2m2_/view 82
  83. © 2019 CloudBees, Inc. All Rights Reserved. Shifting Gears: Our

    Amazing Success Extensible General Purpose Community 83 https://flic.kr/p/5FawSa
  84. © 2019 CloudBees, Inc. All Rights Reserved. Shifting Gears: Making

    Changes 84
  85. © 2019 CloudBees, Inc. All Rights Reserved. Cloud Native Jenkins

    “General purpose CI/CD engine that runs on Kubernetes and embraces fundamentally different architecture & extensibility mechanisms” 85 https://flic.kr/p/75ncBF Kohsuke Kawaguchi, 2018
  86. © 2019 CloudBees, Inc. All Rights Reserved. • Best service

    for each need • Pay per use • “Infinite” scaling • Easy to use • Easy to maintain • Fast to develop 86 https://flic.kr/p/75ncBF Cloud Native Jenkins
  87. © 2019 CloudBees, Inc. All Rights Reserved. Cloud Native Special

    Interest Group • Founded in July 2018 • https://jenkins.io/sigs/cloud-native • https://gitter.im/jenkinsci/cloud-native-sig Goal: Improve Jenkins to run on Cloud environments as a "Cloud Native" application 87 ?
  88. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins X? 88

  89. © 2019 CloudBees, Inc. All Rights Reserved. 89 https://jenkins-x.io

  90. © 2019 CloudBees, Inc. All Rights Reserved. 90

  91. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins X. OOTB

    experience • Build packs • GitOps • Nexus, chartmuseum, monocular • Environments: Local, staging, production • IDE Integration • Jenkins X Pipelines 91
  92. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins X 1.x.

    Modes and engines 92 Static Masters Serverless build engines Jenkinsfile Runner Tekton Classic Jenkins
  93. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins X 2.x.

    Modes and engines 93 Static Masters Serverless build engines Jenkinsfile Runner Tekton (default in 2.0) Classic Jenkins @Deprecated
  94. © 2019 CloudBees, Inc. All Rights Reserved. CommentOps - communication

    with users 94
  95. © 2019 CloudBees, Inc. All Rights Reserved. 95 • Cloud

    native • K8s native • Scalable • AWESOME (c) Jenkins X 2.x is…
  96. © 2019 CloudBees, Inc. All Rights Reserved. 96 • Cloud

    native • K8s native • Scalable • AWESOME (c) Universal • GitHub-only • GitOps-only • Kubernetes-only • … Jenkins X 2.x is… Jenkins X 2.x is NOT…
  97. © 2019 CloudBees, Inc. All Rights Reserved. 97 • Cloud

    native • K8s native • Scalable • AWESOME (c) Universal • GitHub-only • GitOps-only • Kubernetes-only • … Jenkins X 2.x is… Jenkins X 2.x is NOT… Try out Jenkins X if it fits your environment OR if you plan to go all-in Kubernetes. Jenkins is still around for other cases
  98. © 2019 CloudBees, Inc. All Rights Reserved. 98 Going Back?

  99. © 2019 CloudBees, Inc. All Rights Reserved. Master as a

    SPoF Macroservice 99 Permanent agents On-demand agents from cloud providers Web UI Jenkins Master
  100. © 2019 CloudBees, Inc. All Rights Reserved. (┛ಠ_ಠ)┛彡┻━┻ • What

    if Jenkins master was “on- demand”? 100
  101. © 2019 CloudBees, Inc. All Rights Reserved. Jenkinsfile Runner https://github.com/jenkinsci/jenkinsfile-runner

    Started by Kohsuke in Mar 2018 3 maintainers, 19 contributors Status: Beta (1.0-beta-8) 101
  102. © 2019 CloudBees, Inc. All Rights Reserved. JFR TL;DR •

    Binary and base Docker image • Runs Pipeline and shuts down • Runs everywhere https://github.com/jenkinsci/jenkinsfile-runner 102
  103. © 2019 CloudBees, Inc. All Rights Reserved. Usage • Pass

    workspace with project/Jenkinsfile • Pass cache for local data (if needed) docker run --rm \ -v $(shell pwd)/Jenkinsfile:/workspace/Jenkinsfile \ jenkins4eval/jenkinsfile-runner 103
  104. © 2019 CloudBees, Inc. All Rights Reserved. DEMO https://github.com/jenkinsci/jenkinsfile-runner/tree/master/demo/cwp 104

  105. © 2019 CloudBees, Inc. All Rights Reserved. Demo. Our Jenkinsfile

    105 docker run --rm \ -v $(shell pwd)/Jenkinsfile:/workspace/Jenkinsfile \ jenkins4eval/jenkinsfile-runner
  106. © 2019 CloudBees, Inc. All Rights Reserved. 106

  107. © 2019 CloudBees, Inc. All Rights Reserved. Features Startup in

    few seconds No-sandbox mode support Java 11 support Jenkinsfile Runner Test Framework jenkinsci/jenkinsfile-runner-test-framework 107
  108. © 2019 CloudBees, Inc. All Rights Reserved. Jenkinsfile Runner is

    not a silver bullet! 108
  109. © 2019 CloudBees, Inc. All Rights Reserved. Limitations Jenkinsfile Runner

    is not fully compatible • No Web UI, no way to extract Jenkins reports • No native support of external storage • No build throttling, cross-master communication, etc. 109
  110. © 2019 CloudBees, Inc. All Rights Reserved. Limitations Jenkinsfile Runner

    is not fully compatible • No Web UI, no way to extract Jenkins reports • No native support of external storage • No build throttling, cross-master communication, etc. (?) Single container, single agent • Docker and Kubernetes plugins need tweaks to produce sidecar containers • Remoting 3.34 allows connection to headless masters • https://github.com/jenkinsci/kubernetes-plugin/pull/602 110
  111. © 2019 CloudBees, Inc. All Rights Reserved. Jenkinsfile Runner. Usage

    examples Jenkins X, Serverless mode (before Jenkins X 2.0 with Tekton) • https://github.com/jenkins-x/jenkins-x-serverless ci.jenkins.io-runner • https://github.com/jenkinsci/ci.jenkins.io-runner “FaaS” packaging • GitHub Actions: https://github.com/jonico/jenkinsfile-runner-github-actions • Codeship: https://github.com/oleg-nenashev/codeship-jenkinsfile • AWS Lambda: https://github.com/carlossg/jenkinsfile-runner-lambda • Project Fn: https://github.com/carlossg/jenkinsfile-runner-fn 111
  112. © 2019 CloudBees, Inc. All Rights Reserved. “Packaging”? 112

  113. © 2019 CloudBees, Inc. All Rights Reserved. Jenkinsfile Runner flavors

    113 Vanilla: Docker/Binary in the official repo • https://github.com/jenkinsci/jenkinsfile-runner • https://hub.docker.com/r/jenkins4eval/jenkinsfile-runner
  114. © 2019 CloudBees, Inc. All Rights Reserved. Jenkinsfile Runner flavors

    Vanilla: Docker/Binary in the official repo • https://github.com/jenkinsci/jenkinsfile-runner • https://hub.docker.com/r/jenkins4eval/jenkinsfile-runner Custom JFR packages • https://jenkins.io/blog/2018/10/16/custom-war-packager/ • Ready-to-fly Docker images with plugins and configs • Way to go in 95% of cases 114
  115. © 2019 CloudBees, Inc. All Rights Reserved. Building custom Jenkinsfile

    Runner images Custom WAR Packager Jenkinsfile Runner Core and Plugins Configuration-as-code Packaging Ready-to-fly Docker image Base image https://jenkins.io/blog/2018/10/16/custom-war-packager/ 115
  116. © 2019 CloudBees, Inc. All Rights Reserved. Custom WAR Packager

    and Self-configuration 1. Custom WAR Packager is managed by a config YAML 2. Docker image: plugins.txt, Java flags, etc. 3. Groovy Init Scripts 4. AND: Configuration-as-Code Plugin https://plugins.jenkins.io/configuration-as-code Allows configuring Jenkins from YAML 116 https://github.com/jenkinsci/custom-war-packager
  117. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins X 2.x.

    Modes and engines 117 Static Masters Serverless build engines Jenkinsfile Runner Tekton (default in 2.0) Classic Jenkins @Deprecated
  118. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins X Serverless

    Build flow Single-shot masters build flow 118
  119. © 2019 CloudBees, Inc. All Rights Reserved. https://medium.com/@jdrawlings/serverless- jenkins-with-jenkins-x-9134cbfe6870 Jenkinsfile

    Runner is Here 119 Jenkinsfile Runner
  120. © 2019 CloudBees, Inc. All Rights Reserved. Jenkinsfiles on CodeShip?

    120
  121. © 2019 CloudBees, Inc. All Rights Reserved. Jenkinsfile Runner on

    CloudBees CodeShip • Jenkins has no good SaaS • CodeShip Pro - CI SaaS with native Docker support • Free tiers for open-source projects • What if we run Jenkins there? 121 https://codeship.com/features/pro
  122. © 2019 CloudBees, Inc. All Rights Reserved. Demo 1 122

    codeship-steps.yml codeship-services.yml Jenkinsfile https://github.com/oleg-nenashev/codeship-jenkinsfile
  123. © 2019 CloudBees, Inc. All Rights Reserved. 123

  124. © 2019 CloudBees, Inc. All Rights Reserved. Example 2. Building

    a Jenkins plugin in CodeShip https://github.com/oleg-nenashev/mailer-plugin/tree/codeship-demo • Using ci.jenkins.io-runner ◦ https://github.com/jenkinsci/ci.jenkins.io-runner • Using the standard Jenkins Pipeline library ◦ https://github.com/jenkins-infra/pipeline-library • Using standard Jenkinsfile ◦ buildPlugin() 124
  125. © 2019 CloudBees, Inc. All Rights Reserved. Example 2. Building

    a Jenkins plugin in CodeShip codeship-services.yml codeship-steps.yml 125 Jenkinsfile
  126. © 2019 CloudBees, Inc. All Rights Reserved. 126

  127. © 2019 CloudBees, Inc. All Rights Reserved. CodeShip. Build history

    127
  128. © 2019 CloudBees, Inc. All Rights Reserved. 128 !=

  129. © 2019 CloudBees, Inc. All Rights Reserved. Takeaways ◦ Jenkins

    != CRON with WEB UI ◦ Jenkins in 2019 – Jenkins in 2012 ◦ Jenkins evolves ◦ Cool projects are underway 129
  130. © 2019 CloudBees, Inc. All Rights Reserved. What to try?

    ◦ Jenkins Pipeline ◦ Configuration-as-Code Plugin ◦ Jenkins X if you do CD in K8s ◦ Jenkinsfile Runner 130
  131. © 2019 CloudBees, Inc. All Rights Reserved. 131

  132. © 2019 CloudBees, Inc. All Rights Reserved. My wishlist Better

    tools for plugin maintainers and contributors Cloud Native Jenkins ➢ Pluggable storage ➢ Jenkinsfile Runner ➢ Jenkinsfile Runner Jenkins Plugin ➢ Everything-as-code Modern UX/UI ➢ New framework for developers (JS-based) ➢ REST API / GraphQL 132
  133. © 2019 CloudBees, Inc. All Rights Reserved. What is your

    Jenkins story? 133
  134. © 2019 CloudBees, Inc. All Rights Reserved. © 2019 CloudBees,

    Inc. All Rights Reserved. Jenkins does not go alone 134
  135. A neutral home for the next generation of continuous delivery

    collaboration
  136. © 2019 CloudBees, Inc. All Rights Reserved. CDF Members 136

    PREMIER GENERAL AND END USER MEMBERS
  137. © 2019 CloudBees, Inc. All Rights Reserved. Linux Foundation is

    not just about Linux... 137 Automotive Networking Cloud Security Blockchain Web Embedded
  138. © 2019 CloudBees, Inc. All Rights Reserved. CDF Mission •

    CDF believes in the power of Continuous Delivery to empower developers and teams and to produce high quality software more rapidly • CDF believes in the open-source solutions collectively addressing the whole Software Delivery LifeCycle • CDF fosters and sustains the ecosystem of open-source, vendor neutral projects through collaborations and interoperability • CDF advocates this idea and encourages collaborations among practitioners to share and improve their practices 138
  139. © 2019 CloudBees, Inc. All Rights Reserved. Projects in CDF

    • Jenkins: https://github.com/jenkinsci • Jenkins-X: https://github.com/jenkins-x • Spinnaker: https://github.com/spinnaker • Tekton: https://github.com/tektoncd 139
  140. © 2019 CloudBees, Inc. All Rights Reserved. 2019 Jenkins Board

    and Officer elections • 3 => 5 board members • All officers to be reelected: Release, Security, Infrastructure, Events, Documentation (NEW) • Oct 4 – Nominations close • Oct 14-27 - Voting • Nov 4 – Results 140 https://groups.google.com/forum/#!msg/jenkinsci- dev/vKi9JpxTQxY/2KgDsKUeAQAJ
  141. © 2019 CloudBees, Inc. All Rights Reserved. It’s a great

    time to contribute ;) https://jenkins.io/participate Jenkins needs you! 141
  142. © 2019 CloudBees, Inc. All Rights Reserved. Join special interest

    groups (SIGs) Let us know about your pain-points Share your stories and experiences ➢ jenkins.io/blog and other blogs ➢ Meetups ➢ Jenkins DEV list Contribution is not just Code Jenkins needs you! 142
  143. © 2019 CloudBees, Inc. All Rights Reserved. 143 https://jenkins.io/events/hacktoberfest/

  144. © 2019 CloudBees, Inc. All Rights Reserved. Contacts: E-mail: onenashev@cloudbees.com

    GitHub: oleg-nenashev Twitter: @oleg_nenashev QUESTIONS? go.cloudbees.com 144