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
Android: Integração Contínua & Entrega Contínua
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Rafael Toledo
April 20, 2018
Programming
180
3
Share
Android: Integração Contínua & Entrega Contínua
Apresentado na Trilha Android do TDC Florianópolis 2018
Rafael Toledo
April 20, 2018
More Decks by Rafael Toledo
See All by Rafael Toledo
Gamedev com Kotlin Native
rafaeltoledo
0
110
Kotlin Multiplataforma: Compartilhando código entre Android e iOS
rafaeltoledo
0
300
Motion Layout
rafaeltoledo
1
170
Pipeline Android
rafaeltoledo
3
200
Android Architecture Components
rafaeltoledo
7
200
What's New in Kotlin 1.3
rafaeltoledo
0
170
An Overview of Multiplatform Kotlin
rafaeltoledo
2
160
Compartilhando Código com Kotlin Multiplataforma
rafaeltoledo
2
290
Android Assíncrono
rafaeltoledo
3
240
Other Decks in Programming
See All in Programming
PHPer、Cloudflare に引っ越す
suguruooki
1
150
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
500
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
2.9k
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
400
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
28
19k
【26新卒研修】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
150
ふにゃっとしない名前の付け方 〜哲学で茹で上げる、コシのあるソフトウェア設計〜
shimomura
0
110
20年以上続くプロダクトでも使い続けられる静的解析ツールを求めて
matsuo_atsushi
0
140
[RubyKaigi 2026] Require Hooks
palkan
1
310
認証統合から始めるフロントエンドの機能単位開発 — マイクロサービス思想の適用
koukimiura
0
100
Liberating Ruby's Parser from Lexer Hacks
ydah
2
2.7k
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
340
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
110
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
300
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
450
Done Done
chrislema
186
16k
The Limits of Empathy - UXLibs8
cassininazir
1
320
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.4k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
370
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.6k
New Earth Scene 8
popppiees
3
2.2k
Raft: Consensus for Rubyists
vanstee
141
7.4k
Mobile First: as difficult as doing things right
swwweet
225
10k
Transcript
ANDROID Integração Contínua & Entrega Contínua
Rafael Toledo Consultor na ThoughtWorks Especialista em Android Mobile desde
2012 rafaeltoledo.net twitter.com/_rafaeltoledo github.com/rafaeltoledo medium.com/@rafael_toledo
Por que eu preciso disso? • Integração de código •
Todo mundo na mesma página • Execução de testes e validação contínua • Cobertura de código e outras métricas • Releases frequentes 3
Git Flow • Forks ou Branches? • Short lived branches
/ Long lived branches • Pull Requests / Merge Requests • Code Review 4
5
O que você procura em um code review? 6
7 Code Review O que devo procurar em um code
review? https://bit.ly/2JabM5R
None
None
None
Self-Hosted x Cloud
Self-Hosted x Cloud
Self-Hosted x Cloud
Cloud - CircleCI • Cota gratuita para repositórios privados •
Github ou Bitbucket • Facilidade de configuração • Suporte a Docker 14
.circleci/config.yml version: 2 jobs: build: working_directory: ~/my-project docker: - image:
circleci/android:api-27-alpha environment: JVM_OPTS: -Xmx3072m CIRCLE_JDK_VERSION: oraclejdk8 ... 15
.circleci/config.yml ... steps: - checkout - run: name: Accept licenses
command: yes | sdkmanager --licenses || true - run: name: Build release APK Command: ./gradlew assembleRelease 16
None
None
None
Jenkins: setup mínimo 20
None
None
E como ficam os meus segredos nesse bolo todo? 23
# app/build.gradle android { ... signingConfigs { storeFile file("$rootDir/release.jks") storePassword
'12345678' keyAlias 'myawesomeapp' keyPassword '12345678' } }
# app/build.gradle android { ... signingConfigs { storeFile file("$rootDir/release.jks") storePassword
'12345678' keyAlias 'myawesomeapp' keyPassword '12345678' } }
# app/build.gradle android { ... signingConfigs { storeFile file(System.env.RELEASE_STORE_FILE) storePassword
System.env.RELEASE_STORE_PASSWORD keyAlias System.env.RELEASE_KEY_ALIAS keyPassword System.env.RELEASE_KEY_PASSWORD } }
None
criptografa openssl aes-256-cbc -e -in release.keystore -out release.keystore-cipher -md sha256
-k $CIPHER_DECRYPT_KEY 28
descriptografa openssl aes-256-cbc -d -in distribution/release.keystore-cipher -out distribution/release.keystore -md sha256
-k $CIPHER_DECRYPT_KEY 29
None
FIREBASE TEST LAB 31
5 execuções / dia em devices 10 execuções / dia
em emuladores
Robo Test & Espresso
None
Por que o emulador não funciona bem na cloud? 35
... - run: name: Run Tests on Firebase Test Lab
command: | echo "${FIREBASE_TOKEN}" >> "secret.json" curl -0 https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.zip unzip -qq google-cloud-sdk.zip ./google-cloud-sdk/bin/gcloud config set project my-project ./google-cloud-sdk/bin/gcloud auth activate-service-account --key-file secret.json
... ./google-cloud-sdk/bin/gcloud firebase test android run --app app/build/outputs/apk/debug/app-debug.apk --test app/build/outputs/apk/androidTest/app-debug-androidTest.apk
--device-ids sailfish,NexusLowRes,hammerhead --os-version-ids 19,23,27 --locales en --orientations portrait
DEPLOY / DELIVERY 38
None
None
None
None
https://docs.fastlane.tools/getting-started/an droid/setup/ 43
lane :beta do gradle(task: 'assemble', build_type: 'Release') upload_to_play_store(track: 'beta') slack(message:
'Successfully distributed a new beta build') end
https://docs.fastlane.tools/getting-started/an droid/screenshots/ 45
... # https://github.com/Triple-T/gradle-play-publisher - run: name: Deploy to Google Play
command: ./gradlew publishApkRelease
# https://github.com/square/spoon Spoon.screenshot(activity, "initial_state");
The Social Project rafaeltoledo.net medium.com/the-social-app github.com/rafaeltoledo/social-app
Links CIRCLECI https://circleci.com JENKINS https://jenkins.io FIREBASE TEST LAB https://firebase.google.com/docs/test-lab/ SEGMENTIO
ANALYTICS (SETUP CIRCLECI + FIREBASE) https://flutter.io/flutter-for-android/ 49
OBRIGADO Slides disponíveis em: speakerdeck.com/rafaeltoledo 50