SlideShare a Scribd company logo
1 of 26
Download to read offline
Continuous Integration for your Android projects 
Sergii Zhuk 
Android Developer at DAXX BV 
Kyiv, UA Mobile 2014 
1
Agenda 
•CI in general 
•Popular CI systems and tools 
–Travis CI 
–Circle CI 
–Jenkins 
–Continuous Deployment 
•Demo projects 
•Q&A 
2
Continuous integration 
•Every developer keeps his work-in-progress continually integrated with every other developer 
•Requires build to be automated and self- testing 
•Makes results of the latest build visible 
3 
http://martinfowler.com/articles/continuousIntegration.html
•Making a build (periodically, triggered) 
•Running a unit and integration tests 
•Returning artifacts, test reports, code coverage reports etc. 
•Notifications 
•Deploying to continuous deployment tools 
4 
Practical outcomes that CI provides
Practical outcomes that CI provides 
5 
Illustration from https://www.jetbrains.com/teamcity/features/deployment.html
Travis CI: overview 
•Hosted, open-source 
•GitHub-only integration 
•Free for public GitHub repositories, starting from $129/mo for private ones 
•Easy to setup: always one .travis.yml file 
•Officially supports Android platform since 2014 
6
Travis CI: setup 
•Hosted Travis Webapp setup, add your GitHub account 
•.travis.yml configuration file 
•Validate your configuration file http://lint.travis-ci.org/ [yaml syntax] 
7
Travis CI: configuration options (1) 
•Programming language your project uses 
•Commands/scripts you want to be executed before each build (e.g. install dependencies) 
•Command is used to run test suite 
•Emails, Campfire and IRC rooms to notify about failures 
8
Travis CI: configuration options (2) 
•Code coverage (for Java/Android): external hosted tool Coveralls, uses JaCoCo reports, from $5/mo 
•Limited functionality in uploading artifacts, but friendly with Amazon S3 
•Scheduled builds only by external tool 
9
Travis CI: configuration example 
language: android android: components: # The BuildTools version used by your project - build-tools-19.1.0 # The SDK version used to compile your project - android-19 before_install: - chmod +x gradlew install: - ./gradlew assemble script: - ./gradlew test # For Robolectric tests 
10
Circle CI: overview 
•Hosted service 
•GitHub-only integration 
•Starts from $19/mo 
•Easy to setup: 2 additional files for Android 
•SSH access to build VM for 30 minutes after build 
11
•What programming language your project uses 
•What commands/scripts you want to be executed before each build (e.g. install dependencies) 
•What command is used to run test suite 
•Artifacts to collect 
•Nightly builds (using extra script) 
12 
Circle CI: configuration options
Circle CI: configuration (1): circle.yml 
13 
machine: environment: ANDROID_HOME: /usr/local/android-sdk-linux dependencies: cache_directories: - ~/.android - ~/android override: - bash install-dependencies.sh test: override: - chmod +x gradlew - ./gradlew assemble test 
Looks like Travis CI, doesn’t it?
Circle CI: configuration (2): dependencies script 
export PATH="$ANDROID_HOME/platform- tools:$ANDROID_HOME/tools:$PATH" DEPS="$ANDROID_HOME/installed-dependencies" if [ ! -e $DEPS ]; then echo y | android update sdk -u -a -t android-19 && echo y | android update sdk -u -a -t platform-tools && echo y | android update sdk -u -a -t extra && echo y | android update sdk -u -a -t build-tools-19.1.0 && touch $DEPS fi 
14
Jenkins: overview 
•Hudson  Jenkins 
•Open-Source 
•Java WebApp in container 
•Should be hosted on your private server 
•Multiple users, matrix permissions 
15
Jenkins: setup 
•Network-enabled server 
•Install Jenkins bundle with servlet container 
•Install Android SDK and support repos 
•Add Jenkins plugins for Git, Gradle etc. 
•Add your Git keys 
16
•Extremely flexible 
•Hundreds of plugins 
17 
Jenkins: configuration options
Jenkins: useful plugins 
•Android Lint plugin 
•HTML Report plugin 
•JaCoCo plugin 
•HockeyApp plugin 
•Google Play Android Publisher plugin 
18
Continuous deployment 
•Submit latest builds to test devices 
•TestFlight RIP 
19
Continuous deployment tools 
HockeyApp 
Appaloosa 
TestFairy 
Play Store 
Apphance 
Continuous deployment API 
X 
X 
X 
X 
X 
Mobile version 
X 
X 
X 
Distribution list permissioning 
X 
X 
X 
X 
Cost 
First month free, next from $30/mo 
Free, limited to 1 app and 10 users 
Free 
Registration fee 
Free, limited to 1 app and 50 devices 
20 
http://www.thoughtworks.com/insights/blog/testflight-alternatives-android
Some other CI products 
•CruiseControl : open-source, last updated in 2010 
•Ship.io (ex CIsimple) : hosted, easy to setup, but still a startup with bugs & limited functionality 
•TeamCity by JetBrains : good IntelliJ products integration, server-based, has free version 
•Atlassian Bamboo : good JIRA integration, starts from $10/month 
21
Demo: Example Android project 
•Simple 
•Gradle-based 
•Robolectric unit tests 
•Hosted on GitHub 
22
Demo 
23
Useful links 
•General 
http://martinfowler.com/articles/continuousIntegration.html 
https://devblog.toopher.com/2013/07/05/enabling-travis-ci-for-fun-and-profit/ 
http://ruenzuo.github.io/continuous-delivery-on-android-part-ii/index.html 
•Jenkins setup 
http://sanketdangi.com/post/62715793234/install-configure-jenkins-on-amazon-linux 
https://www.digitalocean.com/community/tutorials/how-to-build-android-apps-with-jenkins 
http://stackoverflow.com/questions/18045712/gradle-build-android-project-could-not- resolve-all-dependencies-error-but-i-t 
24
25 
Q&A
Thanks! 
Contact me: 
sergey.public@gmail.com 
http://ua.linkedin.com/in/sergiizhuk 
http://fb.com/sergii.zhuk 
26

