SlideShare una empresa de Scribd logo
1 de 25
Jenkins XML API and Mobile Devices Simone Ardissone Luca Milanesio LMIT Software Ltd. http://www.jenkins-ci.mobi
Who we are (1st guy) My name is Luca Founder and Director of LMIT Ltd (UK) “… the ones behind JenkinsMobi” Jenkins (/Hudson) contributor since 2007 Git and Gerrit big fan since 2009  Over 19 years of experience in Software Development Worked for major UK, EU and US Customers Banking, Retail, Industry, Finance, Telecoms, Utilities Development and Technical sales manager for major European and US Companies
Who we are (2nd geek) My name is Simone The second arm of LMIT Ltd (UK) I’m on the IT as developer for 10 years Enthusiast of Jenkins (/Hudson) since 2007 Involved in mobile development with iOS and Android since 3 years The main developer of JenkinsMobi and HudsonMobi for iOS and Android Author of the new Assembla plug-in for Jenkins
What we are going to talk about Jenkins Remote API introduction Mobile challenges Jenkins API for mobile applications Ideas to improve Jenkins Remote API Q&A
How many of you used Jenkins API ? Quite often ? Sometimes happens ? Rarely ? Only once in my life ? Never ? Does Jenkins have XML API ?
Jenkins Remote API A simple interface to query Jenkins CI XML based (but also JSON and Python) Easy to call: it’s simple REST Easy to debug: even with a simple browser xPathexpressions allows fast server-side computation (node count, conditions …) Jenkins custom ‘tree’ parameter to simplify queries
What can be done with this API ? Access Jenkins from everywhere Ship enhanced features based on Jenkins “Mobilise” the Jenkins CI UE May be in the future 
… or something like this
Which challenges in mobile development ? Expensive data connection (when in 3G) Limited device memory (few MB) Limited screen size (few inches) Limited device-human interaction (fingertips)
What you should do then ? Minimize data footprint Select most relevant KPIs Prevent long list of items to be returned over the network Provide rapid access with a few ‘taps’
How did we develop JenkinsMobi ? Fully native iOS/Android Jenkins CI client NOiPhoneView: remove the HTML tag download and rendering Full XML API and xPATHusage (with ‘tree’): reduce to a minimum data transfer When API are missing… a bit of “nice old hacking” with AJAX calls and HTML scraping
Jenkins XML API – step by step Step 1 – User auth Step 2 – GET the desired resource URL with the /api/xml suffix and optional tree or xpath query arguments Step 3 – Parse xml result and map it in simple objects (something like POJOs) Step 4 – Render resulting objects somewhere
Jenkins XML API Security Simple HTTP- basic authentication Server authentication Sometimes Jenkins is hidden behind a server authentication: pass it before passing Jenkins credentials. For sys-admin: use only one kind of authentication or use the same credentials Problems with Jenkins Domain config URLs contained into xml results are often resolved only on local network Solution: override with the configured Jenkins domain URL
Step 1 – Authenticate and compose the URL Authenticate with your credentials Basicauth: add “Authorization” HTTP header into a first really simple request (minimise data transfer)     	with value “Basic b64_credentials”, where                 	b64_credentials is the base-64 of 	‘username:password‘ Get the list of all views Point to <<domain>>/api/xml IfyouusexPathappendthis: ”?xpath=//*/primaryView|//*/view&wrapper=views” Ifyouusetreeappendthis: ”?tree=views[name,url],primaryView[name,url]”
Step 2 – Parse xml result and render it Youwillgetsomethinglikethis: Parsexml and create a simplebean object for eachxmlvieworprimaryViewtag Renderit in a table/list
iOS hints  Prefer NSURLConnection for complete controls over data connection and authentication Pay attention to a correct URL escaping Always use asynchronous data connections Use NSXMLParser with yourownNSXMLParserDelegate implementation to parse XML responses Perform complete tests on real devices SSL connection could be a problem on iOS: Allow every ssl certificate (quite unsafe) Tell your users to visit with Safari the site where Jenkins is hosted, this to retrieve and trust its ssl certificate
Android hints Use a wrapped DefaultHttpClient for coupledwithApache HttpGet and HttpPost gain more control over data download Server side authentication use preemptive authentication:  customize the DefaultHttpClient::CredentialsProvider with your own domain and credential “Trust ALL” ssl certificates policy create your own SSLSocketFactory and register in the DefaultHttpClient::ConnectionManager For xml parsing use SAXParser with xmlvalidation set to false Most of returned XML have no XSD schema Use separate threads for all data connections: useAsyncTask or yourownthreadclasses
Tablets … “the next thing” Tablet are spreading over More screen space  more power to Jenkins CI client More productivity … but at the end it is just “cool” 
Jenkins on tablets … “the next thing” … so why not JenkinsMobi for iPad ? Custom filters and bookmarks for often-seen jobs More Jenkins CI Web integration A redesigned UE to meet iPad users needs Lot of other big things
Dog-fooding: our golden rule JenkinsMobi builds are made with Jenkins  AndroidApp with Jenkins … easy ! just install the Android SDK  customize the ANT files  … and you’re done in a few minutes 
Dog-fooding: our golden rule JenkinsMobi builds are made with Jenkins  iOSis a bit more complicated (as usual)  get a Mac OSX machine installSICCI for xCodepluginfor Jenkins … matchesperfeclyourneeds.  Be careful to install the proper Apple certificates Remember to installprovisioning
Jenkins CI for our work
What would you change in the API ? Output console APIs Build queue control APIs A smarter ‘tree’ parameter with some operations as xPath expressions have
Thank you ! Q&A
Thank You To Our Sponsors Coming Soon:  The CloudBees Newsletter for Jenkins ,[object Object],	(bonus: a chance to win an Apple TV!)

