Jenkins User Conference

Herzelia, July 5 2012

Full Cycle (Mobile) Build
Automation with Jenkins

Anton Weiss
AT&T Israel...
Jenkins User Conference

Herzelia, July 5 2012

About me	
!
!
!
!

  11 years in SW engineering
  7+ years in CM/Build/Aut...
Jenkins User Conference

Herzelia, July 5 2012

Contents:
!
!
!
!
!
!
!
!
!

  What’s in the full cycle?
  Mobile specific...
Jenkins User Conference

Herzelia, July 5 2012

“Good” Build Automation
!
!
!
!
!

  Reliable
  Repeatable
  Transparent
 ...
Jenkins User Conference

Herzelia, July 5 2012

What’s in the full cycle?
!   One build flow:
• 
• 
• 
• 
• 
• 
• 

SCM
Bu...
Jenkins User Conference

Herzelia, July 5 2012

Build flow - example	

#jenkinsconf
Jenkins User Conference

Herzelia, July 5 2012

Mobile Specifics	
!  Short Builds (dedicated build
machines)
!  Simple Dep...
Jenkins User Conference

Herzelia, July 5 2012

#jenkinsconf

Getting to the source.
	
! ClearCase
• 
• 
• 
• 
• 

UCM Cle...
Jenkins User Conference

Herzelia, July 5 2012

#jenkinsconf

ClearCase Configuration	

Integ Stream	

Build baseline	
Bui...
Jenkins User Conference

Herzelia, July 5 2012

Building Java (Android/BlackBerry)
	
!   Using Ant (instead of Eclipse)
• ...
Jenkins User Conference

Herzelia, July 5 2012

Building Objective C (iOS)
	
! ClearCase view on Windows
! Ssh to Mac
!   ...
Jenkins User Conference

Analyze It!
	
!   Java
•  Sonar
•  Lint

! iOS
•  Clang 	

Herzelia, July 5 2012

#jenkinsconf
Jenkins User Conference

Herzelia, July 5 2012

Notify	
!   Rally Notifier
!   Email-ext plugin
•  Create formatted files ...
Jenkins User Conference

Herzelia, July 5 2012

Testing Time
	
! JSystem based automaton
!   Emulators and real devices
! ...
Jenkins User Conference

Herzelia, July 5 2012

#jenkinsconf

Groovy post-build plugin	
pattern = ~/.*Automated_Tests_Fail...
Jenkins User Conference

Herzelia, July 5 2012

#jenkinsconf

Wrapping it all up	
!   Managing build flows:
•  What’s my v...
Jenkins User Conference

Herzelia, July 5 2012

Questions?	

?

ant.weiss@gmail.com	

#jenkinsconf
Jenkins User Conference

Herzelia, July 5 2012

Thank You To Our Sponsors
Platinum
Sponsors

Silver
Sponsor

#jenkinsconf
Upcoming SlideShare
Loading in …5
×

Continuous Delivery for Mobile R&D

