SlideShare a Scribd company logo
1 of 31
Download to read offline
Writing a Hudson / Jenkins plugin
Anthony Dahanne @ EclipseCon NA 2014, March 19th
EclipseCon NA 2014 — Writing a Hudson / Jenkins pluginConfoo 2013
About me …
"2
§ Software Engineer at Terracotta
– Working on EhCache management REST API and
webapp (aka Terracotta Management Console, TMC)
– Strong interest in CI & build tools (Maven, Jenkins,
Hudson, Nexus plugins author)
– Android developer when time permits ...
EclipseCon NA 2014 — Writing a Hudson / Jenkins pluginConfoo 2013
Terracotta
"3
§ Founded 2003 in San Francisco, CA
§ Joined Software AG in 2011
§ Present in India, Europe 

and pretty much all over the globe!
§ The company behind :
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Agenda
§ Jenkins / Hudson ? Quick intro
§ Do I need to create a plugin ?
§ Let’s build a plugin !
§ How to (integration) test this plugin
§ Share the plugin with the community
"4
Jenkins / Hudson ? Quick intro
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Jenkins / Hudson ?
§ Hudson is an open source Continuous Integration
(CI) tool created in 2005 by Kohsuke Kawaguchi
§ Became really popular from 2008
§ The project split in November 2010
§ Hudson moved to the Eclipse Foundation in May
2011
§ Still the most popular CI tool(s) in 2014
"6
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
InfoQ CI popularity results
"7
HudsonJenkins
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Jenkins / Hudson few differences (figures)
§ 5000 commits
§ 325 contributors
§ 70 000 installs (9/13)
§ 889 plugins
"8
§ 1230 commits
§ 15 contributors
§ 65 000 downloads (9/13)
§ 379 plugins
Since September 2011
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Jenkins / Hudson few differences (features)
§ plugins hot install
§ write views in Groovy
§ UI improvements
"9
§ maven3 plugin
§ cascading project settings
§ Eclipse IP clean
§ team concept
Since September 2011
Do I need to create a plugin ?
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Do we need yet another plugin ?
§ 100’s of existing plugins in the update centers !
§ Customized reports / trigger a build
– CLI
– Remote API
§ Groovy plugin(s)
– Allow you to run a groovy script during build or post build
"11
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Hudson / Jenkins CLI
§ You can list jobs, start them, delete them (same
applies for nodes)
!
§ $ java -jar hudson-cli.jar -s http://localhost:8080/ list-jobs	
§ $ java -jar hudson-cli.jar -s http://localhost:8080/ build
ehcache-jcache_master	
!
§ Perfect for command line scripts !
"12
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Remote API
§ Take any Hudson / Jenkins url, add
– /api/xml : xml representation of your view
– /api/json : json representation of your view
§ Depth to control the level of detail
– http://ci.jruby.org/api/xml?depth=1
§ Tree to specify what you want
– http://ci.jruby.org/api/xml?
tree=jobs[displayName,lastBuild[result]]
§ Enjoy powerful xpath filters (with /api/xml only)
– http://ci.jruby.org/api/xml?
tree=jobs[displayName,lastBuild[result]]&exclude=hudson/
job[lastBuild[result=%27SUCCESS%27]]
"13
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Groovy plugin(s)
§ Allow you to run a groovy script during build or post build
– EnvInject Plugin : inject System env. variable to your
build
– Groovy Postbuild plugin : execute a groovy script in the
Jenkins VM
§ Usage of those plugins is powerful (dangerous?), they
usually have access to the Jenkins API and runtime
"14
Let’s write a plugin !
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Let’s write a plugin !
§ hpi:create to bootstrap the creation
$ mvn org.eclipse.hudson.tools:maven-hpi-plugin:create	
§ hpi:run to run it in a fresh container
$ mvn package org.eclipse.hudson.tools:maven-hpi-plugin:run
"16
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
What got created
"17
Diagram copied from the book Hudson Continuous Integration in Practice
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Extensions points : job configuration
"18
SCM
Trigger
Axis
Builder
Recorder
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Extensions points : dashboard
"19
ListView ListViewColumnRootAction
PageDecorator
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Extensions points : job view
"20
TransientProjectActionFactory
BuildBadgeAction
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
UI Descriptor and Jelly views
"21
Use the class name for your resources folder
Plugin description (appears in the update center)
help caption for the field “name”
UI configuration for the system configuration page
UI configuration for the Job configuration page
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Variables accessible from Jelly
"22
§ app : maps to Hudson.getInstance()
§ app.getUrl() maps to Hudson.getInstance().getUrl()	
§ it : maps to the UI element rendered by Jelly
§ it.name maps to HelloWorldBuilder.getName()	
§ h : maps to the Functions class
§ h.jsStringEscape() maps to Functions.jsStringEscape()
How to (integrate) test a plugin
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Write integration tests
§ Write a class that extends HudsonTestCase
§ Benefit from its helper methods to configure
Hudson :
– createFreeStyleProject() and friends
– assertBuildStatus() and others
– WebClient.getPage() and WebAssert.assertElementPresent()	
§ or inject existing configuration with @LocalData
"24
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Write integration tests (local data layout)
"25
Use the class name for your resources folder
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Run your integration tests
§ From your IDE, Run as… / Debug as …
§ With Maven, the usual
– $ mvn clean test (-Dtest=org.my.Test)
§ A friend’s advice : fork your VM when running a test suite
§ Add in your pom :
"26
<build>	
<plugins>	
<plugin>	
<artifactId>maven-surefire-plugin</artifactId>	
<groupId>org.apache.maven.plugins</groupId>	
<configuration>	
<!-- make sure each test spawns a different vm -->	
<forkMode>always</forkMode>	
</configuration>	
</plugin>	
</plugins>	
</build>
Share the plugin with the community
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Share your Jenkins plugin with the community
§ Test it and target the lowest API level possible
§ Add Maven metadata
§ Ask jenkinsci-dev@googlegroups.com to create a
github repo to host your plugin
§ Create a wiki page on https://wiki.jenkins-ci.org/
display/JENKINS/Home
§ Release your plugin with maven to the Jenkins repo
§ Built on https://jenkins.ci.cloudbees.com/job/plugins/
"28
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
Share your Hudson plugin with the community
§ Test it and target the lowest API level possible
§ Add Maven metadata
§ Ask hudson-dev@eclipse.org to create a github repo
to host your plugin
§ Create a wiki page on http://wiki.hudson-ci.org
§ Release your plugin with maven to the Sonatype
OSS repo
§ Built on http://ci.hudson-ci.org/
"29
EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin
References
§ Hudson Continuous Integration in Practice, by Winston Prakash and Ed Burns
§ Jenkins User Conference 2011 (on slideshare)
§ Hudson (on wikipedia)
§ Writing your first Hudson plugin
§ List of Extension points
§ Writing tests for your plugin
§ Hosting Hudson plugins and Releasing Hudson plugins
§ Hosting and releasing Jenkins Plugins
§ InfoQ : What CI Server do you use ?
§ Developing a plugin for both Jenkins and Hudson
"30
Writing a Jenkins / Hudson plugin