Más contenido relacionado

La actualidad más candente

OSCON 2012: Design and Debug HTML5 Apps for Devices with RIB and Web Simulator
OSCON 2012: Design and Debug HTML5 Apps for Devices with RIB and Web SimulatorOSCON 2012: Design and Debug HTML5 Apps for Devices with RIB and Web Simulator
OSCON 2012: Design and Debug HTML5 Apps for Devices with RIB and Web SimulatorGail Frederick
 
Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0Jeff Haynie
 
HTML5 App Dev on BlackBerry 10
HTML5 App Dev on BlackBerry 10HTML5 App Dev on BlackBerry 10
HTML5 App Dev on BlackBerry 10Larry McDonough
 
IBM Bluemix on the go - Giulio Santoli (Mobility Hackathon)
IBM Bluemix on the go - Giulio Santoli (Mobility Hackathon)IBM Bluemix on the go - Giulio Santoli (Mobility Hackathon)
IBM Bluemix on the go - Giulio Santoli (Mobility Hackathon)gjuljo
 
IoT Development from Software Developer Perspective
IoT Development from Software Developer PerspectiveIoT Development from Software Developer Perspective
IoT Development from Software Developer PerspectiveAndri Yadi
 
Layer 7: Building Multi Enterprise SOA
Layer 7: Building Multi Enterprise SOALayer 7: Building Multi Enterprise SOA
Layer 7: Building Multi Enterprise SOACA API Management
 
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...David Currie
 
CommNexus San Diego Presentation
CommNexus San Diego PresentationCommNexus San Diego Presentation
CommNexus San Diego PresentationJeff Haynie
 
Mobile Developer Conference 2012 Hamburg, Germany Keynote
Mobile Developer Conference 2012 Hamburg, Germany KeynoteMobile Developer Conference 2012 Hamburg, Germany Keynote
Mobile Developer Conference 2012 Hamburg, Germany KeynoteJeff Haynie
 
DFW Wordpress February Meetup - Appcelerator Titanium
DFW Wordpress February Meetup  - Appcelerator TitaniumDFW Wordpress February Meetup  - Appcelerator Titanium
DFW Wordpress February Meetup - Appcelerator TitaniumJeff Haynie
 
Secure your Application with Google cloud armor
Secure your Application with Google cloud armorSecure your Application with Google cloud armor
Secure your Application with Google cloud armorDevOps Indonesia
 
Ionic Auth Connect: Single Sign-on Made Easy
Ionic Auth Connect: Single Sign-on Made EasyIonic Auth Connect: Single Sign-on Made Easy
Ionic Auth Connect: Single Sign-on Made EasyIonic Framework
 
