Programming Your Home Automate With Arduino, Android, And Your Computer
Automate your build on Android with Jenkins
-
Upload
bemyapp -
Category
Technology
-
view
463 -
download
3
description
Transcript of Automate your build on Android with Jenkins
1
DEVELOPER MOBILE iOS Android Blackberry Bada Windows Phone7 Te c h Lead
Mathieu Hausherr [email protected]
2
Continuous …
Continuous Integration
Continuous Delivery
Continuous Deployment
3
! Continuous Integration ! Each commit or per batch, the source code is :
! Compiled ! Tested ! Deployed on Integration environment
! Continuous Delivery ! Each commit or per batch, the source code is :
! […] ! Delivered to next team (QA, validation, production, …)
! Continuous Deployment
! Each commit or per batch, the source code is : ! […] ! Deployed on Production environment
Definitions
4
Continuous Integration
5
One developer
Source Repository Compile
Deploy
Execute Tests
Check Code Quality
Document
Package
Testing
6
Many developers
Source Repository
Compile
Execute Tests
Check Code Quality
Document
Compile
Execute Tests
Check Code Quality
Document
Compile
Execute Tests
Check Code Quality
Document
Testing
7
Remove the anarchy with a Software Factory
Source Repository
Testing
Compile
Deploy
Execute Tests
Check Code Quality
Document
Package
Continuous Integration Server
Notifications
8
Advanced Software Factory
Source Repository
Continuous Integration Server
Notifications
Task and Issue Repository
Compile
Deploy
Execute Tests
Check Code Quality
Document
Package
Fetch Dependencies
Binary Repository
Documentation & KPIs
Test Platform
9
1- Two things
ü Source repository
ü One machine to build
How ?
10
2- Many principles to apply :
ü Maintain a code repository ü Automate the build ü Make the build self-testing ü Everyone commits more often ü Everyone can see the results of the latest build ü Automate deployment
How ?
Source : http://en.wikipedia.org/wiki/Continuous_integration
11
Continuous Delivery
Continuous Deployment
12
One big difference
Source : http://blog.crisp.se/2013/02/05/yassalsundman/continuous-delivery-vs-continuous-deployment
Team
1
Source Repository
2
Continuous Integration
Server
3
Tests (UAT, QA)
4
Deploy to production
5
Continuous Deployment auto
Continuous Delivery manual
13
Samples (for the backend)
1 deployment per day
~10 deployments per day
~25 deployments per day
~50 deployments per day
1 deployment every 11 seconds
2009/2010
14
! Continuous deployment, not continuous delivery ! Many factors prevent from doing continuous delivery
! On iOS and WP the Store validation process ! On Android the regression testing process is long
! Facebook is going for crowd testing on Android ! Android Beta Program
! New releases are marketed towards the users and they expect them ! ! “42 new levels for Candy Crush !” ! “A new hero in Clash of Clans !” ! “A new budget feature for my mobile banking app !”
! The emerging standard is going to release every month
What about mobile Apps ?
15
! Improve TTM and feedback in real life
Why deploy continuously ?
IDEAS
CODE DATA
CODE FAST
MEASURE FAST
LEARN FAST
16
! Deploy every day at 4PM to the product team
! Product team come on the open space at 4:30 and give feedbacks
Meetic sample
17
! By decreasing deployment size ! Minimize risks ! Reduce the Mean Time To Repair (MTTR)
And quality ?
18
Installing Jenkins
! Manual Installation
! Install Java ! Download jenkins.war ! Start the server
! Directly java –jar jenkins.war
! Or with a Java Web Application Server ! Jenkins is accessible at : http://localhost:8080/
19
http://localhost:8080/
20
Install plugins
21
Distributed jobs
! Sometimes the CI Server can’t execute the build directly on the server ! For example on windows it’s impossible to build
Objective-C source code, you need a Mac for that.
! It’s the master/slave notion
MASTER SLAVE
execute the build on
22
Source code + tests
Source code + tests
Continuous Integration SOFTWARE FACTORY
Application checked
SCM
Automatic func. tests
Work Station
Work Station
Building Application
Automatic dev. tests
Check Quality rules
Deployment
Publish metrics
Document
Documentation
23
Source code + tests
Source code + tests
Continuous Integration on Android SOFTWARE FACTORY
Application checked
SCM
Automatic func. tests
Work Station
Work Station
Building Application
Automatic dev. tests
Check Quality rules
Deployment
Publish metrics
Document
Documentation
JAVADoc
LINT Emma
24
Quality-tools for Android
BUILD
Android – Focus
github.com/stephanenicolas/Quality-Tools-for-Android
Junit forAndroid
TESTS VM
è Not running on JVM. Dalvik is necessary.
è Graphic environment and VirtualBox are necessary è No simultaneous run
25
! Specific solutions exist to handle deployment on mobile devices
! Specific MAM actors
! MDM solution also have this features
! Many plugins available
Deployment
26
Deployment
27
CI Server on the cloud
28
GUI & Metrics
Unit tests
Readability