More Related Content

What's hot

Automate your build on Android with Jenkins
Automate your build on Android with JenkinsAutomate your build on Android with Jenkins
Automate your build on Android with JenkinsBeMyApp
 
Continuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and AppiumContinuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and AppiumEmergya
 
GitHub Actions for 5 minutes
GitHub Actions for 5 minutesGitHub Actions for 5 minutes
GitHub Actions for 5 minutesSvetlin Nakov
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using JenkinsCliffano Subagio
 
(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...
(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...
(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...Amazon Web Services
 
Setup Build & Deploy with Jenkins CI
Setup Build & Deploy with Jenkins CISetup Build & Deploy with Jenkins CI
Setup Build & Deploy with Jenkins CIwalming
 
Building the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for TestersBuilding the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for TestersWilliam Echlin
 
Continuous integration in games development
Continuous integration in games developmentContinuous integration in games development
Continuous integration in games developmentNebojsa Brindic
 
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev EnvironmentPhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev EnvironmentRyan J. Salva
 
Fastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS AppsFastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS AppsSarath C
 
QAAgility Presentation - Cucumber with Appium
QAAgility Presentation - Cucumber with AppiumQAAgility Presentation - Cucumber with Appium
QAAgility Presentation - Cucumber with AppiumQAAgility Technologies
 
Automated-Testing-inside-containers
Automated-Testing-inside-containersAutomated-Testing-inside-containers
Automated-Testing-inside-containersManoj Kumar Kumar
 
Jenkins introduction
Jenkins introductionJenkins introduction
Jenkins introductionGourav Varma
 
Testing with Jenkins, Selenium and Continuous Deployment
Testing with Jenkins, Selenium and Continuous DeploymentTesting with Jenkins, Selenium and Continuous Deployment
Testing with Jenkins, Selenium and Continuous DeploymentMax Klymyshyn
 
Continuous integration using Bamboo
Continuous integration using BambooContinuous integration using Bamboo
Continuous integration using BambooTudor Hornai
 
Mobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and DockerMobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and DockerMoataz Nabil
 
Run your Appium tests using Docker Android - AppiumConf 2019
Run your Appium tests using Docker Android - AppiumConf 2019Run your Appium tests using Docker Android - AppiumConf 2019
Run your Appium tests using Docker Android - AppiumConf 2019Sargis Sargsyan
 
Continuous integration using jenkins
Continuous integration using jenkinsContinuous integration using jenkins
Continuous integration using jenkinsVinay H G
 
An Introduction to Eclipse Che - Next-Gen Eclipse Java IDE
An Introduction to Eclipse Che - Next-Gen Eclipse Java IDEAn Introduction to Eclipse Che - Next-Gen Eclipse Java IDE
An Introduction to Eclipse Che - Next-Gen Eclipse Java IDEKubeAcademy
 
Intro to Eclipse Che, by Tyler Jewell
Intro to Eclipse Che, by Tyler JewellIntro to Eclipse Che, by Tyler Jewell
Intro to Eclipse Che, by Tyler Jewelljwi11iams
 

What's hot (20)

Automate your build on Android with Jenkins
Automate your build on Android with JenkinsAutomate your build on Android with Jenkins
Automate your build on Android with Jenkins
 
Continuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and AppiumContinuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and Appium
 
GitHub Actions for 5 minutes
GitHub Actions for 5 minutesGitHub Actions for 5 minutes
GitHub Actions for 5 minutes
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using Jenkins
 
(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...
(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...
(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...
 
Setup Build & Deploy with Jenkins CI
Setup Build & Deploy with Jenkins CISetup Build & Deploy with Jenkins CI
Setup Build & Deploy with Jenkins CI
 
Building the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for TestersBuilding the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for Testers
 
Continuous integration in games development
Continuous integration in games developmentContinuous integration in games development
Continuous integration in games development
 
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev EnvironmentPhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
 
Fastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS AppsFastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS Apps
 
QAAgility Presentation - Cucumber with Appium
QAAgility Presentation - Cucumber with AppiumQAAgility Presentation - Cucumber with Appium
QAAgility Presentation - Cucumber with Appium
 
Automated-Testing-inside-containers
Automated-Testing-inside-containersAutomated-Testing-inside-containers
Automated-Testing-inside-containers
 
Jenkins introduction
Jenkins introductionJenkins introduction
Jenkins introduction
 
Testing with Jenkins, Selenium and Continuous Deployment
Testing with Jenkins, Selenium and Continuous DeploymentTesting with Jenkins, Selenium and Continuous Deployment
Testing with Jenkins, Selenium and Continuous Deployment
 
Continuous integration using Bamboo
Continuous integration using BambooContinuous integration using Bamboo
Continuous integration using Bamboo
 
Mobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and DockerMobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and Docker
 
Run your Appium tests using Docker Android - AppiumConf 2019
Run your Appium tests using Docker Android - AppiumConf 2019Run your Appium tests using Docker Android - AppiumConf 2019
Run your Appium tests using Docker Android - AppiumConf 2019
 
Continuous integration using jenkins
Continuous integration using jenkinsContinuous integration using jenkins
Continuous integration using jenkins
 
An Introduction to Eclipse Che - Next-Gen Eclipse Java IDE
An Introduction to Eclipse Che - Next-Gen Eclipse Java IDEAn Introduction to Eclipse Che - Next-Gen Eclipse Java IDE
An Introduction to Eclipse Che - Next-Gen Eclipse Java IDE
 
Intro to Eclipse Che, by Tyler Jewell
Intro to Eclipse Che, by Tyler JewellIntro to Eclipse Che, by Tyler Jewell
Intro to Eclipse Che, by Tyler Jewell
 

Viewers also liked

Gradle build automation tool
Gradle   build automation toolGradle   build automation tool
Gradle build automation toolIoan Eugen Stan
 
20160915 automation with_gradle
20160915 automation with_gradle20160915 automation with_gradle
20160915 automation with_gradleYuki Nanri
 
Achieving 100% mobile test coverage perfecto mobile
Achieving 100% mobile test coverage perfecto mobileAchieving 100% mobile test coverage perfecto mobile
Achieving 100% mobile test coverage perfecto mobilePerfecto Mobile
 
Android Continuous Integration and Automation - Enrique Lopez Manas, Sixt
Android Continuous Integration and Automation - Enrique Lopez Manas, SixtAndroid Continuous Integration and Automation - Enrique Lopez Manas, Sixt
Android Continuous Integration and Automation - Enrique Lopez Manas, SixtDroidConTLV
 
Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012
Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012
Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012Henri Gomez
 
Hands on continouous delivery, I TAKE 2014
Hands on continouous delivery, I TAKE 2014Hands on continouous delivery, I TAKE 2014
Hands on continouous delivery, I TAKE 2014Ioan Eugen Stan
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsTomohide Kakeya
 
Continuous Cross Platform Mobile App Development using Jenkins Build Server
Continuous Cross Platform Mobile App Development using Jenkins Build ServerContinuous Cross Platform Mobile App Development using Jenkins Build Server
Continuous Cross Platform Mobile App Development using Jenkins Build ServerAdam Paxton
 
Jenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous DeliveryJenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous DeliveryVirendra Bhalothia
 
Jenkins For One
Jenkins For OneJenkins For One
Jenkins For OneMark Waite
 

Viewers also liked (10)

Gradle build automation tool
Gradle   build automation toolGradle   build automation tool
Gradle build automation tool
 
20160915 automation with_gradle
20160915 automation with_gradle20160915 automation with_gradle
20160915 automation with_gradle
 
Achieving 100% mobile test coverage perfecto mobile
Achieving 100% mobile test coverage perfecto mobileAchieving 100% mobile test coverage perfecto mobile
Achieving 100% mobile test coverage perfecto mobile
 
Android Continuous Integration and Automation - Enrique Lopez Manas, Sixt
Android Continuous Integration and Automation - Enrique Lopez Manas, SixtAndroid Continuous Integration and Automation - Enrique Lopez Manas, Sixt
Android Continuous Integration and Automation - Enrique Lopez Manas, Sixt
 
Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012
Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012
Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012
 
Hands on continouous delivery, I TAKE 2014
Hands on continouous delivery, I TAKE 2014Hands on continouous delivery, I TAKE 2014
Hands on continouous delivery, I TAKE 2014
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkins
 
Continuous Cross Platform Mobile App Development using Jenkins Build Server
Continuous Cross Platform Mobile App Development using Jenkins Build ServerContinuous Cross Platform Mobile App Development using Jenkins Build Server
Continuous Cross Platform Mobile App Development using Jenkins Build Server
 
Jenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous DeliveryJenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous Delivery
 
Jenkins For One
Jenkins For OneJenkins For One
Jenkins For One
 

Similar to Continuous Integration for your Android projects

Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development PipelineGlobalLogic Ukraine
 
Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD Annie Huang
 
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERIndrajit Poddar
 
Android App Development..
Android App Development..Android App Development..
Android App Development..ITM University
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAmazon Web Services
 
CNCF: Cross-cloud CI v1.0.0 Dashboard Release 2018-01-26
CNCF: Cross-cloud CI v1.0.0 Dashboard Release 2018-01-26CNCF: Cross-cloud CI v1.0.0 Dashboard Release 2018-01-26
CNCF: Cross-cloud CI v1.0.0 Dashboard Release 2018-01-26Vulk Coop
 
DevOps on AWS: DevOps Day San Francisco
DevOps on AWS: DevOps Day San FranciscoDevOps on AWS: DevOps Day San Francisco
DevOps on AWS: DevOps Day San FranciscoAmazon Web Services
 
A Tale of Two Pizzas: Developer Tools at AWS - DevDay Los Angeles 2017
A Tale of Two Pizzas: Developer Tools at AWS - DevDay Los Angeles 2017A Tale of Two Pizzas: Developer Tools at AWS - DevDay Los Angeles 2017
A Tale of Two Pizzas: Developer Tools at AWS - DevDay Los Angeles 2017Amazon Web Services
 
Docker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshDocker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshCodefresh
 
Devops Online Training D.pptx
Devops Online Training D.pptxDevops Online Training D.pptx
Devops Online Training D.pptxTalluriRenuka
 
SRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver FasterSRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver FasterAmazon Web Services
 
Ciprian redinciuc continuous integration with jenkins for i os
Ciprian redinciuc   continuous integration with jenkins for i osCiprian redinciuc   continuous integration with jenkins for i os
Ciprian redinciuc continuous integration with jenkins for i osCodecamp Romania
 
Droidcon uk2012 androvm
Droidcon uk2012 androvmDroidcon uk2012 androvm
Droidcon uk2012 androvmdfages
 
Mobile Web Apps and the Intel® XDK
Mobile Web Apps and the Intel® XDKMobile Web Apps and the Intel® XDK
Mobile Web Apps and the Intel® XDKIntel® Software
 
A Tale of Two Pizzas: Accelerating Software Delivery with Developer Tools - D...
A Tale of Two Pizzas: Accelerating Software Delivery with Developer Tools - D...A Tale of Two Pizzas: Accelerating Software Delivery with Developer Tools - D...
A Tale of Two Pizzas: Accelerating Software Delivery with Developer Tools - D...Amazon Web Services
 

Similar to Continuous Integration for your Android projects (20)

Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD
 
Continuous testing
Continuous testingContinuous testing
Continuous testing
 
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
 
Android App Development..
Android App Development..Android App Development..
Android App Development..
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck Talks
 
CNCF: Cross-cloud CI v1.0.0 Dashboard Release 2018-01-26
CNCF: Cross-cloud CI v1.0.0 Dashboard Release 2018-01-26CNCF: Cross-cloud CI v1.0.0 Dashboard Release 2018-01-26
CNCF: Cross-cloud CI v1.0.0 Dashboard Release 2018-01-26
 
DevOps on AWS: DevOps Day San Francisco
DevOps on AWS: DevOps Day San FranciscoDevOps on AWS: DevOps Day San Francisco
DevOps on AWS: DevOps Day San Francisco
 
Kivy report
Kivy reportKivy report
Kivy report
 
Developer Tools at AWS 2018.pdf
Developer Tools at AWS 2018.pdfDeveloper Tools at AWS 2018.pdf
Developer Tools at AWS 2018.pdf
 
A Tale of Two Pizzas: Developer Tools at AWS - DevDay Los Angeles 2017
A Tale of Two Pizzas: Developer Tools at AWS - DevDay Los Angeles 2017A Tale of Two Pizzas: Developer Tools at AWS - DevDay Los Angeles 2017
A Tale of Two Pizzas: Developer Tools at AWS - DevDay Los Angeles 2017
 
Jenkins-CI
Jenkins-CIJenkins-CI
Jenkins-CI
 
Docker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshDocker based-Pipelines with Codefresh
Docker based-Pipelines with Codefresh
 
Devops Online Training D.pptx
Devops Online Training D.pptxDevops Online Training D.pptx
Devops Online Training D.pptx
 
SRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver FasterSRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver Faster
 
Ciprian redinciuc continuous integration with jenkins for i os
Ciprian redinciuc   continuous integration with jenkins for i osCiprian redinciuc   continuous integration with jenkins for i os
Ciprian redinciuc continuous integration with jenkins for i os
 
Droidcon uk2012 androvm
Droidcon uk2012 androvmDroidcon uk2012 androvm
Droidcon uk2012 androvm
 
Mobile Web Apps and the Intel® XDK
Mobile Web Apps and the Intel® XDKMobile Web Apps and the Intel® XDK
Mobile Web Apps and the Intel® XDK
 
A Tale of Two Pizzas: Accelerating Software Delivery with Developer Tools - D...
A Tale of Two Pizzas: Accelerating Software Delivery with Developer Tools - D...A Tale of Two Pizzas: Accelerating Software Delivery with Developer Tools - D...
A Tale of Two Pizzas: Accelerating Software Delivery with Developer Tools - D...
 
Automated Testing in DevOps
Automated Testing in DevOpsAutomated Testing in DevOps
Automated Testing in DevOps
 

Recently uploaded

Leading Mobile App Development Companies in India (2).pdf
Leading Mobile App Development Companies in India (2).pdfLeading Mobile App Development Companies in India (2).pdf
Leading Mobile App Development Companies in India (2).pdfCWS Technology
 
9999266834 Call Girls In Noida Sector 52 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 52 (Delhi) Call Girl Service9999266834 Call Girls In Noida Sector 52 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 52 (Delhi) Call Girl Servicenishacall1
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRnishacall1
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPsychicRuben LoveSpells
 

Recently uploaded (6)

Leading Mobile App Development Companies in India (2).pdf
Leading Mobile App Development Companies in India (2).pdfLeading Mobile App Development Companies in India (2).pdf
Leading Mobile App Development Companies in India (2).pdf
 
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
 
9999266834 Call Girls In Noida Sector 52 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 52 (Delhi) Call Girl Service9999266834 Call Girls In Noida Sector 52 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 52 (Delhi) Call Girl Service
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
 

Continuous Integration for your Android projects

  • 1. Continuous Integration for your Android projects Sergii Zhuk Android Developer at DAXX BV Kyiv, UA Mobile 2014 1
  • 2. Agenda •CI in general •Popular CI systems and tools –Travis CI –Circle CI –Jenkins –Continuous Deployment •Demo projects •Q&A 2
  • 3. Continuous integration •Every developer keeps his work-in-progress continually integrated with every other developer •Requires build to be automated and self- testing •Makes results of the latest build visible 3 http://martinfowler.com/articles/continuousIntegration.html
  • 4. •Making a build (periodically, triggered) •Running a unit and integration tests •Returning artifacts, test reports, code coverage reports etc. •Notifications •Deploying to continuous deployment tools 4 Practical outcomes that CI provides
  • 5. Practical outcomes that CI provides 5 Illustration from https://www.jetbrains.com/teamcity/features/deployment.html
  • 6. Travis CI: overview •Hosted, open-source •GitHub-only integration •Free for public GitHub repositories, starting from $129/mo for private ones •Easy to setup: always one .travis.yml file •Officially supports Android platform since 2014 6
  • 7. Travis CI: setup •Hosted Travis Webapp setup, add your GitHub account •.travis.yml configuration file •Validate your configuration file http://lint.travis-ci.org/ [yaml syntax] 7
  • 8. Travis CI: configuration options (1) •Programming language your project uses •Commands/scripts you want to be executed before each build (e.g. install dependencies) •Command is used to run test suite •Emails, Campfire and IRC rooms to notify about failures 8
  • 9. Travis CI: configuration options (2) •Code coverage (for Java/Android): external hosted tool Coveralls, uses JaCoCo reports, from $5/mo •Limited functionality in uploading artifacts, but friendly with Amazon S3 •Scheduled builds only by external tool 9
  • 10. Travis CI: configuration example language: android android: components: # The BuildTools version used by your project - build-tools-19.1.0 # The SDK version used to compile your project - android-19 before_install: - chmod +x gradlew install: - ./gradlew assemble script: - ./gradlew test # For Robolectric tests 10
  • 11. Circle CI: overview •Hosted service •GitHub-only integration •Starts from $19/mo •Easy to setup: 2 additional files for Android •SSH access to build VM for 30 minutes after build 11
  • 12. •What programming language your project uses •What commands/scripts you want to be executed before each build (e.g. install dependencies) •What command is used to run test suite •Artifacts to collect •Nightly builds (using extra script) 12 Circle CI: configuration options
  • 13. Circle CI: configuration (1): circle.yml 13 machine: environment: ANDROID_HOME: /usr/local/android-sdk-linux dependencies: cache_directories: - ~/.android - ~/android override: - bash install-dependencies.sh test: override: - chmod +x gradlew - ./gradlew assemble test Looks like Travis CI, doesn’t it?
  • 14. Circle CI: configuration (2): dependencies script export PATH="$ANDROID_HOME/platform- tools:$ANDROID_HOME/tools:$PATH" DEPS="$ANDROID_HOME/installed-dependencies" if [ ! -e $DEPS ]; then echo y | android update sdk -u -a -t android-19 && echo y | android update sdk -u -a -t platform-tools && echo y | android update sdk -u -a -t extra && echo y | android update sdk -u -a -t build-tools-19.1.0 && touch $DEPS fi 14
  • 15. Jenkins: overview •Hudson  Jenkins •Open-Source •Java WebApp in container •Should be hosted on your private server •Multiple users, matrix permissions 15
  • 16. Jenkins: setup •Network-enabled server •Install Jenkins bundle with servlet container •Install Android SDK and support repos •Add Jenkins plugins for Git, Gradle etc. •Add your Git keys 16
  • 17. •Extremely flexible •Hundreds of plugins 17 Jenkins: configuration options
  • 18. Jenkins: useful plugins •Android Lint plugin •HTML Report plugin •JaCoCo plugin •HockeyApp plugin •Google Play Android Publisher plugin 18
  • 19. Continuous deployment •Submit latest builds to test devices •TestFlight RIP 19
  • 20. Continuous deployment tools HockeyApp Appaloosa TestFairy Play Store Apphance Continuous deployment API X X X X X Mobile version X X X Distribution list permissioning X X X X Cost First month free, next from $30/mo Free, limited to 1 app and 10 users Free Registration fee Free, limited to 1 app and 50 devices 20 http://www.thoughtworks.com/insights/blog/testflight-alternatives-android
  • 21. Some other CI products •CruiseControl : open-source, last updated in 2010 •Ship.io (ex CIsimple) : hosted, easy to setup, but still a startup with bugs & limited functionality •TeamCity by JetBrains : good IntelliJ products integration, server-based, has free version •Atlassian Bamboo : good JIRA integration, starts from $10/month 21
  • 22. Demo: Example Android project •Simple •Gradle-based •Robolectric unit tests •Hosted on GitHub 22
  • 24. Useful links •General http://martinfowler.com/articles/continuousIntegration.html https://devblog.toopher.com/2013/07/05/enabling-travis-ci-for-fun-and-profit/ http://ruenzuo.github.io/continuous-delivery-on-android-part-ii/index.html •Jenkins setup http://sanketdangi.com/post/62715793234/install-configure-jenkins-on-amazon-linux https://www.digitalocean.com/community/tutorials/how-to-build-android-apps-with-jenkins http://stackoverflow.com/questions/18045712/gradle-build-android-project-could-not- resolve-all-dependencies-error-but-i-t 24
  • 26. Thanks! Contact me: sergey.public@gmail.com http://ua.linkedin.com/in/sergiizhuk http://fb.com/sergii.zhuk 26