Microservices - How Microservices Have Changed and Why They Matter
Microservices - How Microservices Have Changed and Why They MatterMicroservices - How Microservices Have Changed and Why They Matter
Microservices - How Microservices Have Changed and Why They MatterAlexander Arda
 
The Evolving Mobile Ecosystem and MeeGo
The Evolving Mobile Ecosystem and MeeGoThe Evolving Mobile Ecosystem and MeeGo
The Evolving Mobile Ecosystem and MeeGoGail Frederick
 
Enterprise on the Go - Devon Winkworth, Snr. Principal Consultant, Layer 7 @ ...
Enterprise on the Go - Devon Winkworth, Snr. Principal Consultant, Layer 7 @ ...Enterprise on the Go - Devon Winkworth, Snr. Principal Consultant, Layer 7 @ ...
Enterprise on the Go - Devon Winkworth, Snr. Principal Consultant, Layer 7 @ ...CA API Management
 
From Monolithic to Microservices
From Monolithic to Microservices From Monolithic to Microservices
From Monolithic to Microservices Amazon Web Services
 
TiConf.eu -- Titanium Developer Conference in Europe, 2013
TiConf.eu -- Titanium Developer Conference in Europe, 2013TiConf.eu -- Titanium Developer Conference in Europe, 2013
TiConf.eu -- Titanium Developer Conference in Europe, 2013Jeff Haynie
 
Kranky geeklondon build an app
Kranky geeklondon build an appKranky geeklondon build an app
Kranky geeklondon build an appTim Panton
 
Microservices Architecture: Building 'SMART' & 'Agile' Software
Microservices Architecture: Building 'SMART' & 'Agile' SoftwareMicroservices Architecture: Building 'SMART' & 'Agile' Software
Microservices Architecture: Building 'SMART' & 'Agile' SoftwareSmartBear
 
Inbound Federation and Zero Sign On (ZSO) by Ranjan Jain at Ping Identity Wor...
Inbound Federation and Zero Sign On (ZSO) by Ranjan Jain at Ping Identity Wor...Inbound Federation and Zero Sign On (ZSO) by Ranjan Jain at Ping Identity Wor...
Inbound Federation and Zero Sign On (ZSO) by Ranjan Jain at Ping Identity Wor...Ranjan Jain
 

La actualidad más candente (20)

OSCON 2012: Design and Debug HTML5 Apps for Devices with RIB and Web Simulator
OSCON 2012: Design and Debug HTML5 Apps for Devices with RIB and Web SimulatorOSCON 2012: Design and Debug HTML5 Apps for Devices with RIB and Web Simulator
OSCON 2012: Design and Debug HTML5 Apps for Devices with RIB and Web Simulator
 
Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0
 
HTML5 App Dev on BlackBerry 10
HTML5 App Dev on BlackBerry 10HTML5 App Dev on BlackBerry 10
HTML5 App Dev on BlackBerry 10
 
IBM Bluemix on the go - Giulio Santoli (Mobility Hackathon)
IBM Bluemix on the go - Giulio Santoli (Mobility Hackathon)IBM Bluemix on the go - Giulio Santoli (Mobility Hackathon)
IBM Bluemix on the go - Giulio Santoli (Mobility Hackathon)
 
IoT Development from Software Developer Perspective
IoT Development from Software Developer PerspectiveIoT Development from Software Developer Perspective
IoT Development from Software Developer Perspective
 
Layer 7: Building Multi Enterprise SOA
Layer 7: Building Multi Enterprise SOALayer 7: Building Multi Enterprise SOA
Layer 7: Building Multi Enterprise SOA
 
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
 
CommNexus San Diego Presentation
CommNexus San Diego PresentationCommNexus San Diego Presentation
CommNexus San Diego Presentation
 
Mobile Developer Conference 2012 Hamburg, Germany Keynote
Mobile Developer Conference 2012 Hamburg, Germany KeynoteMobile Developer Conference 2012 Hamburg, Germany Keynote
Mobile Developer Conference 2012 Hamburg, Germany Keynote
 
DFW Wordpress February Meetup - Appcelerator Titanium
DFW Wordpress February Meetup  - Appcelerator TitaniumDFW Wordpress February Meetup  - Appcelerator Titanium
DFW Wordpress February Meetup - Appcelerator Titanium
 