More Related Content

What's hot

JavaScript + Jenkins = Winning!
JavaScript + Jenkins = Winning!JavaScript + Jenkins = Winning!
JavaScript + Jenkins = Winning!Eric Wendelin
 
Acceptance testing with Geb
Acceptance testing with GebAcceptance testing with Geb
Acceptance testing with GebRichard Paul
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabSoftware Guru
 
Learn jobDSL for Jenkins
Learn jobDSL for JenkinsLearn jobDSL for Jenkins
Learn jobDSL for JenkinsLarry Cai
 
DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)
DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)
DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)Chen Cheng-Wei
 
Taming Functional Web Testing with Spock and Geb
Taming Functional Web Testing with Spock and GebTaming Functional Web Testing with Spock and Geb
Taming Functional Web Testing with Spock and GebC4Media
 
Deploy Node.js application in Heroku using Eclipse
Deploy Node.js application in Heroku using EclipseDeploy Node.js application in Heroku using Eclipse
Deploy Node.js application in Heroku using EclipseJitendra Zaa
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeColdFusionConference
 
淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合Kyle Lin
 
Dockerizing BDD : Ruby-Cucumber Example
Dockerizing BDD : Ruby-Cucumber ExampleDockerizing BDD : Ruby-Cucumber Example
Dockerizing BDD : Ruby-Cucumber ExampleShashikant Jagtap
 
Jenkins and Groovy
Jenkins and GroovyJenkins and Groovy
Jenkins and GroovyKiyotaka Oku
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budgetDavid Lukac
 
Managing Jenkins with Jenkins (Jenkins User Conference Palo Alto, 2013)
Managing Jenkins with Jenkins (Jenkins User Conference Palo Alto, 2013)Managing Jenkins with Jenkins (Jenkins User Conference Palo Alto, 2013)
Managing Jenkins with Jenkins (Jenkins User Conference Palo Alto, 2013)Gareth Bowles
 
