Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Managing Jenkins with Gradle
Search
Gary Hale
June 13, 2014
Programming
0
160
Managing Jenkins with Gradle
From Gradle Summit 2014
Gary Hale
June 13, 2014
Tweet
Share
More Decks by Gary Hale
See All by Gary Hale
Building a Continuous Delivery Pipeline with Gradle and Jenkins
ghale
0
82
Introduction to Glu
ghale
0
93
Introduction to Liquibase
ghale
0
770
Gradle - Build Automation Made Easy
ghale
0
62
Other Decks in Programming
See All in Programming
Hanami and htmx
bkuhlmann
0
210
AmperとFleetを使ったAndroidアプリ
yoppie
0
240
PHPはいつから死んでいるかの調査
chiroruxx
1
400
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
190
TCAとKMPを用いた新規動画配信アプリ 「ABEMA Live」の設計
tomu28
2
120
二郎系ラーメンのコールで学ぶ AST 解析
memory1994
PRO
7
1.7k
スキーマ駆動開発による品質とスピードの両立 - 私達は何故、スキーマを書くのか
kentaroutakeda
0
170
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
680
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
510
ServerAction で Progressive Enhancement はどこまで頑張れるか? / progressive-enhancement-with-server-action
takefumiyoshii
2
200
if constexpr文はテンプレート世界のラムダ式である
faithandbrave
3
660
デフォルトにして至高、RubyMineの大好きな所
ruzia
0
560
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1025
450k
Making Projects Easy
brettharned
109
5.5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
188
16k
Into the Great Unknown - MozCon
thekraken
13
1k
Designing the Hi-DPI Web
ddemaree
276
33k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
YesSQL, Process and Tooling at Scale
rocio
165
13k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
126
32k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
Designing for Performance
lara
602
67k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Transcript
Managing Jenkins With Gradle Gary Hale Gradle Summit 2014
Who is this guy? 15+ years in DevOps Gradle Weenie
Compulsive Automator
What you should do Ask questions! Interrupt / Interact Complete
the Evaluation
What We’ll Talk About Evolution Jenkins Plugin Basics Demonstrations
Extensible Open Source Active Ecosystem Why is Jenkins Awesome? Jenkins
Open Source Distributed Model Distributed Model Extensible
Why is Jenkins Not Awesome? When we get beyond a
handful of Jobs, it becomes tedious to maintain
Couple Configuration with Project Track Changes Motivations Discipline Track Changes
Couple Configuration with Project Perform Validations/Comparison
Leverage Existing Skillset DRY Delegate Minimize Overhead Rebuild from Scratch
Delegate Motivations Maintenance Minimize Overhead DRY Rebuild from Scratch Leverage Existing Skillset Enforce Standards
Evolution of Jenkins Management Manual Solutions Manual Edits Copy From
Existing Script Solutions Script Console System Groovy Script Scriptler Job-like Solutions Jenkins Template Plugin Jenkins Job DSL Plugin External Solutions Jenkins Job Builder Gradle Jenkins Plugin Growth / Complexity
Manual Solutions “Nothing is as simple as we hope it
will be.” Jim Horning
Limited Parameters Groovy Jenkins Model Extremely Powerful Script Solutions Limited
Parameters Jenkins Model Extremely Powerful Groovy Better for One-offs
Many-to-one Template Jobs Job-like Solutions Template Jobs Job Template Plugin
Many-to-one Best When Combined
Storable No Validation Template Jobs Powerful DSL Job-like Solutions Powerful
DSL Job DSL Plugin Storable Template Jobs No Validation One instance
Openstack Clean Configuration Python/Yaml External Solutions Python/Yaml Jenkins Job Builder
Openstack Purely Declarative Clean Configuration
XML Manipulation Template Jobs Jenkins Job DSL Programmatic External Solutions
Programmatic Gradle Jenkins Plugin XML Manipulation Jenkins Job DSL Template Jobs Create/Delete/Validate
Does it make sense to manage jenkins with a build
automation tool? Question (Think About It…)
Gradle Jenkins Plugin Concepts Gradle (static model) Templates Views Jobs
Jenkins (live model) Views Jobs Updates
deleteJenkinsItems dumpJenkinsItems validateJenkinsItems updateJenkinsItems Gradle Jenkins Plugin updateJenkinsItems Tasks deleteJenkinsItems
validateJenkinsItems dumpJenkinsItems dumpRemoteJenkinsItems
Gradle Jenkins Plugin jenkins { servers { … } templates
{ … } jobs { … } views { … } } Conventions
Servers servers { server1 { url ‘http://jenkins.somewhere.com’ username ‘user1’ password
‘password1’ } } Secured
Servers servers { server1 { url ‘http://jenkins.somewhere.com’ secure false }
} Unsecured
Templates templates { template1 { xml file(‘template.xml’) } } XML
Templates templates { template1 { dsl file(‘template.dsl’) } } DSL
Jobs jobs { build_job1 { server servers.server1 definition { xml
file(‘build_job1.xml’) } } } XML
Jobs jobs { build_job1 { server servers.server1 dsl { using
‘template1’ } } } DSL
Views views { view1 { xml file(‘view1.xml’) } } XML
Views views { view1 { dsl { … } }
} DSL
Multiple DSL Form jenkins { defaultServer servers.server1 dsl fileTree(‘jenkins’).include(‘*.dsl’) dsl
{ … } }
Demonstrations
Does it make sense to manage jenkins with a build
automation tool? Question
Is Gradle a Build Automation Tool? The Right Question
Is a Swiss army knife a knife?
References https://github.com/ghale/gradle-jenkins-plugin https://github.com/ghale/summit2014