Secure your Application with Google cloud armor
Secure your Application with Google cloud armorSecure your Application with Google cloud armor
Secure your Application with Google cloud armor
 
Ionic Auth Connect: Single Sign-on Made Easy
Ionic Auth Connect: Single Sign-on Made EasyIonic Auth Connect: Single Sign-on Made Easy
Ionic Auth Connect: Single Sign-on Made Easy
 
Microservices - How Microservices Have Changed and Why They Matter
Microservices - How Microservices Have Changed and Why They MatterMicroservices - How Microservices Have Changed and Why They Matter
Microservices - How Microservices Have Changed and Why They Matter
 
The Evolving Mobile Ecosystem and MeeGo
The Evolving Mobile Ecosystem and MeeGoThe Evolving Mobile Ecosystem and MeeGo
The Evolving Mobile Ecosystem and MeeGo
 
Enterprise on the Go - Devon Winkworth, Snr. Principal Consultant, Layer 7 @ ...
Enterprise on the Go - Devon Winkworth, Snr. Principal Consultant, Layer 7 @ ...Enterprise on the Go - Devon Winkworth, Snr. Principal Consultant, Layer 7 @ ...
Enterprise on the Go - Devon Winkworth, Snr. Principal Consultant, Layer 7 @ ...
 
From Monolithic to Microservices
From Monolithic to Microservices From Monolithic to Microservices
From Monolithic to Microservices
 
TiConf.eu -- Titanium Developer Conference in Europe, 2013
TiConf.eu -- Titanium Developer Conference in Europe, 2013TiConf.eu -- Titanium Developer Conference in Europe, 2013
TiConf.eu -- Titanium Developer Conference in Europe, 2013
 
Kranky geeklondon build an app
Kranky geeklondon build an appKranky geeklondon build an app
Kranky geeklondon build an app
 
Microservices Architecture: Building 'SMART' & 'Agile' Software
Microservices Architecture: Building 'SMART' & 'Agile' SoftwareMicroservices Architecture: Building 'SMART' & 'Agile' Software
Microservices Architecture: Building 'SMART' & 'Agile' Software
 
Inbound Federation and Zero Sign On (ZSO) by Ranjan Jain at Ping Identity Wor...
Inbound Federation and Zero Sign On (ZSO) by Ranjan Jain at Ping Identity Wor...Inbound Federation and Zero Sign On (ZSO) by Ranjan Jain at Ping Identity Wor...
Inbound Federation and Zero Sign On (ZSO) by Ranjan Jain at Ping Identity Wor...
 

Similar a JenkinsMobi: Jenkins XML API for Mobile Applications

Mix Tech Ed Update No Video
Mix Tech Ed Update No VideoMix Tech Ed Update No Video
Mix Tech Ed Update No VideoAllyWick
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassPaul Withers
 
Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Lars Vogel
 
Web Design World Flickr
Web Design World FlickrWeb Design World Flickr
Web Design World Flickrroyans
 
Android presentation
Android presentationAndroid presentation
Android presentationImam Raza
 
Crosswalk and the Intel XDK
Crosswalk and the Intel XDKCrosswalk and the Intel XDK
Crosswalk and the Intel XDKIntel® Software
 
DEVCON-Alfresco i os mobile application details and design
DEVCON-Alfresco i os mobile application details and designDEVCON-Alfresco i os mobile application details and design
DEVCON-Alfresco i os mobile application details and designZia Consulting
 
SLUGUK BUILD Round-up
SLUGUK BUILD Round-upSLUGUK BUILD Round-up
SLUGUK BUILD Round-upDerek Lakin
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Mikkel Flindt Heisterberg
 
Google Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talkGoogle Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talkImam Raza
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10Chris Schalk
 
[143]Inside fuse deview 2016
[143]Inside fuse   deview 2016[143]Inside fuse   deview 2016
[143]Inside fuse deview 2016NAVER D2
 
Electron Firenze 2020: Linux, Windows o MacOS?
Electron Firenze 2020: Linux, Windows o MacOS?Electron Firenze 2020: Linux, Windows o MacOS?
Electron Firenze 2020: Linux, Windows o MacOS?Denny Biasiolli
 
Electron: Linux, Windows or Macos?
Electron: Linux, Windows or Macos?Electron: Linux, Windows or Macos?
Electron: Linux, Windows or Macos?Commit University
 
