Automate your build on Android with Jenkins

67 %
33 %
Information about Automate your build on Android with Jenkins
Technology

Published on March 4, 2014

Author: bemyapp

Source: slideshare.net

Description

By Mathieu Hausherr (@mhausherr) from Octo Technology http://blog.octo.com/en/

Te c h L e a d iOSAndroid DEVELOPER BlackberryBadaWindowsPhone7 MOBILE Mathieu Hausherr mha@octo.com 1

Continuous … Continuous Integration Continuous Delivery Continuous Deployment 2

Definitions ! 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 3

Continuous Integration 4

One developer Source Repository Compile Testing Execute Tests Check Code Quality Package Deploy Document 5

Many developers Compile Execute Tests Check Code Quality Document Compile Execute Tests Check Code Quality Source Repository Document Testing Compile Execute Tests Check Code Quality Document 6

Remove the anarchy with a Software Factory Continuous Integration Server Source Repository Compile Execute Tests Check Code Quality Package Deploy Document Testing Notifications 7

Advanced Software Factory Continuous Integration Server Source Repository Fetch Dependencies Compile Binary Repository Execute Tests Check Code Quality Task and Issue Repository Package Test Platform Deploy Document Notifications Documentation & KPIs 8

How ? 1- Two things ü Source repository ü One machine to build 9

How ? 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 Source : http://en.wikipedia.org/wiki/Continuous_integration 10

Continuous Continuous Delivery Deployment 11

One big difference Continuous Delivery manual 2 1 Team 3 4 5 Source Repository Continuous Integration Server Tests (UAT, QA) Deploy to production Continuous Deployment auto Source : http://blog.crisp.se/2013/02/05/yassalsundman/continuous-delivery-vs-continuous-deployment 12

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 13

What about mobile Apps ? ! 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 14

Why deploy continuously ? ! Improve TTM and feedback in real life IDEAS LEARN FAST CODE FAST DATA CODE MEASURE FAST 15

Meetic sample ! Deploy every day at 4PM to the product team ! Product team come on the open space at 4:30 and give feedbacks 16

And quality ? ! By decreasing deployment size !   Minimize risks !   Reduce the Mean Time To Repair (MTTR) 17

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/ 18

http://localhost:8080/ 19

Install plugins 20

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 execute the build on MASTER SLAVE 21

Continuous Integration SOFTWARE FACTORY Automatic dev. tests Check Quality rules Work Station Publish metrics Source code + tests SCM Building Application Automatic func. tests Work Station Application checked Source code + tests Document Deploymen t Documentation 22

Continuous Integration on Android SOFTWARE FACTORY Automatic dev. tests Check Quality rules Work Station Source code + tests Publish metrics LINT Emma SCM Building Application Automatic func. tests Work Station Application checked Source code + tests Document Documentation Deploymen t JAVAD oc 23

Android – Focus TESTS BUILD Junit forAndroid Quality-tools for Android github.com/stephanenicolas/ Quality-Tools-for-Android VM è  è Graphic environment and VirtualBox are necessary è No simultaneous run Not running on JVM. Dalvik is necessary. 24

Deployment ! Specific solutions exist to handle deployment on mobile devices ! Specific MAM actors ! MDM solution also have this features ! Many plugins available 25

Deployment 26

CI Server on the cloud 27

GUI & Metrics Readability Unit tests 28

Add a comment

Related presentations

Related pages

Jenkins

... is the final stabilization and testing period before the final release of Jenkins 2.0. If you ... build. What’s new? Jenkins is ... Android C /C++ ...
Read more

Getting started: Building Android apps with Hudson

Jenkins is an open source ... you should be able to build your Android app with ... the Batch task plugin can automate installing the apk on a device to ...
Read more

ant - Jenkins And android Build - Stack Overflow

Jenkins And android Build. ... I am trying to automate the android build process using Jenkins. ... When jenkins builds your project with Ant, ...
Read more

Automating the Continuous Integration of Android Projects ...

This post will show how to automate the deployment process of a Android Application ... the Jenkins –> Build Android ... DZone with permission of ...
Read more

Continuous Integration for iOS and Android

... would with Jenkins. We host all your builds so you can focus on creating awesome apps! Automate ... as our Android and iOS continuous integration ...
Read more

Software Build Automation with Jenkins - YouTube

Software Build Automation with Jenkins ... Android systems, and just ... AdamOutler shows you his Jenkins system and gives examples of alternate ...
Read more

Jenkins and Android

Configure your Android project on Jenkins ... Android Emulator plugin automate many Android tasks ... , Android developers can build true continuous ...
Read more

Android Emulator Plugin - Jenkins - Jenkins Wiki

This plugin lets you automate a number of Android ... After ticking "Run an Android emulator during build", you ... (random for each build) JENKINS_ANDROID ...
Read more

Unity3dBuilder Plugin - Jenkins - Jenkins Wiki

Unity3dBuilder Plugin. ... If you want to build Unity3d with Jenkins, ... the Unity3d Editor from the command line to automate build and packaging of ...
Read more