332 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
332
On SlideShare
0
From Embeds
0
Number of Embeds
12
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Continuous Delivery for Mobile R&D

  1. 1. Jenkins User Conference Herzelia, July 5 2012 Full Cycle (Mobile) Build Automation with Jenkins Anton Weiss AT&T Israel #jenkinsconf
  2. 2. Jenkins User Conference Herzelia, July 5 2012 About me ! ! ! !   11 years in SW engineering   7+ years in CM/Build/Automation   5 years: home-grown solutions   2 last years: Jenkins (Hudson) #jenkinsconf
  3. 3. Jenkins User Conference Herzelia, July 5 2012 Contents: ! ! ! ! ! ! ! ! !   What’s in the full cycle?   Mobile specifics.   Getting to the source.   Building Java (Android/BlackBerry)   Building Objective C (iOS)   Analyze It   Notify   Testing Time   Wrapping it all up #jenkinsconf
  4. 4. Jenkins User Conference Herzelia, July 5 2012 “Good” Build Automation ! ! ! ! !   Reliable   Repeatable   Transparent   Well-documented   Informative #jenkinsconf
  5. 5. Jenkins User Conference Herzelia, July 5 2012 What’s in the full cycle? !   One build flow: •  •  •  •  •  •  •  SCM Build + Publish Unit Testing Static Code Analysis Deployment Automated Functional Tests Reporting #jenkinsconf
  6. 6. Jenkins User Conference Herzelia, July 5 2012 Build flow - example #jenkinsconf
  7. 7. Jenkins User Conference Herzelia, July 5 2012 Mobile Specifics !  Short Builds (dedicated build machines) !  Simple Deployment (OTA) !  Android : multiple devices #jenkinsconf
  8. 8. Jenkins User Conference Herzelia, July 5 2012 #jenkinsconf Getting to the source. ! ClearCase •  •  •  •  •  UCM ClearCase Multiple streams ( change lists ) Pre-build Baseline Read-only Build Stream Not supported on Mac OSX !   SVN •  Built-in support •  Change list and revision in mail and on Jenkins
  9. 9. Jenkins User Conference Herzelia, July 5 2012 #jenkinsconf ClearCase Configuration Integ Stream Build baseline Build Stream
  10. 10. Jenkins User Conference Herzelia, July 5 2012 Building Java (Android/BlackBerry) !   Using Ant (instead of Eclipse) •  BlackBerry : bb_ant_tools •  Android : SDK custom tasks •  Android : run-time properties !   Scan for compiler warnings #jenkinsconf
  11. 11. Jenkins User Conference Herzelia, July 5 2012 Building Objective C (iOS) ! ClearCase view on Windows ! Ssh to Mac !   Not using Xcode plugin #jenkinsconf
  12. 12. Jenkins User Conference Analyze It! !   Java •  Sonar •  Lint ! iOS •  Clang Herzelia, July 5 2012 #jenkinsconf
  13. 13. Jenkins User Conference Herzelia, July 5 2012 Notify !   Rally Notifier !   Email-ext plugin •  Create formatted files to be sent with: ${FILE,path="weblinks.txt"} ${FILE,path="changeset.txt"} •  Use env variables ${ENV,var="PackDir"} !   Create nightly summary (perl+XML API) #jenkinsconf
  14. 14. Jenkins User Conference Herzelia, July 5 2012 Testing Time ! JSystem based automaton !   Emulators and real devices !   ‘Archive artifacts’ for HTML output !   Groovy post-build plugin: -  Parse console log for failures -  Place badge on build page #jenkinsconf
  15. 15. Jenkins User Conference Herzelia, July 5 2012 #jenkinsconf Groovy post-build plugin pattern = ~/.*Automated_Tests_Faileds*:s*(d+).*/ manager.build.logFile.eachLine { line -> matcher = pattern.matcher(line) if(matcher.matches()) { manager.addWarningBadge("Failed tests.") failedTests= matcher.group(1) manager.createSummary("warning.gif").appendText("<h3> $failedTests failed tests!</h3>", false, false, false, "red") manager.buildUnstable() } } def result = manager.build.result def gifname if(result == hudson.model.Result.SUCCESS) gifname="blue.gif" if(result == hudson.model.Result.FAILURE) gifname="red.gif" if(result == hudson.model.Result.UNSTABLE) gifname="yellow.gif" if (manager.build.getHasArtifacts()) manager.createSummary(gifname).appendText("<b><a href="artifact/logs/ index.html">JSystem Report</a></b>", false)
  16. 16. Jenkins User Conference Herzelia, July 5 2012 #jenkinsconf Wrapping it all up !   Managing build flows: •  What’s my version? •  Parameterized trigger – pass this on. •  XML API !   Missing features: –  Flow-wide parameters ( Cascading Projects can be used) –  Flow data ( use XML API ) –  Improved build pipeline
  17. 17. Jenkins User Conference Herzelia, July 5 2012 Questions? ? ant.weiss@gmail.com #jenkinsconf
  18. 18. Jenkins User Conference Herzelia, July 5 2012 Thank You To Our Sponsors Platinum Sponsors Silver Sponsor #jenkinsconf

×