AD101: IBM Domino Application Development Futures
AD101: IBM Domino Application Development FuturesAD101: IBM Domino Application Development Futures
AD101: IBM Domino Application Development FuturesEamon Muldoon
 
Best Practices for Mission-Critical Jenkins
Best Practices for Mission-Critical JenkinsBest Practices for Mission-Critical Jenkins
Best Practices for Mission-Critical Jenkinsmrooney7828
 

Similar a JenkinsMobi: Jenkins XML API for Mobile Applications (20)

Mix Tech Ed Update No Video
Mix Tech Ed Update No VideoMix Tech Ed Update No Video
Mix Tech Ed Update No Video
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClass
 
Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android Programming
 
Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11
 
Web Design World Flickr
Web Design World FlickrWeb Design World Flickr
Web Design World Flickr
 
Android presentation
Android presentationAndroid presentation
Android presentation
 
Crosswalk and the Intel XDK
Crosswalk and the Intel XDKCrosswalk and the Intel XDK
Crosswalk and the Intel XDK
 
Lecture1
Lecture1Lecture1
Lecture1
 
DEVCON-Alfresco i os mobile application details and design
DEVCON-Alfresco i os mobile application details and designDEVCON-Alfresco i os mobile application details and design
DEVCON-Alfresco i os mobile application details and design
 
SLUGUK BUILD Round-up
SLUGUK BUILD Round-upSLUGUK BUILD Round-up
SLUGUK BUILD Round-up
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)
 
.NET Overview & Roadmap
.NET Overview & Roadmap.NET Overview & Roadmap
.NET Overview & Roadmap
 
Google Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talkGoogle Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talk
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
[143]Inside fuse deview 2016
[143]Inside fuse   deview 2016[143]Inside fuse   deview 2016
[143]Inside fuse deview 2016
 
Electron Firenze 2020: Linux, Windows o MacOS?
Electron Firenze 2020: Linux, Windows o MacOS?Electron Firenze 2020: Linux, Windows o MacOS?
Electron Firenze 2020: Linux, Windows o MacOS?
 
Electron: Linux, Windows or Macos?
Electron: Linux, Windows or Macos?Electron: Linux, Windows or Macos?
Electron: Linux, Windows or Macos?
 
AD101: IBM Domino Application Development Futures
AD101: IBM Domino Application Development FuturesAD101: IBM Domino Application Development Futures
AD101: IBM Domino Application Development Futures
 
Best Practices for Mission-Critical Jenkins
Best Practices for Mission-Critical JenkinsBest Practices for Mission-Critical Jenkins
Best Practices for Mission-Critical Jenkins
 

Más de Luca Milanesio

What's new in Gerrit Code Review v3.1 and beyond
What's new in Gerrit Code Review v3.1 and beyondWhat's new in Gerrit Code Review v3.1 and beyond
What's new in Gerrit Code Review v3.1 and beyondLuca Milanesio
 
Gerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source codeGerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source codeLuca Milanesio
 
Cloud-native Gerrit Code Review
Cloud-native Gerrit Code ReviewCloud-native Gerrit Code Review
Cloud-native Gerrit Code ReviewLuca Milanesio
 
Gerrit Code Review migrations step-by-step
Gerrit Code Review migrations step-by-stepGerrit Code Review migrations step-by-step
Gerrit Code Review migrations step-by-stepLuca Milanesio
 
Gerrit Code Review v3.2 and v3.3
Gerrit Code Review v3.2 and v3.3Gerrit Code Review v3.2 and v3.3
Gerrit Code Review v3.2 and v3.3Luca Milanesio
 
ChronicleMap non-blocking cache for Gerrit v3.3
ChronicleMap non-blocking cache for Gerrit v3.3ChronicleMap non-blocking cache for Gerrit v3.3
ChronicleMap non-blocking cache for Gerrit v3.3Luca Milanesio
 
Gerrit Code Review multi-site
Gerrit Code Review multi-siteGerrit Code Review multi-site
Gerrit Code Review multi-siteLuca Milanesio
 
What's new in Gerrit Code Review 3.0
What's new in Gerrit Code Review 3.0What's new in Gerrit Code Review 3.0
What's new in Gerrit Code Review 3.0Luca Milanesio
 