Moderne Android Builds mit Gradle
Moderne Android Builds mit GradleModerne Android Builds mit Gradle
Moderne Android Builds mit Gradleinovex GmbH
 
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG🎤 Hanno Embregts 🎸
 
Building and Deployment of Drupal sites with Features and Context
Building and Deployment of Drupal sites with Features and ContextBuilding and Deployment of Drupal sites with Features and Context
Building and Deployment of Drupal sites with Features and ContextSvilen Sabev
 
Jenkinsプラグインの作り方
Jenkinsプラグインの作り方Jenkinsプラグインの作り方
Jenkinsプラグインの作り方Kiyotaka Oku
 
Docker, Ansible and Symfony micro-kernel
Docker, Ansible and Symfony micro-kernelDocker, Ansible and Symfony micro-kernel
Docker, Ansible and Symfony micro-kernelDrupalCamp Kyiv
 

What's hot (20)

JavaScript + Jenkins = Winning!
JavaScript + Jenkins = Winning!JavaScript + Jenkins = Winning!
JavaScript + Jenkins = Winning!
 
Acceptance testing with Geb
Acceptance testing with GebAcceptance testing with Geb
Acceptance testing with Geb
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
 
Learn jobDSL for Jenkins
Learn jobDSL for JenkinsLearn jobDSL for Jenkins
Learn jobDSL for Jenkins
 
DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)
DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)
DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)
 
Taming Functional Web Testing with Spock and Geb
Taming Functional Web Testing with Spock and GebTaming Functional Web Testing with Spock and Geb
Taming Functional Web Testing with Spock and Geb
 
Deploy Node.js application in Heroku using Eclipse
Deploy Node.js application in Heroku using EclipseDeploy Node.js application in Heroku using Eclipse
Deploy Node.js application in Heroku using Eclipse
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code
 
淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合
 
Dockerizing BDD : Ruby-Cucumber Example
Dockerizing BDD : Ruby-Cucumber ExampleDockerizing BDD : Ruby-Cucumber Example
Dockerizing BDD : Ruby-Cucumber Example
 
Jenkins and Groovy
Jenkins and GroovyJenkins and Groovy
Jenkins and Groovy
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budget
 
Managing Jenkins with Jenkins (Jenkins User Conference Palo Alto, 2013)
Managing Jenkins with Jenkins (Jenkins User Conference Palo Alto, 2013)Managing Jenkins with Jenkins (Jenkins User Conference Palo Alto, 2013)
Managing Jenkins with Jenkins (Jenkins User Conference Palo Alto, 2013)
 
Ant, Maven and Jenkins
Ant, Maven and JenkinsAnt, Maven and Jenkins
Ant, Maven and Jenkins
 
Moderne Android Builds mit Gradle
Moderne Android Builds mit GradleModerne Android Builds mit Gradle
Moderne Android Builds mit Gradle
 
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
 
Building and Deployment of Drupal sites with Features and Context
Building and Deployment of Drupal sites with Features and ContextBuilding and Deployment of Drupal sites with Features and Context
Building and Deployment of Drupal sites with Features and Context
 
Jenkinsプラグインの作り方
Jenkinsプラグインの作り方Jenkinsプラグインの作り方
Jenkinsプラグインの作り方
 
Docker, Ansible and Symfony micro-kernel
Docker, Ansible and Symfony micro-kernelDocker, Ansible and Symfony micro-kernel
Docker, Ansible and Symfony micro-kernel
 
Git best practices workshop
Git best practices workshopGit best practices workshop
Git best practices workshop
 

Viewers also liked

XebiaLabs @ Jenkins User Conference Boston 2014
XebiaLabs @ Jenkins User Conference Boston 2014XebiaLabs @ Jenkins User Conference Boston 2014
XebiaLabs @ Jenkins User Conference Boston 2014XebiaLabs
 
Infinit filesystem, Reactor reloaded
Infinit filesystem, Reactor reloadedInfinit filesystem, Reactor reloaded
Infinit filesystem, Reactor reloadedInfinit
 
Persistent storage tailored for containers #dockersummit
Persistent storage tailored for containers #dockersummitPersistent storage tailored for containers #dockersummit
Persistent storage tailored for containers #dockersummitInfinit
 
Docker volume plugins and Infinit – Mini-conf Docker Paris #1
Docker volume plugins and Infinit – Mini-conf Docker Paris #1Docker volume plugins and Infinit – Mini-conf Docker Paris #1
Docker volume plugins and Infinit – Mini-conf Docker Paris #1Infinit
 
