Upload
naresh-jain
View
227
Download
0
Embed Size (px)
Citation preview
S E T T I N G U P C O N T I N U O U S D E L I V E RY C U LT U R E
F O R A L A R G E S C A L E M O B I L E A P P
Naresh Jain @nashjain
http://nareshjain.com
M O B I L E C D - K E Y C H A L L E N G E S ?
• Code & Config spread across multiple dependent repos - how to do CI?
• How do you manage access to multiple test phone?
• With lack of quality tests, how do you promote your artifacts?
• How can we manage different kind of environments, to support different kinds of test?
• How do we visualise your code quality?
F O R A N E F F E C T I V E C D C U LT U R E
Hypothesis
Validation
Build MVP
Staged Rollout
AB Exp
Monitor
Analyse
Insights
Refine
Measure
Speed
Quality
I O S A P P C D C H A L L E N G E S
• Apple takes any where between 3 Days to 1 Week to push a new update to the app store
• Pretty complicated and cumbersome signing and packing process (in 2012-13)
• Need to deploy to actual iOS devices to test minor changes
H O W D I D W E S O LV E T H I S P R O B L E M S ?
• We decided to go down the Hybrid App Route
• Changes/Updates needed to be made at 3 levels:
• Content Changes & Logic Changes => JS/JSON
• Look and Feel Changes + Assets => HTML/CSS/JS
• Infrastructure Changes => Native Code
Build/Release Infra
Code a Feature
Run Static Analysis
Run Unit & Component Tests
Run Functional Tests for my Feature
Local Dev
Raise a PR
Static Analysis on Changeset
Run All Unit Tests
Code Review
C O N T I N U O U S I N T E G R AT I O N
Licensed Under Creative Commons by Naresh Jain
S TAT I C C O D E A N A LY S I S
Build/Release Infra
Build Mainline
Run Component & Sanity Tests on Instrumented Code
Run Workflow Tests on Instrumented Code
Code a Feature
Run Static Analysis
Run Unit & Component Tests
Run Functional Tests for my Feature
Local Dev
Raise a PR
Consumable Certified Artifact
Merge
Full Regression
Full Static Code Analysis
Benchmark, Perf Tests & Dynamic Analysis
Nightly Build
Static Analysis on Changeset
Run All Unit Tests
Code Review
C O N T I N U O U S I N T E G R AT I O N
Unit Tests
Component / Service (API) Tests
Integration Tests
Acceptance Tests
Workflow Tests
GUITests
1%
70%
10%
9%
6%
4%
Performance Tests
Security TestsEpic Level
Story Level
3rd Party/Device Dependencies
Exploratory Testing
% of Tests
jUnit, XCTest, Mockito, OCMock, RoboElectric
jUnit, XCTest (Instrumented/In-Container) Tests
jUnit, XCTest
Cucumber, Appium
Cucumber, Appium
Cucumber, Appium
1%
70%
10%
9%
6%
4%
Workflow Tests
Acceptance Tests
Integration Tests
Exploratory Testing
GUI Tests
Component / Service (API) Tests
Unit Tests
Continuous Integration Build PipelineLocal
Dev Build
Smoke Build
Functional Build
Epic Build
Theme Build
Product Build
Perf Build
Live Build
Staging Build
Dev Box
Team CI Server
Team CI Server
Dev Env
SIT Env
QA Env
UAT Env
Staging Env
Prod Env
~5 Min
~10 Min
~30 Min
~60 Min
~60 Min
~60 Min
~30 Min
~30 Min
~30 Min
Update
Checkin
Check
out
Publish Artifacts
(jars)
Retr
ieve
Pub
lishe
d A
rtifa
cts
Retriev
e Pub
lished
Artifact
s
Publis
h/Promote
Depend
ent Artif
acts
RetrieveArtifacts
RetrieveArtifacts
Retrieve Published Artifacts
Retrieve Published Artifacts
Checkout
Checkout
Checkout
Checkout
SCM
Each build will update Task statues
Each build will broadcast build stats and other reports to all relevant stakeholders at each stage of the build pipeline
DependencyManagement
Project/Task Management
Tool
VersionControl
D O C K E R I Z AT I O N
• All Services had to be containerised
• Registration and Discovery of Services (ZooKeeper)
• Mobile Apps need to externalise the configs
• Docker Image Repository (Artifactory)
Licensed Under Creative Commons by Naresh Jain
Questions?Naresh Jain
@nashjain [email protected]
http://blogs.agilefaqs.com