Gerrit User Summit 2019 Keynote
Gerrit User Summit 2019 KeynoteGerrit User Summit 2019 Keynote
Gerrit User Summit 2019 KeynoteLuca Milanesio
 
Gerrit multi-master / multi-site at GerritHub
Gerrit multi-master / multi-site at GerritHubGerrit multi-master / multi-site at GerritHub
Gerrit multi-master / multi-site at GerritHubLuca Milanesio
 
GerritHub a true Gerrit migration story to v2.15
GerritHub a true Gerrit migration story to v2.15GerritHub a true Gerrit migration story to v2.15
GerritHub a true Gerrit migration story to v2.15Luca Milanesio
 
Gerrit User Summit 2018 - Keynote
Gerrit User Summit 2018 - Keynote Gerrit User Summit 2018 - Keynote
Gerrit User Summit 2018 - Keynote Luca Milanesio
 
Jenkins plugin for Gerrit Code Review pipelines
Jenkins plugin for Gerrit Code Review pipelinesJenkins plugin for Gerrit Code Review pipelines
Jenkins plugin for Gerrit Code Review pipelinesLuca Milanesio
 
Gerrit User Summit 2017 Keynote
Gerrit User Summit 2017 KeynoteGerrit User Summit 2017 Keynote
Gerrit User Summit 2017 KeynoteLuca Milanesio
 
How to keep Jenkins logs forever without performance issues
How to keep Jenkins logs forever without performance issuesHow to keep Jenkins logs forever without performance issues
How to keep Jenkins logs forever without performance issuesLuca Milanesio
 
Jenkins Pipeline on your Local Box to Reduce Cycle Time
Jenkins Pipeline on your Local Box to Reduce Cycle TimeJenkins Pipeline on your Local Box to Reduce Cycle Time
Jenkins Pipeline on your Local Box to Reduce Cycle TimeLuca Milanesio
 
Jenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code Review
Jenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code ReviewJenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code Review
Jenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code ReviewLuca Milanesio
 
Stable master workflow with Gerrit Code Review
Stable master workflow with Gerrit Code ReviewStable master workflow with Gerrit Code Review
Stable master workflow with Gerrit Code ReviewLuca Milanesio
 
Gerrit Code Review Analytics
Gerrit Code Review AnalyticsGerrit Code Review Analytics
Gerrit Code Review AnalyticsLuca Milanesio
 
Zero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review UpgradeZero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review UpgradeLuca Milanesio
 

Más de Luca Milanesio (20)

What's new in Gerrit Code Review v3.1 and beyond
What's new in Gerrit Code Review v3.1 and beyondWhat's new in Gerrit Code Review v3.1 and beyond
What's new in Gerrit Code Review v3.1 and beyond
 
Gerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source codeGerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source code
 
Cloud-native Gerrit Code Review
Cloud-native Gerrit Code ReviewCloud-native Gerrit Code Review
Cloud-native Gerrit Code Review
 
Gerrit Code Review migrations step-by-step
Gerrit Code Review migrations step-by-stepGerrit Code Review migrations step-by-step
Gerrit Code Review migrations step-by-step
 
Gerrit Code Review v3.2 and v3.3
Gerrit Code Review v3.2 and v3.3Gerrit Code Review v3.2 and v3.3
Gerrit Code Review v3.2 and v3.3
 
ChronicleMap non-blocking cache for Gerrit v3.3
ChronicleMap non-blocking cache for Gerrit v3.3ChronicleMap non-blocking cache for Gerrit v3.3
ChronicleMap non-blocking cache for Gerrit v3.3
 
Gerrit Code Review multi-site
Gerrit Code Review multi-siteGerrit Code Review multi-site
Gerrit Code Review multi-site
 
What's new in Gerrit Code Review 3.0
What's new in Gerrit Code Review 3.0What's new in Gerrit Code Review 3.0
What's new in Gerrit Code Review 3.0
 
Gerrit User Summit 2019 Keynote
Gerrit User Summit 2019 KeynoteGerrit User Summit 2019 Keynote
Gerrit User Summit 2019 Keynote
 
Gerrit multi-master / multi-site at GerritHub
Gerrit multi-master / multi-site at GerritHubGerrit multi-master / multi-site at GerritHub
Gerrit multi-master / multi-site at GerritHub
 