Let's Build a Service Oriented Data Pipeline!
Let's Build a Service Oriented Data Pipeline!Let's Build a Service Oriented Data Pipeline!
Let's Build a Service Oriented Data Pipeline!Yasha Podeswa
 
Super Charged Configuration As Code
Super Charged Configuration As CodeSuper Charged Configuration As Code
Super Charged Configuration As CodeAlan Beale
 
Continuous Delivery of Puppet-Based Infrastructure - PuppetConf 2014
Continuous Delivery of Puppet-Based Infrastructure - PuppetConf 2014Continuous Delivery of Puppet-Based Infrastructure - PuppetConf 2014
Continuous Delivery of Puppet-Based Infrastructure - PuppetConf 2014Puppet
 
#ListenLearnLead - 2015 International Women's Day Research
#ListenLearnLead - 2015 International Women's Day Research#ListenLearnLead - 2015 International Women's Day Research
#ListenLearnLead - 2015 International Women's Day Researchaccenture
 
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Puppet
 
Synchronizing parallel delivery flows in jenkins using groovy, build flow and...
Synchronizing parallel delivery flows in jenkins using groovy, build flow and...Synchronizing parallel delivery flows in jenkins using groovy, build flow and...
Synchronizing parallel delivery flows in jenkins using groovy, build flow and...Andrey Devyatkin
 
groovy and concurrency
groovy and concurrencygroovy and concurrency
groovy and concurrencyPaul King
 
analiza economico finaniara la firma x
analiza economico finaniara la firma xanaliza economico finaniara la firma x
analiza economico finaniara la firma xAndreea Ema
 
Jenkins 101: Continuos Integration with Jenkins
Jenkins 101: Continuos Integration with JenkinsJenkins 101: Continuos Integration with Jenkins
Jenkins 101: Continuos Integration with JenkinsAll Things Open
 
Jenkins Scriptler in 90mins
Jenkins Scriptler in 90minsJenkins Scriptler in 90mins
Jenkins Scriptler in 90minsLarry Cai
 
Continuous Development Pipeline
Continuous Development PipelineContinuous Development Pipeline
Continuous Development PipelineIzzet Mustafaiev
 
Building an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache GroovyBuilding an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache Groovyjgcloudbees
 
Jenkins days workshop pipelines - Eric Long
Jenkins days workshop  pipelines - Eric LongJenkins days workshop  pipelines - Eric Long
Jenkins days workshop pipelines - Eric Longericlongtx
 

Viewers also liked (20)

XebiaLabs @ Jenkins User Conference Boston 2014
XebiaLabs @ Jenkins User Conference Boston 2014XebiaLabs @ Jenkins User Conference Boston 2014
XebiaLabs @ Jenkins User Conference Boston 2014
 
Infinit filesystem, Reactor reloaded
Infinit filesystem, Reactor reloadedInfinit filesystem, Reactor reloaded
Infinit filesystem, Reactor reloaded
 
Persistent storage tailored for containers #dockersummit
Persistent storage tailored for containers #dockersummitPersistent storage tailored for containers #dockersummit
Persistent storage tailored for containers #dockersummit
 
Docker volume plugins and Infinit – Mini-conf Docker Paris #1
Docker volume plugins and Infinit – Mini-conf Docker Paris #1Docker volume plugins and Infinit – Mini-conf Docker Paris #1
Docker volume plugins and Infinit – Mini-conf Docker Paris #1
 
Let's Build a Service Oriented Data Pipeline!
Let's Build a Service Oriented Data Pipeline!Let's Build a Service Oriented Data Pipeline!
Let's Build a Service Oriented Data Pipeline!
 
Super Charged Configuration As Code
Super Charged Configuration As CodeSuper Charged Configuration As Code
Super Charged Configuration As Code
 
Jenkins Job DSL plugin
Jenkins Job DSL plugin Jenkins Job DSL plugin
Jenkins Job DSL plugin
 
Continuous Delivery of Puppet-Based Infrastructure - PuppetConf 2014
Continuous Delivery of Puppet-Based Infrastructure - PuppetConf 2014Continuous Delivery of Puppet-Based Infrastructure - PuppetConf 2014
Continuous Delivery of Puppet-Based Infrastructure - PuppetConf 2014
 
#ListenLearnLead - 2015 International Women's Day Research
#ListenLearnLead - 2015 International Women's Day Research#ListenLearnLead - 2015 International Women's Day Research
#ListenLearnLead - 2015 International Women's Day Research
 
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
 
