SlideShare a Scribd company logo
Bringing Jenkins Remote Access API To The Masses
Cliffano Subagio (@cliffano) - Shine Solutions
G’Day
Cliffano Subagio (@cliffano)
Shine Solutions, Australia
Jenkins (nee Hudson)
- User since 2007
- Contributor since 2008
Menu:
- Jenkins and I
- Remote Access API
- Introducing Swaggy Jenkins
- Demo Time
- What’s next?
Once upon a time…
My Mission:
To extend Jenkins.
1. Chuck Norris Plugin
2. JSGames Plugin
3. Speakable Items
4. Firefox Add-on Build Monitor
5. Nestor
Remote Access API: What Is It?
• REST-like style
• HTTP basic authentication
• CSRF protection token
• JSON/XML responses
Remote Access API: What Can It Do?
• Build, create, delete, enable, disable a job
• Create, delete a view
• Get job and view config.xml
• List jobs status, queued jobs, executors
• Get build console output
• Get Jenkins version
Build A Job + Stream Console Output
Build A Job + Stream Console Output
Client Library
api = new RemoteAccessApi(username, password);
crumb = api.getCrumb();
api.setCrumb(crumb);
job = api.buildJob(‘myjob’);
job.isInQueue();
job.getConsoleOutput();
Existing Client Libraries
• node.js: jenkins, jenkins-api,jenkins2-api, smithers
• python: pyjenkins, jenkins-webapi, jenkins-build
• ruby: jenkins, jenkins_api_client, jenkins-json-api
• perl: Jenkins::API, Net::Jenkins
• More…
Challenges I’m Trying To Solve
• Lack of parity between clients
• Maintainers availability
• Growing number of technology stacks
Introducing Swagger CodeGen
• Generates code from an OpenAPI specification
• Endpoints, parameters, models
• Support 70+ technology stacks

and counting…
Supported Technology Stacks
My New Mission:
To enable others to integrate Jenkins
with as many technologies as possible.
Introducing Swaggy Jenkins
• Code generated from OpenAPI spec for Jenkins
• Rapid change and regenerate!
• 70+ libraries
• Published to npmjs.com, PyPI, RubyGems.org

More to follow…
• Available on github.com/cliffano/swaggy-jenkins
Building An OpenAPI Specification
• Specify info, schemes, security
• Specify paths, parameters, responses
• Generate response model definitions
• Total: 2840 lines long

45% of which are response model definitions
Converting Response Models
Jenkins response JSON OpenAPI Definitions
Generating Response Model Definitions
• `swaggy-jenkins response2definition

remoteaccess-responses/

--reporter file

--out-file remoteaccess-definitions.yml`
• Result: 1274 lines of definitions
• Regenerate when there’s a response JSON update
70+ Generated Libraries
Demo 1: Nestor CLI + Remote Access API
Bringing Jenkins Remote Access API To The Masses
Demo 2 - api.ai + Remote Access API
Bringing Jenkins Remote Access API To The Masses
Demo 3: Slack Chatbot + Blue Ocean API
What Is Blue Ocean API?
• Used by Blue Ocean UX
• Private API
• JSON Web Token
• Pipeline, run, queue, log
• User, organisation, SCM
Bringing Jenkins Remote Access API To The Masses
Run A Pipeline
What’s Next?
• Upgrade to OpenAPI 3.0
• JWT authentication support
• Folder support
• Future of Jenkins API?
Conclusions
Resources
• Swaggy Jenkins - https://github.com/cliffano/swaggy-
jenkins
• Nestor - https://github.com/cliffano/nestor
• Jenkins api.ai Demo - https://github.com/cliffano/jenkins-
apiai-demo
• Jenkins Slack Demo - https://github.com/cliffano/jenkins-
slack-demo
• Jenkins Remote Access API - https://wiki.jenkins.io/display/
jenkins/remote+access+api
• Jenkins Blue Ocean API - https://github.com/jenkinsci/
blueocean-plugin/tree/master/blueocean-rest
Questions?
Bringing Jenkins Remote Access API To The Masses

More Related Content

PDF
Online game server on Akka.NET (NDC2016)
PDF
EPAM :: LightingTalks :: Oct 2013
PDF
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
PPTX
Full stack development with node and NoSQL - All Things Open - October 2017
PDF
Provisioning Servers Made Easy
PDF
Testing the Enterprise layers, with Arquillian
PPTX
Jenkins for java world
PDF
Hacking on WildFly 9
Online game server on Akka.NET (NDC2016)
EPAM :: LightingTalks :: Oct 2013
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Full stack development with node and NoSQL - All Things Open - October 2017
Provisioning Servers Made Easy
Testing the Enterprise layers, with Arquillian
Jenkins for java world
Hacking on WildFly 9

What's hot (18)