GerritHub a true Gerrit migration story to v2.15
GerritHub a true Gerrit migration story to v2.15GerritHub a true Gerrit migration story to v2.15
GerritHub a true Gerrit migration story to v2.15
 
Gerrit User Summit 2018 - Keynote
Gerrit User Summit 2018 - Keynote Gerrit User Summit 2018 - Keynote
Gerrit User Summit 2018 - Keynote
 
Jenkins plugin for Gerrit Code Review pipelines
Jenkins plugin for Gerrit Code Review pipelinesJenkins plugin for Gerrit Code Review pipelines
Jenkins plugin for Gerrit Code Review pipelines
 
Gerrit User Summit 2017 Keynote
Gerrit User Summit 2017 KeynoteGerrit User Summit 2017 Keynote
Gerrit User Summit 2017 Keynote
 
How to keep Jenkins logs forever without performance issues
How to keep Jenkins logs forever without performance issuesHow to keep Jenkins logs forever without performance issues
How to keep Jenkins logs forever without performance issues
 
Jenkins Pipeline on your Local Box to Reduce Cycle Time
Jenkins Pipeline on your Local Box to Reduce Cycle TimeJenkins Pipeline on your Local Box to Reduce Cycle Time
Jenkins Pipeline on your Local Box to Reduce Cycle Time
 
Jenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code Review
Jenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code ReviewJenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code Review
Jenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code Review
 
Stable master workflow with Gerrit Code Review
Stable master workflow with Gerrit Code ReviewStable master workflow with Gerrit Code Review
Stable master workflow with Gerrit Code Review
 
Gerrit Code Review Analytics
Gerrit Code Review AnalyticsGerrit Code Review Analytics
Gerrit Code Review Analytics
 
Zero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review UpgradeZero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review Upgrade
 

Último

social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 

Último (20)

Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 