Synchronizing parallel delivery flows in jenkins using groovy, build flow and...
Synchronizing parallel delivery flows in jenkins using groovy, build flow and...Synchronizing parallel delivery flows in jenkins using groovy, build flow and...
Synchronizing parallel delivery flows in jenkins using groovy, build flow and...
 
groovy and concurrency
groovy and concurrencygroovy and concurrency
groovy and concurrency
 
analiza economico finaniara la firma x
analiza economico finaniara la firma xanaliza economico finaniara la firma x
analiza economico finaniara la firma x
 
Jenkins 101: Continuos Integration with Jenkins
Jenkins 101: Continuos Integration with JenkinsJenkins 101: Continuos Integration with Jenkins
Jenkins 101: Continuos Integration with Jenkins
 
Jenkins Scriptler in 90mins
Jenkins Scriptler in 90minsJenkins Scriptler in 90mins
Jenkins Scriptler in 90mins
 
Groovy Maven Builds
Groovy Maven BuildsGroovy Maven Builds
Groovy Maven Builds
 
Job DSL Plugin for Jenkins
Job DSL Plugin for JenkinsJob DSL Plugin for Jenkins
Job DSL Plugin for Jenkins
 
Continuous Development Pipeline
Continuous Development PipelineContinuous Development Pipeline
Continuous Development Pipeline
 
Building an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache GroovyBuilding an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache Groovy
 
Jenkins days workshop pipelines - Eric Long
Jenkins days workshop  pipelines - Eric LongJenkins days workshop  pipelines - Eric Long
Jenkins days workshop pipelines - Eric Long
 

Similar to Writing a Jenkins / Hudson plugin

IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...Paul Withers
 
Nantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDE
Nantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDENantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDE
Nantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDEFlorent BENOIT
 
Code in the cloud with eclipse che and docker / snowcamp.io 2017
Code in the cloud with eclipse che and docker /  snowcamp.io 2017Code in the cloud with eclipse che and docker /  snowcamp.io 2017
Code in the cloud with eclipse che and docker / snowcamp.io 2017Florent BENOIT
 
Code in the cloud with Eclipse Che and Docker
Code in the cloud with Eclipse Che and DockerCode in the cloud with Eclipse Che and Docker
Code in the cloud with Eclipse Che and DockerFlorent BENOIT
 
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016Florent BENOIT
 
Hybrid app development frameworks
Hybrid app development frameworksHybrid app development frameworks
Hybrid app development frameworksSquash Apps Pvt Ltd
 
Advanced jenkins : Create plugin to auto scale worker agent
Advanced jenkins : Create plugin to auto scale worker agentAdvanced jenkins : Create plugin to auto scale worker agent
Advanced jenkins : Create plugin to auto scale worker agentDevOps Indonesia
 
Scale your PHP application with Elastic Beanstalk - CloudParty Genova
Scale your PHP application with Elastic Beanstalk - CloudParty GenovaScale your PHP application with Elastic Beanstalk - CloudParty Genova
Scale your PHP application with Elastic Beanstalk - CloudParty GenovaCorley S.r.l.
 
Antons Kranga Building Agile Infrastructures
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile InfrastructuresAntons Kranga
 
Continous delivery at docker age
Continous delivery at docker ageContinous delivery at docker age
Continous delivery at docker ageAdrien Blind
 
Jbossworld Presentation
Jbossworld PresentationJbossworld Presentation
Jbossworld PresentationDan Hinojosa
 
Extending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.jsExtending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.jsPetr Jiricka
 
Introduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of TechnologyIntroduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of TechnologyAjeet Singh Raina
 
Continous Integration.pptx
Continous Integration.pptxContinous Integration.pptx
Continous Integration.pptxAnuj Sharma
 
Jenkins users meetup plugins overview
Jenkins users meetup plugins overviewJenkins users meetup plugins overview
Jenkins users meetup plugins overviewCamblor Frédéric
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT CampusAjeet Singh Raina
 

Similar to Writing a Jenkins / Hudson plugin (20)

IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
 
Nantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDE
Nantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDENantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDE
Nantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDE
 
Code in the cloud with eclipse che and docker / snowcamp.io 2017
Code in the cloud with eclipse che and docker /  snowcamp.io 2017Code in the cloud with eclipse che and docker /  snowcamp.io 2017
Code in the cloud with eclipse che and docker / snowcamp.io 2017
 
Code in the cloud with Eclipse Che and Docker
Code in the cloud with Eclipse Che and DockerCode in the cloud with Eclipse Che and Docker
Code in the cloud with Eclipse Che and Docker
 
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
 
