Jenkins XML API and Mobile Devices



Similar documents
Why API? Using the REST API in an education environment. JAMF Software, LLC

ios Cloud Development FOR Neal Goldstein WILEY John Wiley & Sons, Inc.

KonyOne Server Prerequisites _ MS SQL Server

A Model of the Operation of The Model-View- Controller Pattern in a Rails-Based Web Server

Developing a Web Server Platform with SAPI Support for AJAX RPC using JSON

System Requirements for Microsoft Dynamics NAV 2016

How Liferay Is Improving Quality Using Hundreds of Jenkins Servers

Load and Performance Load Testing. RadView Software October

Building native mobile apps for Digital Factory

System Requirements for Microsoft Dynamics NAV 2016

Wiley. Automated Data Collection with R. Text Mining. A Practical Guide to Web Scraping and

Visualizing a Neo4j Graph Database with KeyLines

Building, testing and deploying mobile apps with Jenkins & friends

System Requirements for Microsoft Dynamics NAV 2015

This document is provided to you by ABC E BUSINESS, Microsoft Dynamics Preferred partner. System Requirements NAV 2016

New Features in XE8. Marco Cantù RAD Studio Product Manager

XML Processing and Web Services. Chapter 17

System Requirements for Microsoft Dynamics NAV 2016

Medstar Health Dell Services

INUVIKA OPEN VIRTUAL DESKTOP FOUNDATION SERVER

Middleware- Driven Mobile Applications

Developing Cross-platform Mobile and Web Apps

ITP 342 Mobile App Dev

System Requirements for Microsoft Dynamics NAV 2016

Summer 2013 Cloud Initiative. Release Bulletin

Introduction to IBM Worklight Mobile Platform

Front-End Performance Testing and Optimization

Adobe Marketing Cloud Bloodhound for Mac 3.0

DreamFactory & Modus Create Case Study

Mobile Device Management Version 8. Last updated:

Implementing Mobile Thin client Architecture For Enterprise Application

2X SecureRemoteDesktop. Version 1.1

Sage CRM Connector Tool White Paper

2X Cloud Portal v10.5

Install and End User Reference Guide for Direct Access to Citrix Applications

Sage 200 On Premise. System Requirements and Prerequisites

Develop a Native App (ios and Android) for a Drupal Website without Learning Objective-C or Java. Drupaldelphia 2014 By Joe Roberts

Building Mobile Applications Creating ios applications with jquery Mobile, PhoneGap, and Drupal 7

tibbr Now, the Information Finds You.

WHAT S NEW IN QLIKVIEW 11

Zend Server 4.0 Beta 2 Release Announcement What s new in Zend Server 4.0 Beta 2 Updates and Improvements Resolved Issues Installation Issues

Enterprise Application Security Workshop Series

An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0

XenMobile Logs Collection Guide

Novell Filr 1.0.x Mobile App Quick Start

System Requirements. Microsoft Dynamics NAV 2016

Media Server Installation & Administration Guide

01. Introduction of Android

Robotium Automated Testing for Android

Implementation Guide. Version 10

Certified Selenium Professional VS-1083

Remote Desktop Solution, (RDS), replacing CITRIX Home Access

Site Configuration Mobile Entrée 4

ios SDK possibilities & limitations

A programming model in Cloud: MapReduce

Ipswitch Client Installation Guide

Using the Push Notifications Extension Part 1: Certificates and Setup

Introduction to the Mobile Access Gateway

Remote Access End User Reference Guide for SHC Portal Access

Performance Testing for Ajax Applications

Learning Remote Control Framework ADD-ON for LabVIEW

APP DEV. We build your ideas into web and mobile applications. steicho. Technological Solutions

Ensuring the security of your mobile business intelligence

Spectrum Technology Platform

Casper Suite Release Notes. Version 9.1

SHC Client Remote Access User Guide for Citrix & F5 VPN Edge Client

