Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
[Sergiy Mokienko] Continuous Integration in And...
Search
Google Developers Group Lviv
September 10, 2016
Technology
0
300
[Sergiy Mokienko] Continuous Integration in Android
Presentation from GDG DevFest Ukraine 2016.
Learn more at:
https://devfest.gdg.org.ua
Google Developers Group Lviv
September 10, 2016
Tweet
Share
More Decks by Google Developers Group Lviv
See All by Google Developers Group Lviv
[Elad Bezalel] Angular Material CDK
gdglviv
0
150
[Zac Sweers] Breaking the Android ClassLoader
gdglviv
0
220
[Daniel Galpin] Adventures in Navigation
gdglviv
1
400
[Rebecca Franks] Practical Image Processing in Android
gdglviv
0
330
[Mateusz Herych] Architecture for App Bundles
gdglviv
1
120
[Andrea Falcone] Iterative Mobile Development
gdglviv
1
84
[Yonatan Levin] Keynote: The world of change and your significance in it
gdglviv
0
130
[Denys Tkalich] Using BigQuery as a data warehouse in B2B startup
gdglviv
0
89
[Mete Atamel] Google Assistant powered by Containers, Machine Learning and .NET on Google Cloud
gdglviv
0
140
Other Decks in Technology
See All in Technology
サーバーレスアーキテクチャと生成AIの融合 / Serverless Meets Generative AI
_kensh
12
3k
Datadogとともにオブザーバビリティを布教しよう
mego2221
0
130
モノレポ開発のエラー、誰が見る?Datadog で実現する適切なトリアージとエスカレーション
biwashi
6
770
事業継続を支える自動テストの考え方
tsuemura
0
300
SA Night #2 FinatextのSA思想/SA Night #2 Finatext session
satoshiimai
1
100
MC906491 を見据えた Microsoft Entra Connect アップグレード対応
tamaiyutaro
1
480
『衛星データ利用の方々にとって近いようで触れる機会のなさそうな小話 ~ 衛星搭載ソフトウェアと衛星運用ソフトウェア (実物) を動かしながらわいわいする編 ~』 @日本衛星データコミニティ勉強会
meltingrabbit
0
120
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
57k
君はPostScriptなウィンドウシステム 「NeWS」をご存知か?/sunnews
koyhoge
0
720
目の前の仕事と向き合うことで成長できる - 仕事とスキルを広げる / Every little bit counts
soudai
22
5.8k
偶然 × 行動で人生の可能性を広げよう / Serendipity × Action: Discover Your Possibilities
ar_tama
1
740
データ資産をシームレスに伝達するためのイベント駆動型アーキテクチャ
kakehashi
PRO
2
230
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
Become a Pro
speakerdeck
PRO
26
5.1k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
Into the Great Unknown - MozCon
thekraken
35
1.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
310
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
540
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
51k
Transcript
Continuous Integration in Android Sergiy Mokienko Android developer Make round
picture online http:// www.cutmypic.com/
#dfua The only thing you should care about is code.
Foreword
#dfua Background 5 years of android development 7 + projects
on a market Previously GDG Chapter lead in Nikolaev Love IoT
#dfua
Journey begins CI what are you ?
#dfua The main thing about Continues Integration is merging features
without breaking your solution
#dfua Steps Code Test Merge Build Deploy
#dfua No way to merge without testing
#dfua + + =
#dfua VCS
#dfua Benefits Jira integration Slack integration Access management Pull requests
#dfua Benefits
#dfua Strategy Time dev Feature branches Starting feature Merging feature
#dfua Merging policy Pull request Auto tests Static analysis Code
review Merge
#dfua Pull Request Leave comments
#dfua Pull Request See changes
#dfua Pull Request Build on pull request
#dfua Pull Request Easy merge
#dfua Auto test Test Java Separately
#dfua Auto test Unit tests should be fast
#dfua Auto test Keep tests relevant
#dfua Auto test Use spoon
#dfua Auto test
#dfua Static Analysis
#dfua Code Review Look for potential bugs Verify tests coverage
#dfua Code Review Project structure not violated Run happy path
#dfua No you are ready to merge boy =)
#dfua Version naming
#dfua Strategy Time dev master Feature branches Starting feature Merging
feature Release 0.2 Hot Fix Release 0.1
#dfua
#dfua Build & Deploy
#dfua Build server
#dfua Build server Open Sourced Plugins Free Easy setUp Scripts
support Build agents Variety of build triggers VCS support Remote test Run Poor git support Plugins No default support for build agents You have pay for it
#dfua TeamCity Build configuration VCS Root Build triggers Build steps
Failure Conditions Artefacts
#dfua TeamCity Build configuration - Script supports -Attach several VCS
roots -Build dependencies between jobs - Select branch for build - Schedule triggers - Repository manipulations
#dfua Version naming int majorVersion = MAJOR_VERSION as int int
minorVersion = MINOR_VERSION as int int bugFixVersion = BUG_VERSION as int String teamCityBuildVersion = (System.getenv("BUILD_NUMBER") ?: "0") versionCode majorVersion * 100000000 + minorVersion * 1000000 + bugFixVersion * 10000 + (jenkinsBuildVersion as Integer) versionName "" + majorVersion + "." + minorVersion + "." + bugFixVersion + "-" + jenkinsBuildVersion
#dfua gradle.properties MAJOR_VERSION = 1 MINOR_VERSION = 19 BUG_VERSION =
0 COMPILE_SDK_VERSION=23 BUILD_TOOLS_VERSION=23.0.2 MIN_SDK_VERSION=16 TARGET_SDK_VERSION=23 SNAPSHOT=true SNAPSHOT_ANALYTICS=false AUTOTEST=false CONNECTION_TEST=false MIXPANEL_QA_KEY=297559187fbc0957bec746de0c45a1b2 BRANDS_DIR=brands BRAND=internal SERVER_PROJECT_ID=429963794797 LEVERATE_PASSWORD=leverate2011
#dfua gradle.properties String snapshot = (Boolean.valueOf(getProperty('SNAPSHOT').toString())) ? "Boolean.parseBoolean(\"true\")" : "false"
buildConfigField 'boolean', 'SNAPSHOT', snapshot String snapshotAnalytics = (Boolean.valueOf(getProperty('SNAPSHOT_ANALYTICS').toString())) ? "Boolean.parseBoolean(\"true\")" : "false" buildConfigField 'boolean', 'SNAPSHOT_ANALYTICS', snapshotAnalytics String autotest = (Boolean.valueOf(getProperty('AUTOTEST').toString())) ? "Boolean.parseBoolean(\"true\")" : "false" buildConfigField 'boolean', 'AUTOTEST', autotest String connectionTest = (Boolean.valueOf(getProperty('CONNECTION_TEST').toString())) ? "Boolean.parseBoolean(\"true\")" : "false" buildConfigField 'boolean', 'CONNECTION_TEST', connectionTest String mixPanelDebugKey = ("\"" + getProperty('MIXPANEL_QA_KEY').toString() + "\"") buildConfigField 'String', 'MIXPANEL_QA_KEY', mixPanelDebugKey
#dfua Email Notification <TeamCity data directory>/config/_notifications/ Including ERRORS from the
log <#list build.buildLog.messages[1..] as message><#-- skipping the first message (it is a root node)--> <#if message.status == "ERROR" || message.status == "FAILURE" > ${message.text} </#if> </#list>
#dfua Email Notification <TeamCity data directory>/config/_notifications/ <p>Build artifacts:</p> <#list build.artifactsDirectory.listFiles()
as file> <a href="${webLinks.getDownloadArtefactUrl(build.buildTypeExternalId, build.buildId, file.name)}">${file.name}</a> ($ {file.length()}B)<br/> </#list>
#dfua Unit test Merge to any feature branch On every
pull request JUnit tests only Lint inspections Test report Lint report Cancel PullRequest if test fails
#dfua Merge On Every PullRequest: Feature branch -> dev Hot
fix -> master UI Tests on device Test report Cancel PullRequest if test fails
#dfua Nightly build Scheduled Every night on dev branch Runs
full Test run of All test suits on all relevant Test report Notifies all team with results Notifies all team with results
#dfua Debug deployment Triggered on every pull request: Feature branch
-> dev Builds debug version of the application Upload debug.apk to your debug build delivery cloud debug .apk
#dfua Debug deployment Triggered manually Builds release version of your
application Creates a tag with release version Uploads release.apk to google play release.apk
#dfua Release deployment Triggered manually Builds release version of your
application Creates a tag with release version Uploads release.apk to google play release.apk
#dfua Deployment debug
#dfua Debug deployment if (project.hasProperty("deployGateToken")) { apply plugin: 'deploygate'
deploygate { userName = "username" token = project.property("deployGateToken") } apks { release { sourceFile = file('build/outputs/apk/sirix-debug-' + android.defaultConfig.versionName + '.apk') } } }
#dfua Release deployment
#dfua Release deployment apply plugin: 'com.github.triplet.play' play { serviceAccountEmail
= 'your-service-account-email' pk12File = file('key.p12') track = 'production|betta|alpha' uploadImages = true }
#dfua Good to have
#dfua Summary Use correct tools Make your tests fast Automate
build delivery everywhere Use good VCS Use cross platform tools Give gradle a chance Automate you release cycle
#dfua Questions ?
Mokienko Sergiy @smokienko
[email protected]
https://www.facebook.com/Korwin22 Thank you!
#dfua Resource https://www.jetbrains.com/teamcity/documentation/ http://square.github.io/spoon/ http://nvie.com/posts/a-successful-git-branching-model/ https://github.com/Tapadoo/TCSlackNotifierPlugin https://github.com/Triple-T/gradle-play-publisher https://deploygate.com/?locale=en https://get.fabric.io/ https://www.sonatype.com/nexus-repository-sonatype
http://cyrilmottier.com/2014/12/09/a-story-of-software-development-methodologies/ https://www.reddit.com/r/androiddev/comments/3ig3gm/show_us_your_gradle_tasks/ https://medium.com/@jordanjoz/streamlining-eeros-android-build-process-6a870ef40a89#.1psxvs5kq https://medium.com/fuzz/getting-the-most-out-of-crashlytics-380afb703876#.5vyv6s5hc