Hybrid app development frameworks
Hybrid app development frameworksHybrid app development frameworks
Hybrid app development frameworks
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
Advanced jenkins : Create plugin to auto scale worker agent
Advanced jenkins : Create plugin to auto scale worker agentAdvanced jenkins : Create plugin to auto scale worker agent
Advanced jenkins : Create plugin to auto scale worker agent
 
Scale your PHP application with Elastic Beanstalk - CloudParty Genova
Scale your PHP application with Elastic Beanstalk - CloudParty GenovaScale your PHP application with Elastic Beanstalk - CloudParty Genova
Scale your PHP application with Elastic Beanstalk - CloudParty Genova
 
Antons Kranga Building Agile Infrastructures
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile Infrastructures
 
Continous delivery at docker age
Continous delivery at docker ageContinous delivery at docker age
Continous delivery at docker age
 
Docker Starter Pack
Docker Starter PackDocker Starter Pack
Docker Starter Pack
 
Jbossworld Presentation
Jbossworld PresentationJbossworld Presentation
Jbossworld Presentation
 
Extending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.jsExtending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.js
 
Introduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of TechnologyIntroduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of Technology
 
Continous Integration.pptx
Continous Integration.pptxContinous Integration.pptx
Continous Integration.pptx
 
Jenkins users meetup plugins overview
Jenkins users meetup plugins overviewJenkins users meetup plugins overview
Jenkins users meetup plugins overview
 
Manen Ant SVN
Manen Ant SVNManen Ant SVN
Manen Ant SVN
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
 
CDNs para el SharePoint Framework (SPFx)
CDNs para el SharePoint Framework (SPFx)CDNs para el SharePoint Framework (SPFx)
CDNs para el SharePoint Framework (SPFx)
 

More from Anthony Dahanne

Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Anthony Dahanne
 
No more Dockerfiles? Buildpacks to help you ship your image!
No more Dockerfiles? Buildpacks to help you ship your image!No more Dockerfiles? Buildpacks to help you ship your image!
No more Dockerfiles? Buildpacks to help you ship your image!Anthony Dahanne
 
CNCF Québec Meetup du 16 Novembre 2023
CNCF Québec Meetup du 16 Novembre 2023CNCF Québec Meetup du 16 Novembre 2023
CNCF Québec Meetup du 16 Novembre 2023Anthony Dahanne
 
Buildpacks: the other way to build container images
Buildpacks: the other way to build container imagesBuildpacks: the other way to build container images
Buildpacks: the other way to build container imagesAnthony Dahanne
 
Tu changes d'emploi - retour d'experience d'un développeur
Tu changes d'emploi - retour d'experience d'un développeurTu changes d'emploi - retour d'experience d'un développeur
Tu changes d'emploi - retour d'experience d'un développeurAnthony Dahanne
 
Java applications containerized and deployed
Java applications containerized and deployedJava applications containerized and deployed
Java applications containerized and deployedAnthony Dahanne
 
Contribuer à la traduction française de kubernetes
Contribuer à la traduction française de kubernetesContribuer à la traduction française de kubernetes
Contribuer à la traduction française de kubernetesAnthony Dahanne
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Anthony Dahanne
 
Kubernetes Java Operator
Kubernetes Java OperatorKubernetes Java Operator
Kubernetes Java OperatorAnthony Dahanne
 
Caching in applications still matters
Caching in applications still mattersCaching in applications still matters
Caching in applications still mattersAnthony Dahanne
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Anthony Dahanne
 
Kubernetes for Java Developers
Kubernetes for Java DevelopersKubernetes for Java Developers
Kubernetes for Java DevelopersAnthony Dahanne
 
Terracotta Ehcache : Simpler, faster, distributed
Terracotta Ehcache : Simpler, faster, distributedTerracotta Ehcache : Simpler, faster, distributed
Terracotta Ehcache : Simpler, faster, distributedAnthony Dahanne
 
Docker and java, at Montréal JUG
Docker and java, at Montréal JUGDocker and java, at Montréal JUG
Docker and java, at Montréal JUGAnthony Dahanne
 
Confoo2013 make your java-app rest enabled
Confoo2013 make your java-app rest enabledConfoo2013 make your java-app rest enabled
Confoo2013 make your java-app rest enabledAnthony Dahanne
 

More from Anthony Dahanne (18)

Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
 
No more Dockerfiles? Buildpacks to help you ship your image!
No more Dockerfiles? Buildpacks to help you ship your image!No more Dockerfiles? Buildpacks to help you ship your image!
No more Dockerfiles? Buildpacks to help you ship your image!
 