Developer Guide: REST API Applications. SAP Mobile Platform 2.3 SP03

Working With Virtual Hosts on Pramati Server

Portals and Hosted Files

2012 Nolio Ltd. All rights reserved

Citrix StoreFront 2.0

BlackBerry Enterprise Service 10. Universal Device Service Version: Administration Guide

WHITE PAPER. Domo Advanced Architecture

Getting Started Guide for Developing tibbr Apps

Sophos Mobile Control Installation prerequisites form

Product Manual. MDM On Premise Installation Version 8.1. Last Updated: 06/07/15

Presto User s Manual. Collobos Software Version Collobos Software, Inc!

White Paper BMC Remedy Action Request System Security

Visualizing an OrientDB Graph Database with KeyLines

Cloud Powered Mobile Apps with Azure

Tenrox. Single Sign-On (SSO) Setup Guide. January, Tenrox. All rights reserved.

Remote Application Server Version 14. Last updated:

6 CURRENT JOB OPENINGS:

Introduction to the AirWatch Browser Guide

Sametime 9 Meetings deployment Open Mic July 23rd 2014

Epic Remote Access for Mobile Devices FAQ and Setup

IceWarp to IceWarp Server Migration

Certified The Grinder Testing Professional VS-1165

separate the content technology display or delivery technology

TG Web. Technical FAQ

Remote Application Server Version 14. Last updated:

Access Database Hosting. An introduction to Cloud Hosting Access databases from Your Office Anywhere

Kony Mobile Application Management (MAM)

Zenprise Device Manager 6.1.5

PULSE APPCONNECT. A Micro VPN That Allows Specific Applications on Mobile Devices to Independently Leverage the Connect Secure Gateway.

General principles and architecture of Adlib and Adlib API. Petra Otten Manager Customer Support

Sage 200 On Premise. Deployment and Installation Guide

Transcription:

Jenkins XML API and Mobile Devices Simone Ardissone Luca Milanesio LMIT Software Ltd. http://www. jenkins-ci.mobi

Who we are (1 st 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 (2 nd geek)! My name is Simone! The second arm of LMIT Ltd (UK)! I m on the IT as developer since 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 use uses Jenkins API?! Quite often?! Some times 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! xpath expressions 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! NO iphoneview: remove the HTML tag download and rendering! Full XML API and xpath usage (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 Basic auth: 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 If you use xpath append this:?xpath=//*/primaryview //*/view&wrapper=views If you use tree append this:?tree=views[name,url],primaryview[name,url]

Step 2 Parse xml result and render it You will get something like this:! Parse xml and create a simple bean object for each xml view or primaryview tag! Render it 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 your own NSXMLParserDelegate implementation to parse XML responses! Perform complete tests on real devices! SSL connection could be a problem on ios: Allow every ssl certificate (quite unsecure) 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 coupled with Apache 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 xml validation set to false Most of returned XML have no XSD schema! Use separate threads for all data connections: use AsyncTask or your own thread classes

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 oftenseen 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!! Android App with Jenkins easy! 1. just install the Android SDK 2. customize the ANT files 3. and you re done in a few minutes!

Dog-fooding: our golden rule JenkinsMobi builds are made with Jenkins!! ios is a bit more complicated (as usual) 1. get a Mac OSX machine 2. install SICCI for xcode plugin for Jenkins matches perfecly our needs. 3. Be careful to install the proper Apple certificates 4. Remember to install provisioning

Jenkins CI for our work

What would you change in the API?! Output console APIs! Build queue control APIs! Slave nodes control APIs! A smarter tree parameter with some operations as xpath expressions have

Thank you!

Thank You To Our Sponsors Platinum Sponsor Gold Sponsor Silver Sponsor Bronze Sponsors Coming Soon: The CloudBees Newsletter for Jenkins # Please complete the Jenkins survey to help us better serve the community (bonus: a chance to win an Apple TV!)