PPT
Jenkins Overview
PDF
Slides 29-07-2017
PDF
Pipeline+over view
PPTX
Automating Software Development Life Cycle - A DevOps Approach
PPTX
How to Build Your First Web App in Go
PDF
Continuous Everything v2.0
PDF
Continuous Everything
PDF
How to improve ELK log pipeline performance
PDF
Leveraging Ansible for CI/CD
PPTX
Drupal Continuous Integration with Jenkins - The Basics
PPTX
Best Practices for Mission-Critical Jenkins
PPTX
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
PDF
Watch How The Giants Fall: Learning from Bug Bounty Results
PDF
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
PPTX
Elixir Phoenix
PDF
Puppet Camp Charlotte 2015: Manage Your Switches Like Servers
PDF
NATS: Simple, Secure and Scalable Messaging For the Cloud Native Era
PPTX
Continuous Delivery With Selenium Grid And Docker
Jenkins Overview
Slides 29-07-2017
Pipeline+over view
Automating Software Development Life Cycle - A DevOps Approach
How to Build Your First Web App in Go
Continuous Everything v2.0
Continuous Everything
How to improve ELK log pipeline performance
Leveraging Ansible for CI/CD
Drupal Continuous Integration with Jenkins - The Basics
Best Practices for Mission-Critical Jenkins
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Watch How The Giants Fall: Learning from Bug Bounty Results
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Elixir Phoenix
Puppet Camp Charlotte 2015: Manage Your Switches Like Servers
NATS: Simple, Secure and Scalable Messaging For the Cloud Native Era
Continuous Delivery With Selenium Grid And Docker
Ad

Similar to Bringing Jenkins Remote Access API To The Masses (20)

PDF
Jenkins-CI
PDF
Juc boston2014.pptx
PDF
OpenFaaS - zero serverless in 60 seconds anywhere with case-studies
KEY
Plone api
PPTX
Test parallelization using Jenkins
PDF
Developing Brilliant and Powerful APIs in Ruby & Python
PDF
Jenkins Pipelines
PPTX
Intro to Pentesting Jenkins
PDF
OpenFaaS JeffConf 2017 - Milan
PDF
Laying the Foundation for Ionic Platform Insights on Spark
PPTX
Jenkins State of union 2013
PDF
Deep dive into SoapUI
PPTX
ONOS System Test - ONS2016
PPTX
OpenWhisk Go Runtime
PDF
CI Provisioning with OpenStack - Gidi Samuels - OpenStack Day Israel 2016
KEY
Continuous Delivery Using Jenkins
PPTX
Go Faster with Ansible (AWS meetup)
PDF
Spinnaker Chadev
PPTX
How to create a multi tenancy for an interactive data analysis
POTX
Using the Splunk Java SDK
Jenkins-CI
Juc boston2014.pptx
OpenFaaS - zero serverless in 60 seconds anywhere with case-studies
Plone api
Test parallelization using Jenkins
Developing Brilliant and Powerful APIs in Ruby & Python
Jenkins Pipelines
Intro to Pentesting Jenkins
OpenFaaS JeffConf 2017 - Milan
Laying the Foundation for Ionic Platform Insights on Spark
Jenkins State of union 2013
Deep dive into SoapUI
ONOS System Test - ONS2016
OpenWhisk Go Runtime
CI Provisioning with OpenStack - Gidi Samuels - OpenStack Day Israel 2016
Continuous Delivery Using Jenkins
Go Faster with Ansible (AWS meetup)
Spinnaker Chadev
How to create a multi tenancy for an interactive data analysis
Using the Splunk Java SDK
Ad

More from Cliffano Subagio (20)

PDF
Cross-Workloads Resource-Level Relationship in AWS
PDF
AEM OpenCloud Delivery Practices
PDF
OpenAPI Generator The Babel Fish of The API World - apidays Live Paris
PDF
OpenAPI Generator The Babel Fish of The API World - apidays Live Australia
PDF
A Journey to Improve Infrastructure Compliance With InSpec
PDF
How to Fit an Infrastructure Platform into Multiple Enterprise Environments
PDF
Swagger AEM - An OpenAPI Specification for AEM
PDF
Introducing AEM OpenCloud
PDF
A Quick Look at Accessibility in the World of DevOps
PDF
Conversation With Your Application Using DialogFlow and CloudFunctions
PDF
Let's Build Voice Assistant Learning Games For Kids
PDF
Having A Talk With Jenkins
PDF
AEM Open Cloud - The First Two Years
PDF
AEM OpenCloud - What's New Since 2.0.0
PDF
Beyond AEM Curl Commands
PDF
AEM OpenCloud
PDF
Open Source AEM Platform: A Short Intro
PDF
How To Play Music On A Vacuum Cleaner
PDF
Application Deployment Using Ansible
ZIP
Javascript Everywhere From Nose To Tail
Cross-Workloads Resource-Level Relationship in AWS
AEM OpenCloud Delivery Practices
OpenAPI Generator The Babel Fish of The API World - apidays Live Paris
OpenAPI Generator The Babel Fish of The API World - apidays Live Australia
A Journey to Improve Infrastructure Compliance With InSpec
How to Fit an Infrastructure Platform into Multiple Enterprise Environments
Swagger AEM - An OpenAPI Specification for AEM
Introducing AEM OpenCloud
A Quick Look at Accessibility in the World of DevOps
Conversation With Your Application Using DialogFlow and CloudFunctions
Let's Build Voice Assistant Learning Games For Kids
Having A Talk With Jenkins
AEM Open Cloud - The First Two Years
AEM OpenCloud - What's New Since 2.0.0
Beyond AEM Curl Commands
AEM OpenCloud
Open Source AEM Platform: A Short Intro
How To Play Music On A Vacuum Cleaner
Application Deployment Using Ansible
Javascript Everywhere From Nose To Tail