CNCF Québec Meetup du 16 Novembre 2023
CNCF Québec Meetup du 16 Novembre 2023CNCF Québec Meetup du 16 Novembre 2023
CNCF Québec Meetup du 16 Novembre 2023
 
Buildpacks: the other way to build container images
Buildpacks: the other way to build container imagesBuildpacks: the other way to build container images
Buildpacks: the other way to build container images
 
Tu changes d'emploi - retour d'experience d'un développeur
Tu changes d'emploi - retour d'experience d'un développeurTu changes d'emploi - retour d'experience d'un développeur
Tu changes d'emploi - retour d'experience d'un développeur
 
Java applications containerized and deployed
Java applications containerized and deployedJava applications containerized and deployed
Java applications containerized and deployed
 
Contribuer à la traduction française de kubernetes
Contribuer à la traduction française de kubernetesContribuer à la traduction française de kubernetes
Contribuer à la traduction française de kubernetes
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
 
Kubernetes Java Operator
Kubernetes Java OperatorKubernetes Java Operator
Kubernetes Java Operator
 
Caching in applications still matters
Caching in applications still mattersCaching in applications still matters
Caching in applications still matters
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018
 
Kubernetes for Java Developers
Kubernetes for Java DevelopersKubernetes for Java Developers
Kubernetes for Java Developers
 
Docker and java
Docker and javaDocker and java
Docker and java
 
Terracotta Ehcache : Simpler, faster, distributed
Terracotta Ehcache : Simpler, faster, distributedTerracotta Ehcache : Simpler, faster, distributed
Terracotta Ehcache : Simpler, faster, distributed
 
Docker and java, at Montréal JUG
Docker and java, at Montréal JUGDocker and java, at Montréal JUG
Docker and java, at Montréal JUG
 
Confoo2013 make your java-app rest enabled
Confoo2013 make your java-app rest enabledConfoo2013 make your java-app rest enabled
Confoo2013 make your java-app rest enabled
 
Ci for-android-apps
Ci for-android-appsCi for-android-apps
Ci for-android-apps
 
Asynctasks
AsynctasksAsynctasks
Asynctasks
 