JenkinsMobi: Jenkins XML API for Mobile Applications

  • 1. Jenkins XML API and Mobile Devices Simone Ardissone Luca Milanesio LMIT Software Ltd. http://www.jenkins-ci.mobi
  • 2. Who we are (1st guy) My name is Luca Founder and Director of LMIT Ltd (UK) “… the ones behind JenkinsMobi” Jenkins (/Hudson) contributor since 2007 Git and Gerrit big fan since 2009  Over 19 years of experience in Software Development Worked for major UK, EU and US Customers Banking, Retail, Industry, Finance, Telecoms, Utilities Development and Technical sales manager for major European and US Companies
  • 3. Who we are (2nd geek) My name is Simone The second arm of LMIT Ltd (UK) I’m on the IT as developer for 10 years Enthusiast of Jenkins (/Hudson) since 2007 Involved in mobile development with iOS and Android since 3 years The main developer of JenkinsMobi and HudsonMobi for iOS and Android Author of the new Assembla plug-in for Jenkins
  • 4. What we are going to talk about Jenkins Remote API introduction Mobile challenges Jenkins API for mobile applications Ideas to improve Jenkins Remote API Q&A
  • 5. How many of you used Jenkins API ? Quite often ? Sometimes happens ? Rarely ? Only once in my life ? Never ? Does Jenkins have XML API ?
  • 6. Jenkins Remote API A simple interface to query Jenkins CI XML based (but also JSON and Python) Easy to call: it’s simple REST Easy to debug: even with a simple browser xPathexpressions allows fast server-side computation (node count, conditions …) Jenkins custom ‘tree’ parameter to simplify queries
  • 7. What can be done with this API ? Access Jenkins from everywhere Ship enhanced features based on Jenkins “Mobilise” the Jenkins CI UE May be in the future 
  • 8. … or something like this
  • 9. Which challenges in mobile development ? Expensive data connection (when in 3G) Limited device memory (few MB) Limited screen size (few inches) Limited device-human interaction (fingertips)
  • 10. What you should do then ? Minimize data footprint Select most relevant KPIs Prevent long list of items to be returned over the network Provide rapid access with a few ‘taps’
  • 11. How did we develop JenkinsMobi ? Fully native iOS/Android Jenkins CI client NOiPhoneView: remove the HTML tag download and rendering Full XML API and xPATHusage (with ‘tree’): reduce to a minimum data transfer When API are missing… a bit of “nice old hacking” with AJAX calls and HTML scraping
  • 12. Jenkins XML API – step by step Step 1 – User auth Step 2 – GET the desired resource URL with the /api/xml suffix and optional tree or xpath query arguments Step 3 – Parse xml result and map it in simple objects (something like POJOs) Step 4 – Render resulting objects somewhere
  • 13. Jenkins XML API Security Simple HTTP- basic authentication Server authentication Sometimes Jenkins is hidden behind a server authentication: pass it before passing Jenkins credentials. For sys-admin: use only one kind of authentication or use the same credentials Problems with Jenkins Domain config URLs contained into xml results are often resolved only on local network Solution: override with the configured Jenkins domain URL
  • 14. Step 1 – Authenticate and compose the URL Authenticate with your credentials Basicauth: add “Authorization” HTTP header into a first really simple request (minimise data transfer) with value “Basic b64_credentials”, where b64_credentials is the base-64 of ‘username:password‘ Get the list of all views Point to <<domain>>/api/xml IfyouusexPathappendthis: ”?xpath=//*/primaryView|//*/view&wrapper=views” Ifyouusetreeappendthis: ”?tree=views[name,url],primaryView[name,url]”
  • 15. Step 2 – Parse xml result and render it Youwillgetsomethinglikethis: Parsexml and create a simplebean object for eachxmlvieworprimaryViewtag Renderit in a table/list
  • 16. iOS hints Prefer NSURLConnection for complete controls over data connection and authentication Pay attention to a correct URL escaping Always use asynchronous data connections Use NSXMLParser with yourownNSXMLParserDelegate implementation to parse XML responses Perform complete tests on real devices SSL connection could be a problem on iOS: Allow every ssl certificate (quite unsafe) Tell your users to visit with Safari the site where Jenkins is hosted, this to retrieve and trust its ssl certificate
  • 17. Android hints Use a wrapped DefaultHttpClient for coupledwithApache HttpGet and HttpPost gain more control over data download Server side authentication use preemptive authentication: customize the DefaultHttpClient::CredentialsProvider with your own domain and credential “Trust ALL” ssl certificates policy create your own SSLSocketFactory and register in the DefaultHttpClient::ConnectionManager For xml parsing use SAXParser with xmlvalidation set to false Most of returned XML have no XSD schema Use separate threads for all data connections: useAsyncTask or yourownthreadclasses
  • 18. Tablets … “the next thing” Tablet are spreading over More screen space  more power to Jenkins CI client More productivity … but at the end it is just “cool” 
  • 19. Jenkins on tablets … “the next thing” … so why not JenkinsMobi for iPad ? Custom filters and bookmarks for often-seen jobs More Jenkins CI Web integration A redesigned UE to meet iPad users needs Lot of other big things
  • 20. Dog-fooding: our golden rule JenkinsMobi builds are made with Jenkins  AndroidApp with Jenkins … easy ! just install the Android SDK customize the ANT files … and you’re done in a few minutes 
  • 21. Dog-fooding: our golden rule JenkinsMobi builds are made with Jenkins  iOSis a bit more complicated (as usual) get a Mac OSX machine installSICCI for xCodepluginfor Jenkins … matchesperfeclyourneeds. Be careful to install the proper Apple certificates Remember to installprovisioning
  • 22. Jenkins CI for our work
  • 23. What would you change in the API ? Output console APIs Build queue control APIs A smarter ‘tree’ parameter with some operations as xPath expressions have
  • 24. Thank you ! Q&A
  • 25.

Notas del editor

  1. Luca
  2. Simone
  3. Luca
  4. Luca
  5. Luca
  6. Luca
  7. Luca
  8. Luca
  9. Luca
  10. Simone:Explain the main differences in developing a full native app vs a iPhoneView HTML experience
  11. Simone
  12. SimoneURL override problem is visible ONLY from XML API: the Web UE relies on the Browser that “automatically” consider the links as relative to the base name.The optimal solution would be anyway  fix the damn Domain name in Jenkins config !
  13. SimoneMake a test using dev.gitent-scm.comShow the difference of data downloaded using tree expression or not
  14. Simone
  15. Simone
  16. Luca
  17. Luca
  18. Simone
  19. Simone
  20. Simone