Recently uploaded (20)

PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Machine learning based COVID-19 study performance prediction
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Cloud computing and distributed systems.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Big Data Technologies - Introduction.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Understanding_Digital_Forensics_Presentation.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation_ Review paper, used for researhc scholars
The Rise and Fall of 3GPP – Time for a Sabbatical?
Machine learning based COVID-19 study performance prediction
Dropbox Q2 2025 Financial Results & Investor Presentation
Diabetes mellitus diagnosis method based random forest with bat algorithm
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Cloud computing and distributed systems.
Advanced methodologies resolving dimensionality complications for autism neur...
“AI and Expert System Decision Support & Business Intelligence Systems”
Digital-Transformation-Roadmap-for-Companies.pptx
Electronic commerce courselecture one. Pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Big Data Technologies - Introduction.pptx
sap open course for s4hana steps from ECC to s4
Understanding_Digital_Forensics_Presentation.pptx

Bringing Jenkins Remote Access API To The Masses

  • 1. Bringing Jenkins Remote Access API To The Masses Cliffano Subagio (@cliffano) - Shine Solutions
  • 2. G’Day Cliffano Subagio (@cliffano) Shine Solutions, Australia Jenkins (nee Hudson) - User since 2007 - Contributor since 2008
  • 3. Menu: - Jenkins and I - Remote Access API - Introducing Swaggy Jenkins - Demo Time - What’s next?
  • 4. Once upon a time…
  • 9. 4. Firefox Add-on Build Monitor
  • 11. Remote Access API: What Is It? • REST-like style • HTTP basic authentication • CSRF protection token • JSON/XML responses
  • 12. Remote Access API: What Can It Do? • Build, create, delete, enable, disable a job • Create, delete a view • Get job and view config.xml • List jobs status, queued jobs, executors • Get build console output • Get Jenkins version
  • 13. Build A Job + Stream Console Output
  • 14. Build A Job + Stream Console Output
  • 15. Client Library api = new RemoteAccessApi(username, password); crumb = api.getCrumb(); api.setCrumb(crumb); job = api.buildJob(‘myjob’); job.isInQueue(); job.getConsoleOutput();
  • 16. Existing Client Libraries • node.js: jenkins, jenkins-api,jenkins2-api, smithers • python: pyjenkins, jenkins-webapi, jenkins-build • ruby: jenkins, jenkins_api_client, jenkins-json-api • perl: Jenkins::API, Net::Jenkins • More…
  • 17. Challenges I’m Trying To Solve • Lack of parity between clients • Maintainers availability • Growing number of technology stacks
  • 18. Introducing Swagger CodeGen • Generates code from an OpenAPI specification • Endpoints, parameters, models • Support 70+ technology stacks
 and counting…
  • 20. My New Mission: To enable others to integrate Jenkins with as many technologies as possible.
  • 21. Introducing Swaggy Jenkins • Code generated from OpenAPI spec for Jenkins • Rapid change and regenerate! • 70+ libraries • Published to npmjs.com, PyPI, RubyGems.org
 More to follow… • Available on github.com/cliffano/swaggy-jenkins
  • 22. Building An OpenAPI Specification • Specify info, schemes, security • Specify paths, parameters, responses • Generate response model definitions • Total: 2840 lines long
 45% of which are response model definitions
  • 23. Converting Response Models Jenkins response JSON OpenAPI Definitions
  • 24. Generating Response Model Definitions • `swaggy-jenkins response2definition
 remoteaccess-responses/
 --reporter file
 --out-file remoteaccess-definitions.yml` • Result: 1274 lines of definitions • Regenerate when there’s a response JSON update
  • 26. Demo 1: Nestor CLI + Remote Access API
  • 28. Demo 2 - api.ai + Remote Access API
  • 30. Demo 3: Slack Chatbot + Blue Ocean API
  • 31. What Is Blue Ocean API? • Used by Blue Ocean UX • Private API • JSON Web Token • Pipeline, run, queue, log • User, organisation, SCM
  • 34. What’s Next? • Upgrade to OpenAPI 3.0 • JWT authentication support • Folder support • Future of Jenkins API?
  • 36. Resources • Swaggy Jenkins - https://github.com/cliffano/swaggy- jenkins • Nestor - https://github.com/cliffano/nestor • Jenkins api.ai Demo - https://github.com/cliffano/jenkins- apiai-demo • Jenkins Slack Demo - https://github.com/cliffano/jenkins- slack-demo • Jenkins Remote Access API - https://wiki.jenkins.io/display/ jenkins/remote+access+api • Jenkins Blue Ocean API - https://github.com/jenkinsci/ blueocean-plugin/tree/master/blueocean-rest