Recently uploaded

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Recently uploaded (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 

Writing a Jenkins / Hudson plugin

  • 1. Writing a Hudson / Jenkins plugin Anthony Dahanne @ EclipseCon NA 2014, March 19th
  • 2. EclipseCon NA 2014 — Writing a Hudson / Jenkins pluginConfoo 2013 About me … "2 § Software Engineer at Terracotta – Working on EhCache management REST API and webapp (aka Terracotta Management Console, TMC) – Strong interest in CI & build tools (Maven, Jenkins, Hudson, Nexus plugins author) – Android developer when time permits ...
  • 3. EclipseCon NA 2014 — Writing a Hudson / Jenkins pluginConfoo 2013 Terracotta "3 § Founded 2003 in San Francisco, CA § Joined Software AG in 2011 § Present in India, Europe 
 and pretty much all over the globe! § The company behind :
  • 4. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Agenda § Jenkins / Hudson ? Quick intro § Do I need to create a plugin ? § Let’s build a plugin ! § How to (integration) test this plugin § Share the plugin with the community "4
  • 5. Jenkins / Hudson ? Quick intro
  • 6. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Jenkins / Hudson ? § Hudson is an open source Continuous Integration (CI) tool created in 2005 by Kohsuke Kawaguchi § Became really popular from 2008 § The project split in November 2010 § Hudson moved to the Eclipse Foundation in May 2011 § Still the most popular CI tool(s) in 2014 "6
  • 7. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin InfoQ CI popularity results "7 HudsonJenkins
  • 8. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Jenkins / Hudson few differences (figures) § 5000 commits § 325 contributors § 70 000 installs (9/13) § 889 plugins "8 § 1230 commits § 15 contributors § 65 000 downloads (9/13) § 379 plugins Since September 2011
  • 9. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Jenkins / Hudson few differences (features) § plugins hot install § write views in Groovy § UI improvements "9 § maven3 plugin § cascading project settings § Eclipse IP clean § team concept Since September 2011
  • 10. Do I need to create a plugin ?
  • 11. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Do we need yet another plugin ? § 100’s of existing plugins in the update centers ! § Customized reports / trigger a build – CLI – Remote API § Groovy plugin(s) – Allow you to run a groovy script during build or post build "11
  • 12. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Hudson / Jenkins CLI § You can list jobs, start them, delete them (same applies for nodes) ! § $ java -jar hudson-cli.jar -s http://localhost:8080/ list-jobs § $ java -jar hudson-cli.jar -s http://localhost:8080/ build ehcache-jcache_master ! § Perfect for command line scripts ! "12
  • 13. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Remote API § Take any Hudson / Jenkins url, add – /api/xml : xml representation of your view – /api/json : json representation of your view § Depth to control the level of detail – http://ci.jruby.org/api/xml?depth=1 § Tree to specify what you want – http://ci.jruby.org/api/xml? tree=jobs[displayName,lastBuild[result]] § Enjoy powerful xpath filters (with /api/xml only) – http://ci.jruby.org/api/xml? tree=jobs[displayName,lastBuild[result]]&exclude=hudson/ job[lastBuild[result=%27SUCCESS%27]] "13
  • 14. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Groovy plugin(s) § Allow you to run a groovy script during build or post build – EnvInject Plugin : inject System env. variable to your build – Groovy Postbuild plugin : execute a groovy script in the Jenkins VM § Usage of those plugins is powerful (dangerous?), they usually have access to the Jenkins API and runtime "14
  • 15. Let’s write a plugin !
  • 16. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Let’s write a plugin ! § hpi:create to bootstrap the creation $ mvn org.eclipse.hudson.tools:maven-hpi-plugin:create § hpi:run to run it in a fresh container $ mvn package org.eclipse.hudson.tools:maven-hpi-plugin:run "16
  • 17. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin What got created "17 Diagram copied from the book Hudson Continuous Integration in Practice
  • 18. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Extensions points : job configuration "18 SCM Trigger Axis Builder Recorder
  • 19. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Extensions points : dashboard "19 ListView ListViewColumnRootAction PageDecorator
  • 20. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Extensions points : job view "20 TransientProjectActionFactory BuildBadgeAction
  • 21. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin UI Descriptor and Jelly views "21 Use the class name for your resources folder Plugin description (appears in the update center) help caption for the field “name” UI configuration for the system configuration page UI configuration for the Job configuration page
  • 22. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Variables accessible from Jelly "22 § app : maps to Hudson.getInstance() § app.getUrl() maps to Hudson.getInstance().getUrl() § it : maps to the UI element rendered by Jelly § it.name maps to HelloWorldBuilder.getName() § h : maps to the Functions class § h.jsStringEscape() maps to Functions.jsStringEscape()
  • 23. How to (integrate) test a plugin
  • 24. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Write integration tests § Write a class that extends HudsonTestCase § Benefit from its helper methods to configure Hudson : – createFreeStyleProject() and friends – assertBuildStatus() and others – WebClient.getPage() and WebAssert.assertElementPresent() § or inject existing configuration with @LocalData "24
  • 25. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Write integration tests (local data layout) "25 Use the class name for your resources folder
  • 26. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Run your integration tests § From your IDE, Run as… / Debug as … § With Maven, the usual – $ mvn clean test (-Dtest=org.my.Test) § A friend’s advice : fork your VM when running a test suite § Add in your pom : "26 <build> <plugins> <plugin> <artifactId>maven-surefire-plugin</artifactId> <groupId>org.apache.maven.plugins</groupId> <configuration> <!-- make sure each test spawns a different vm --> <forkMode>always</forkMode> </configuration> </plugin> </plugins> </build>
  • 27. Share the plugin with the community
  • 28. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Share your Jenkins plugin with the community § Test it and target the lowest API level possible § Add Maven metadata § Ask jenkinsci-dev@googlegroups.com to create a github repo to host your plugin § Create a wiki page on https://wiki.jenkins-ci.org/ display/JENKINS/Home § Release your plugin with maven to the Jenkins repo § Built on https://jenkins.ci.cloudbees.com/job/plugins/ "28
  • 29. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin Share your Hudson plugin with the community § Test it and target the lowest API level possible § Add Maven metadata § Ask hudson-dev@eclipse.org to create a github repo to host your plugin § Create a wiki page on http://wiki.hudson-ci.org § Release your plugin with maven to the Sonatype OSS repo § Built on http://ci.hudson-ci.org/ "29
  • 30. EclipseCon NA 2014 — Writing a Hudson / Jenkins plugin References § Hudson Continuous Integration in Practice, by Winston Prakash and Ed Burns § Jenkins User Conference 2011 (on slideshare) § Hudson (on wikipedia) § Writing your first Hudson plugin § List of Extension points § Writing tests for your plugin § Hosting Hudson plugins and Releasing Hudson plugins § Hosting and releasing Jenkins Plugins § InfoQ : What CI Server do you use ? § Developing a plugin for both Jenkins and Hudson "30