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
180
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
95
Introduction to Glu
ghale
0
100
Introduction to Liquibase
ghale
0
900
Gradle - Build Automation Made Easy
ghale
0
68
Other Decks in Programming
See All in Programming
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
160
Benchmark
sysong
0
270
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
4
940
Bytecode Manipulation 으로 생산성 높이기
bigstark
2
380
プロダクト志向なエンジニアがもう一歩先の価値を目指すために意識したこと
nealle
0
110
iOSアプリ開発で 関数型プログラミングを実現する The Composable Architectureの紹介
yimajo
2
210
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
400
0626 Findy Product Manager LT Night_高田スライド_speaker deck用
mana_takada
0
100
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
430
5つのアンチパターンから学ぶLT設計
narihara
1
110
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
2
270
NPOでのDevinの活用
codeforeveryone
0
230
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
How to Ace a Technical Interview
jacobian
277
23k
Producing Creativity
orderedlist
PRO
346
40k
The Cult of Friendly URLs
andyhume
79
6.5k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Site-Speed That Sticks
csswizardry
10
660
Being A Developer After 40
akosma
90
590k
Side Projects
sachag
455
42k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Bash Introduction
62gerente
614
210k
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