Continuous Integration
Goal is that every time you commit your code, your code automatically goes thru some Junit testing (iOS/Android) and also builds the apps (ipa/apk). CI helps improves the quality of the app. Ideally is nice to have one system when you can kick a build and also run your unit and integration tests. CI is key to have a great app :)Good read: Tools used by other companies:
Android Jenkins aws
Read to learn about CI Jenkins vs. Circle CI vs Travis
http://mtdevuk.com/2015/04/27/ setting-up-a-jenkins- continuous-integration- environment-for-android/
***Good read Android and Jenkins
***Good read Android and Jenkins
------------------------------------------------------------------------------------------------------------
My Opinion:
Most enterprise companies use Jenkins. For small companies I would suggest CircleCI($) or Travis($$$).
------------------------------------------------------------------------------------------------------------
Jenkins:
What is Jenkins?
Jenkins Plugin info (BUILD_NUMBER..)
Jenkins is an open source continuous integration tool which aims to automate certain tasks that developers find themselves repeating. It runs as a local server on a host machine
Tutorial by codepath Jenkins is an open source continuous integration tool which aims to automate certain tasks that developers find themselves repeating. It runs as a local server on a host machine
Setup:
1. Create Jenkins account.
2. Configure Jenkins:
Install Plugins: Manage Jenkins -> Manage Plugins -> Available
- Gradle Plugin (build system)
- Git Plugin (use git to link to your projects repos)
- Android Emulator
- AWS device farm (test apps with real devices using AWS Device farm)
- HockeyApp (distribute apps)
- Android lint plugin - Lint is a great tool created by Google to analyze the code for Android. It comes with the SDK of Android and it is useful to have good quality code.
3. Configure Git repo, ssh key.
4. Create new job to generate APK.
Enterprise Notes:
1. Create Jenkins account.
2. Install Android SDK in jenkins machine(node)
3. Install Plugins.
4. Configure Git Enterprise repo(master).
5. Test run to generate apk.
Tips
Jacoco Reporting
------------------------------------------------------------------------------------------------------------Enterprise Notes:
1. Create Jenkins account.
2. Install Android SDK in jenkins machine(node)
3. Install Plugins.
4. Configure Git Enterprise repo(master).
5. Test run to generate apk.
Tips
Jacoco Reporting
Circleci uses the build file: circle.yml, you need to create and add this file to your project root.
Circleci builds apk and runs Espresso UI test(click button change text).
GitHub Project
Circleci Dashboard
Reference
Circleci iOS
------------------------------------------------------------------------------------------------------------
Travis uses the build file: travis.yml , you need to create and add this file to your project root. Can be setup to run both unit and integration tests. Working example follow below step: CodePath Tutorial
GitHub Project
Good read
Travis Enterprise
Travis iOS
Travis upload apk to Testflight
------------------------------------------------------------------------------------------------------------
Online Examples:
Android example:
https://www.bignerdranch.com/blog/continuous-delivery-for-android/
iOS example:
Build and deploy to HockeyApp
Travis iOS very example
------------------------------------------------------------------------------------------------------------
Other Resources:
CI slides-
http://www.slideshare.net/sergiizhuk/slides-v6-41909668
http://www.slideshare.net/tomoakiimai2/tips-for-better-ci-on-android?related=1
CI paper -
https://saucelabs.com/resources/white-papers/why_ci_should_be_part_of_your_mobile_dev_process-a_sauce_labs_report.pdf/@@download/file
Gradlew-
https://guides.codepath.com/android/Getting-Started-with-Gradle
http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Tasks
No comments:
Post a Comment