Jenkins 2.0
Make Jenkins Great Again!
Miyata Jumpei (@miyajan)
Mar 18, 2017
Productivity Engineering - Forkwell Meetup #4
⾃⼰紹介
• 宮⽥ 淳平 (@miyajan)
• Cybozu
• ⽣産性向上チーム
• Jenkinsおじさん
Jenkins 2.0!
Background
History
• 2005 Hudson 1.0
• 2011 Forked to Jenkins
• 2016/04 Jenkins 2.0
Jenkins 1.0
• 10 years
• 100K active users
• 1000 plugins
• CI
•
• /UI
• Jenkins
• CI/CD
• UX
https://jenkins.io/blog/2016/04/26/jenkins-20-is-here/
Jenkins 2.0
• 10
•
• 1.0
• Deprecated: Jenkins
$ docker run -p 8080:8080 jenkins:2.32.3
# http://localhost:8080
Try Jenkins 2.0
Jenkins 2.0 Features
Suggested Plugins
•
•
• …
Jenkins 1.0
Suggested Plugins
•
•
• Pipeline, Git, Mail, Credential Binding, etc.
Jenkins 2.0
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Pipeline
•
• Build Pipeline Plugin
• Delivery Pipeline Plugin
•
•
•
Jenkins 1.0
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Pipeline Plugin
• DSL( )
• 1
•
• master
Jenkins 2.0
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Pipeline DSL
GUI
•
•
• JobConfigHistory Plugin …
Jenkins 1.0
300 input
Pipeline as Code
• DSL(Groovy)
•
•
•
Jenkins 2.0
•
•
• https://github.com/jenkinsci/pipeline-
plugin/blob/master/COMPATIBILITY.md
•
• https://github.com/jenkinsci/pipeline-
plugin/blob/master/DEVGUIDE.md
Jenkins 2.0
Scripted Pipeline &
Declarative Pipeline
Scripted Pipeline
• Pipeline
•
•
• try/catch…
Jenkins 2.0
node(‘has-docker’) {
try {
checkout scm
stage(‘Build’) {
sh ‘mvn clean install’
}
stage(‘Archive’) {
( )
}
if (currentBuild.result == 'SUCCESS') {
mail to:"me@example.com", subject:"SUCCESS", body: "passed."
}
}
catch (exc) {
mail to:"me@example.com", subject:"FAILURE", body: "failed."
}
finally {
deleteDir()
}
}
Declarative Pipeline
•
•
• Lint
Jenkins 2.0
pipeline {
agent label:’has-docker’, dockerfile: true
stages {
stage("Build") {
steps {
sh 'mvn clean install'
}
}
stage("Archive"){
( )
}
}
post {
always {
deleteDir()
}
success {
mail to:"me@example.com", subject:"SUCCESS", body: "passed."
}
failure {
mail to:"me@example.com", subject:"FAILURE", body: "failed."
}
}
}
Lint
•
• curl ssh lint
• https://github.com/jenkinsci/pipeline-model-
definition-plugin/wiki/Validating-(or-linting)-a-
Declarative-Jenkinsfile-from-the-command-line
• npm
• https://www.npmjs.com/package/jflint
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Lint from CLI
• curl ssh lint
• https://github.com/jenkinsci/pipeline-model-
definition-plugin/wiki/Validating-(or-linting)-a-
Declarative-Jenkinsfile-from-the-command-line
• npm
• https://www.npmjs.com/package/jflint
• Declarative Pipeline
• “script” Scripted
Pipeline
Declarative Pipeline
Examples
Build in Container
// simple
agent {
docker “ubuntu:16.04”
}
// specify label & args
agent {
docker {
image “ubuntu:16.04”
label “docker-nodes”
args “-v /tmp:/tmp -p 8000:8000”
}
}
Credentials
Credentials
environment {
// type: secret text
// SECRET_TEXT is defined
SECRET_TEXT = credentials(‘SECRET_TEXT')
// type: username and password
// SECRET_AUTH_USR and SECRET_AUTH_PSW are defined
SECRET_AUTH = credentials('SECRET_AUTH')
}
Options
pipeline {
options {
// 7
buildDiscarder(logRotator(daysToKeepStr: '7'))
}
}
Triggers
pipeline {
triggers {
cron('* * * * *')
}
}
Parallel
stage("Commit") {
steps {
parallel(
unitTest: {
…
},
staticAnalysis: {
…
},
package: {
…
}
)
}
}
Conditions
stage("Production") {
when {
branch "master"
}
steps {
// deploy to production
}
}
Stash
stage("Archive") {
agent {
docker “java:8”
}
steps {
sh “gradle jar”
stash name: “jar”, includes: “build/libs/*.jar”
}
}
stage(“Deployment”) {
agent {
docker …
}
steps {
unstash “jar”
// jar
}
}
User Input
stage("Production") {
steps {
input “Ready to deploy?”
}
}
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Syntax
• https://github.com/jenkinsci/pipeline-model-
definition-plugin/wiki/Syntax-Reference
• https://jenkins.io/doc/book/pipeline/syntax/
Shared Libraries
•
• …
• subtree or submodule…?
Jenkins 1.0
Shared Libraries
• GitHub
• Groovy
• https://jenkins.io/doc/book/pipeline/shared-
libraries/
Jenkins 2.0
Example: without Library
pipeline {
…
post {
failure {
// echo ‘failure!’ with red color
ansiColor('xterm') {
echo '033[0;31mFailure!033[0m'
}
}
}
…
}
vars/echoErr.groovy
#!/usr/bin/env groovy
def call(String text) {
ansiColor('xterm') {
echo “033[0;31m${text}033[0m"
}
}
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
(repository root)
+- vars
- +- echoErr.groovy
Example: with Library
@Library('miyata-shared-libraries') _
pipeline {
…
post {
failure {
echoErr ‘Failure!’
}
}
…
}
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
• DRY
•
• @Library('my-shared-library@1.0') _
•
GitHub
• push
• commit status
GitHub Plugin
•
•
commit status pending 

commit status …
•
Jenkins 1.0
GitHub Organization Folder
• Organization
• Jenkinsfile Multibranch
Pipeline GitHub
Jenkins 2.0
Multibranch Pipeline
•
• Jenkinsfile
•
Jenkins 2.0
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
• 1
•
• Webhook
• BitBucket
Blue Ocean
Classic Jenkins UI
• UX
Jenkins 1.0
Blue Ocean
• UX
•
• RC
•
• Blue Ocean Plugin
Jenkins 2.0
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Pipeline Editor
Pipeline Editor
• Blue Ocean
• Jenkinsfile GUI
Jenkins 2.0
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
stage
•
• Enterprise
• Groovy …
• JENKINS-33846
• LTS …
• LTS(stable)
•
GUI
•
•
• init.groovy.d ...
•
• https://github.com/jenkinsci/system-config-dsl-
plugin
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Best Practices
• Declarative Pipeline
• GitHub Organization Folder
• Blue Ocean
References
• https://jenkins.io/doc/
• https://jenkins.io/node/
• https://www.cloudbees.com/juc/agenda
Cybozu Meetup
1
2 : https://cybozu.connpass.com/event/52668/

More Related Content

PDF
Jenkins 2.0 Pipeline & Blue Ocean
PDF
ARでVRアバターを表示するシステムを構築しよう
PDF
UE4 LODs for Optimization -Beginner-
PDF
徹底解説!UE4を使ったモバイルゲーム開発におけるコンテンツアップデートの極意!
PDF
Unreal Engine 4を使って地球を衛る方法
PDF
UE4でTranslucencyやUnlitに影を落としたい!
PPTX
Nreal Lightハンズオン
Jenkins 2.0 Pipeline & Blue Ocean
ARでVRアバターを表示するシステムを構築しよう
UE4 LODs for Optimization -Beginner-
徹底解説!UE4を使ったモバイルゲーム開発におけるコンテンツアップデートの極意!
Unreal Engine 4を使って地球を衛る方法
UE4でTranslucencyやUnlitに影を落としたい!
Nreal Lightハンズオン

What's hot (20)

PDF
Unreal Engine 4.27 ノンゲーム向け新機能まとめ
PDF
猫でも分かる Control Rig UE4.25 版
PPTX
[CEDEC2017] UE4プロファイリングツール総おさらい(グラフィクス編)
PDF
UE4のマテリアルを もっと楽しもう!~マテリアルでぐっと広がるリアルタイムCG表現の幅~
PDF
UE4を用いた人間から狼男への変身表現法の解説
PDF
UE4×Switchで60FPSの(ネットワーク)対戦アクションをなんとかして作る! | UNREAL FEST EXTREME 2020 WINTER
PPTX
最新UE4タイトルでのローカライズ事例 (UE4 Localization Deep Dive)
PPTX
[CEDEC2018] UE4で多数のキャラクターを生かすためのテクニック
PPTX
モバイルゲームにもっとクオリティを!UE4を使ったハイクオリティなモバイルゲーム制作について
PDF
MagicOnion入門
PDF
GPU最適化入門
PPTX
Arxan導入前後で変わったこと
PDF
そう、UE4ならね。あなたのモバイルゲームをより快適にする沢山の冴えたやり方について Part 1 <Shader Compile, PSO Cache編>
PDF
【Unite Tokyo 2019】Unityだったら簡単!マルチプレイ用ゲームサーバ開発 ~実践編~
PDF
UE4 Hair & Groomでのリアルタイムファーレンダリング (UE4 Character Art Dive Online)
PDF
UE4 MultiPlayer Online Deep Dive 実践編2 (ソレイユ株式会社様ご講演) #UE4DD
PDF
UE4 Performance and Profiling | Unreal Dev Day Montreal 2017 (日本語訳)
PDF
建築ビジュアライズにおけるLightmass実践使用方法 (フリーランス 真茅健一様)
PPTX
[4.20版] UE4におけるLoadingとGCのProfilingと最適化手法
PDF
新しくなったモノビットエンジンを使って10万人規模のサーバを構築するノウハウを公開!2017年10月27日モノビットエンジン勉強会
Unreal Engine 4.27 ノンゲーム向け新機能まとめ
猫でも分かる Control Rig UE4.25 版
[CEDEC2017] UE4プロファイリングツール総おさらい(グラフィクス編)
UE4のマテリアルを もっと楽しもう!~マテリアルでぐっと広がるリアルタイムCG表現の幅~
UE4を用いた人間から狼男への変身表現法の解説
UE4×Switchで60FPSの(ネットワーク)対戦アクションをなんとかして作る! | UNREAL FEST EXTREME 2020 WINTER
最新UE4タイトルでのローカライズ事例 (UE4 Localization Deep Dive)
[CEDEC2018] UE4で多数のキャラクターを生かすためのテクニック
モバイルゲームにもっとクオリティを!UE4を使ったハイクオリティなモバイルゲーム制作について
MagicOnion入門
GPU最適化入門
Arxan導入前後で変わったこと
そう、UE4ならね。あなたのモバイルゲームをより快適にする沢山の冴えたやり方について Part 1 <Shader Compile, PSO Cache編>
【Unite Tokyo 2019】Unityだったら簡単!マルチプレイ用ゲームサーバ開発 ~実践編~
UE4 Hair & Groomでのリアルタイムファーレンダリング (UE4 Character Art Dive Online)
UE4 MultiPlayer Online Deep Dive 実践編2 (ソレイユ株式会社様ご講演) #UE4DD
UE4 Performance and Profiling | Unreal Dev Day Montreal 2017 (日本語訳)
建築ビジュアライズにおけるLightmass実践使用方法 (フリーランス 真茅健一様)
[4.20版] UE4におけるLoadingとGCのProfilingと最適化手法
新しくなったモノビットエンジンを使って10万人規模のサーバを構築するノウハウを公開!2017年10月27日モノビットエンジン勉強会
Ad

Viewers also liked (20)

PDF
3000社の業務データ絞り込みを支える技術
PPTX
WalB: Real-time and Incremental Backup System for Block Devices
PDF
離れた場所でも最高のチームワークを実現する方法 ーサイボウズ開発チームのリモートワーク事例ー
PDF
あなたの開発チームには、チームワークがあふれていますか?
PPTX
Api Strat Portland 2017 Serverless Extensibility talk
PDF
サイボウズのフロントエンド開発 現在とこれからの挑戦
PPTX
すべての人にチームワークを サイボウズのアクセシビリティ
PDF
サイボウズのサービスを支えるログ基盤
PDF
遅いクエリと向き合う仕組み #CybozuMeetup
PDF
すべてを自動化せよ! 〜生産性向上チームの挑戦〜
PDF
Kubernetes in 30 minutes (2017/03/10)
PDF
Kubernetesにまつわるエトセトラ(主に苦労話)
PDF
形態素解析
PDF
小さく始める大規模スクラム
PPTX
プロジェクト管理でkintone
PDF
缶詰屋さんの課題解決にスクラムを使ってみた
PPTX
導入に困っているあなたに贈る スクラム導入コミュニケーション術
PDF
なんたって”DevQA” アジャイル開発とQAの合体が改善を生む - 永田 敦 氏 #postudy
PDF
[RSGT2017] つらい問題に出会ったら
3000社の業務データ絞り込みを支える技術
WalB: Real-time and Incremental Backup System for Block Devices
離れた場所でも最高のチームワークを実現する方法 ーサイボウズ開発チームのリモートワーク事例ー
あなたの開発チームには、チームワークがあふれていますか?
Api Strat Portland 2017 Serverless Extensibility talk
サイボウズのフロントエンド開発 現在とこれからの挑戦
すべての人にチームワークを サイボウズのアクセシビリティ
サイボウズのサービスを支えるログ基盤
遅いクエリと向き合う仕組み #CybozuMeetup
すべてを自動化せよ! 〜生産性向上チームの挑戦〜
Kubernetes in 30 minutes (2017/03/10)
Kubernetesにまつわるエトセトラ(主に苦労話)
形態素解析
小さく始める大規模スクラム
プロジェクト管理でkintone
缶詰屋さんの課題解決にスクラムを使ってみた
導入に困っているあなたに贈る スクラム導入コミュニケーション術
なんたって”DevQA” アジャイル開発とQAの合体が改善を生む - 永田 敦 氏 #postudy
[RSGT2017] つらい問題に出会ったら
Ad

Similar to Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜 (20)

PDF
(Declarative) Jenkins Pipelines
PDF
Codetainer: a Docker-based browser code 'sandbox'
PDF
Docker and Puppet for Continuous Integration
PDF
Our Puppet Story (GUUG FFG 2015)
PDF
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
PDF
Travis, Circle そして Jenkins 2.0
PDF
Road to Opscon (Pisa '15) - DevOoops
PDF
Un jenkins amélioré avec docker mesos et marathon à Devoxx 2015
PPTX
Docker 1.11 Presentation
PDF
DevOPS training - Day 2/2
PDF
Dockercon 2015 Recap
PDF
Jenkins Pipelines
PPTX
Docker Enterprise Workshop - Technical
PPTX
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
PDF
How to create your own hack environment
KEY
Building Dojo in the Cloud
PPTX
Introduction to InSpec and 1.0 release update
PPSX
Docker Kubernetes Istio
PDF
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
PDF
ITB2017 - Keynote
(Declarative) Jenkins Pipelines
Codetainer: a Docker-based browser code 'sandbox'
Docker and Puppet for Continuous Integration
Our Puppet Story (GUUG FFG 2015)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Travis, Circle そして Jenkins 2.0
Road to Opscon (Pisa '15) - DevOoops
Un jenkins amélioré avec docker mesos et marathon à Devoxx 2015
Docker 1.11 Presentation
DevOPS training - Day 2/2
Dockercon 2015 Recap
Jenkins Pipelines
Docker Enterprise Workshop - Technical
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
How to create your own hack environment
Building Dojo in the Cloud
Introduction to InSpec and 1.0 release update
Docker Kubernetes Istio
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
ITB2017 - Keynote

More from Jumpei Miyata (18)

PDF
開発者の生産性向上を妨げる障壁と サイボウズの生産性向上チームの取り組み
PDF
オートスケールする GitHub Actions セルフホストランナーを構築してる話
PDF
GitHub Actions のはじめかた
PDF
サイボウズの開発を支える GitHub × CircleCI
PDF
サイボウズを支えるCircleCI
PDF
サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜
PDF
組織横断でエンジニアを支援する生産性向上チームの役割
PDF
【PR】エンジニアがkintoneを試すべき3つの理由
PDF
Jenkinsfileのlintで救える命がある
PDF
受入試験を自動化したらDevとQAのフィードバックループがまわりはじめた話
PDF
Effective Automation 〜変化に強い開発基盤〜
PDF
開発者を支える生産性向上チームの取り組み -CI, Browser Test, Tools and Infrastructure-
PDF
テストエンジニアと組織構造 @Cybozu
PDF
Jenkins 再入門
PDF
Selenium Antipatterns
PPTX
kintoneチームを支えるSeleniumテスト
PPTX
Selenium Conference 2015 参加報告
PDF
ハイパフォーマンスSeleniumテスト@サイボウズ
開発者の生産性向上を妨げる障壁と サイボウズの生産性向上チームの取り組み
オートスケールする GitHub Actions セルフホストランナーを構築してる話
GitHub Actions のはじめかた
サイボウズの開発を支える GitHub × CircleCI
サイボウズを支えるCircleCI
サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜
組織横断でエンジニアを支援する生産性向上チームの役割
【PR】エンジニアがkintoneを試すべき3つの理由
Jenkinsfileのlintで救える命がある
受入試験を自動化したらDevとQAのフィードバックループがまわりはじめた話
Effective Automation 〜変化に強い開発基盤〜
開発者を支える生産性向上チームの取り組み -CI, Browser Test, Tools and Infrastructure-
テストエンジニアと組織構造 @Cybozu
Jenkins 再入門
Selenium Antipatterns
kintoneチームを支えるSeleniumテスト
Selenium Conference 2015 参加報告
ハイパフォーマンスSeleniumテスト@サイボウズ

Recently uploaded (20)

PPTX
Software Engineering and software moduleing
PPTX
mechattonicsand iotwith sensor and actuator
PDF
UEFA_Embodied_Carbon_Emissions_Football_Infrastructure.pdf
PPTX
Amdahl’s law is explained in the above power point presentations
PPTX
PRASUNET_20240614003_231416_0000[1].pptx
PPTX
Information Storage and Retrieval Techniques Unit III
PPTX
Principal presentation for NAAC (1).pptx
PDF
Applications of Equal_Area_Criterion.pdf
PDF
Soil Improvement Techniques Note - Rabbi
PPTX
CyberSecurity Mobile and Wireless Devices
PDF
UEFA_Carbon_Footprint_Calculator_Methology_2.0.pdf
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PDF
MLpara ingenieira CIVIL, meca Y AMBIENTAL
PDF
Design of Material Handling Equipment Lecture Note
PPTX
CONTRACTS IN CONSTRUCTION PROJECTS: TYPES
PPTX
Petroleum Refining & Petrochemicals.pptx
PDF
Unit I -OPERATING SYSTEMS_SRM_KATTANKULATHUR.pptx.pdf
PDF
Java Basics-Introduction and program control
PPTX
Chapter 2 -Technology and Enginerring Materials + Composites.pptx
PPTX
ai_satellite_crop_management_20250815030350.pptx
Software Engineering and software moduleing
mechattonicsand iotwith sensor and actuator
UEFA_Embodied_Carbon_Emissions_Football_Infrastructure.pdf
Amdahl’s law is explained in the above power point presentations
PRASUNET_20240614003_231416_0000[1].pptx
Information Storage and Retrieval Techniques Unit III
Principal presentation for NAAC (1).pptx
Applications of Equal_Area_Criterion.pdf
Soil Improvement Techniques Note - Rabbi
CyberSecurity Mobile and Wireless Devices
UEFA_Carbon_Footprint_Calculator_Methology_2.0.pdf
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
MLpara ingenieira CIVIL, meca Y AMBIENTAL
Design of Material Handling Equipment Lecture Note
CONTRACTS IN CONSTRUCTION PROJECTS: TYPES
Petroleum Refining & Petrochemicals.pptx
Unit I -OPERATING SYSTEMS_SRM_KATTANKULATHUR.pptx.pdf
Java Basics-Introduction and program control
Chapter 2 -Technology and Enginerring Materials + Composites.pptx
ai_satellite_crop_management_20250815030350.pptx

Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