Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Fastlane for Androidによる継続的デリバリー

5,896 views

Published on

How we use fastlene for android at ookami, Inc.

We use fastlane to
1. Build using gradle
2. Beta Distribution
3. Upload builds and metadata to Google Play

See more about fastlane.
https://github.com/fastlane/fastlane

Supply - Command line tool for updating Android apps and their metadata on the Google Play Store.
https://github.com/fastlane/supply

Published in: Software
  • Hi there! I just wanted to share a list of sites that helped me a lot during my studies: .................................................................................................................................... www.EssayWrite.best - Write an essay .................................................................................................................................... www.LitReview.xyz - Summary of books .................................................................................................................................... www.Coursework.best - Online coursework .................................................................................................................................... www.Dissertations.me - proquest dissertations .................................................................................................................................... www.ReMovie.club - Movies reviews .................................................................................................................................... www.WebSlides.vip - Best powerpoint presentations .................................................................................................................................... www.WritePaper.info - Write a research paper .................................................................................................................................... www.EddyHelp.com - Homework help online .................................................................................................................................... www.MyResumeHelp.net - Professional resume writing service .................................................................................................................................. www.HelpWriting.net - Help with writing any papers ......................................................................................................................................... Save so as not to lose
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Follow the link, new dating source: ❶❶❶ http://bit.ly/2F7hN3u ❶❶❶
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating for everyone is here: ❶❶❶ http://bit.ly/2F7hN3u ❶❶❶
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Fastlane for Androidによる継続的デリバリー

  1. 1. Fastlane for Android による継続的デリバリー Fumiya Nakamura / @nafu003
  2. 2. ライブ共有型スポーツアプリ 「Player!(プレイヤー)」 株式会社ookami
  3. 3. すべてのスポーツを スマホで リアルで 一つの場所で ライブの熱狂を いつでもどこでも 電車の中でもTVがなくても、これ からはスポーツをいつでもどこでも。 スポーツニュースを まとめ読み あなたのかわりに、あなたがほ しいニュースをさがしてきます。 専門家や著名人も使う スポーツSNS 世界中にコメンテーターがいます。 あなたもその一人かもしれません。 サービス概要
  4. 4. https://github.com/fastlane/fastlane 4
  5. 5. https://github.com/fastlane/fastlane/releases/tag/1.34.0 5
  6. 6. fastlane • Use fastlane to 1. Build using gradle 2. Beta Distribution 3. Upload builds and metadata to Google Play 6
  7. 7. fastlane • Use fastlane to 1. Build using gradle 2. Beta Distribution 3. Upload builds and metadata to Google Play 7
  8. 8. Build Distribution Import 8
  9. 9. Workflow 9
  10. 10. Workflow Push 10
  11. 11. Beta Distribution • Tools • Fabric (Crashlytics Beta) • Fastlane • CircleCI 11
  12. 12. Beta Distribution • Tools • Fabric (Crashlytics Beta) • Fastlane • CircleCI 12
  13. 13. Beta Distribution 13 fastlane / Fastfile Build Distribution Import lane :beta do # Build gradle(task: “assembleStaging”) # Push to Crashlytics crashlytics( groups: “developer”, notifications: false ) # Post to Slack slack( message: “Successfully deployed new App Update.” ) end
  14. 14. Beta Distribution 14 fastlane / Fastfile Build Distribution Import lane :beta do # Build gradle(task: “assembleStaging”) # Push to Crashlytics crashlytics( groups: “developer”, notifications: false ) # Post to Slack slack( message: “Successfully deployed new App Update.” ) end
  15. 15. Beta Distribution 15 fastlane / Fastfile Build Distribution Import lane :beta do # Build gradle(task: “assembleStaging”) # Push to Crashlytics crashlytics( groups: “developer”, notifications: false ) # Post to Slack slack( message: “Successfully deployed new App Update.” ) end
  16. 16. Beta Distribution 16 fastlane / Fastfile Build Distribution Import lane :beta do # Build gradle(task: “assembleStaging”) # Push to Crashlytics crashlytics( groups: “developer”, notifications: false ) # Post to Slack slack( message: “Successfully deployed new App Update.” ) end
  17. 17. Beta Distribution 17 fastlane / Fastfile Build Distribution Import lane :beta do # Build gradle(task: “assembleStaging”) # Push to Crashlytics crashlytics( groups: “developer”, notifications: false ) # Post to Slack slack( message: “Successfully deployed new App Update.” ) end Action Action Action
  18. 18. Beta Distribution • Tools • Fabric (Crashlytics Beta) • Fastlane • CircleCI 18
  19. 19. • Execute workflows with fastlane machine: java: version: openjdk7 ruby: version: 2.2.3 dependencies: pre: - echo y | android update sdk --no-ui --al--filter tool,extra-android- m2repository,extra-android-support,extra-google-google_play_services,extra- google-m2repository,android-23 - echo y | android update sdk --no-ui --al --filter build-tools-23.0.2 deployment: beta: branch: master commands: - bundle exec fastlane beta Beta Distribution circle.yml https://circleci.com/docs/configuration
  20. 20. • Execute workflows with fastlane machine: java: version: openjdk7 ruby: version: 2.2.3 dependencies: pre: - echo y | android update sdk --no-ui --al--filter tool,extra-android- m2repository,extra-android-support,extra-google-google_play_services,extra- google-m2repository,android-23 - echo y | android update sdk --no-ui --al --filter build-tools-23.0.2 deployment: beta: branch: master commands: - bundle exec fastlane beta Beta Distribution circle.yml Configure the virtual machine https://circleci.com/docs/configuration
  21. 21. • Execute workflows with fastlane machine: java: version: openjdk7 ruby: version: 2.2.3 dependencies: pre: - echo y | android update sdk --no-ui --al--filter tool,extra-android- m2repository,extra-android-support,extra-google-google_play_services,extra- google-m2repository,android-23 - echo y | android update sdk --no-ui --al --filter build-tools-23.0.2 deployment: beta: branch: master commands: - bundle exec fastlane beta Beta Distribution circle.yml Specify dependencies https://circleci.com/docs/configuration
  22. 22. • Execute workflows with fastlane machine: java: version: openjdk7 ruby: version: 2.2.3 dependencies: pre: - echo y | android update sdk --no-ui --al--filter tool,extra-android- m2repository,extra-android-support,extra-google-google_play_services,extra- google-m2repository,android-23 - echo y | android update sdk --no-ui --al --filter build-tools-23.0.2 deployment: beta: branch: master commands: - bundle exec fastlane beta Beta Distribution circle.yml Deploy using fastlane https://circleci.com/docs/configuration
  23. 23. fastlane • Use fastlane to 1. Build using gradle 2. Beta Distribution 3. Upload builds and metadata to Google Play 23
  24. 24. Release Distribution 24 fastlane / Fastfile Build Distribution Import lane :deploy do # Generate key files dir = “./fastlane/certs” add_key( keystore_path: File.join(dir, “release.keystore”), play_p12_path: File.join(dir, “play.p12”) ) # Build gradle(task: “assembleRelease”) # Upload to Google Play supply( track: “alpha” ) # Delete key files
 remove_key end
  25. 25. Release Distribution 25 fastlane / Fastfile Build Distribution Import lane :deploy do # Generate key files dir = “./fastlane/certs” add_key( keystore_path: File.join(dir, “release.keystore”), play_p12_path: File.join(dir, “play.p12”) ) # Build gradle(task: “assembleRelease”) # Upload to Google Play supply( track: “alpha” ) # Delete key files
 remove_key end
  26. 26. Release Distribution 26 fastlane / Fastfile Build Distribution Import lane :deploy do # Generate key files dir = “./fastlane/certs” add_key( keystore_path: File.join(dir, “release.keystore”), play_p12_path: File.join(dir, “play.p12”) ) # Build gradle(task: “assembleRelease”) # Upload to Google Play supply( track: “alpha” ) # Delete key files
 remove_key end
  27. 27. Release Distribution 27 fastlane / Fastfile Build Distribution Import lane :deploy do # Generate key files dir = “./fastlane/certs” add_key( keystore_path: File.join(dir, “release.keystore”), play_p12_path: File.join(dir, “play.p12”) ) # Build gradle(task: “assembleRelease”) # Upload to Google Play supply( track: “alpha” ) # Delete key files
 remove_key end
  28. 28. Release Distribution 28 fastlane / Appfile # Follow https://github.com/fastlane/supply#setup to get one issuer “fastlane@api-123456789-12345.iam.gserviceaccount.com” # Path to the keyfile keyfile “./fastlane/certs/play.p12" # e.g. com.krausefx.app package_name “your.package.name” • Setup for connecting to Google Play
  29. 29. Release Distribution 29 fastlane / Fastfile Build Distribution Import lane :deploy do # Generate key files dir = “./fastlane/certs” add_key( keystore_path: File.join(dir, “release.keystore”), play_p12_path: File.join(dir, “play.p12”) ) # Build gradle(task: “assembleRelease”) # Upload to Google Play supply( track: “alpha” ) # Delete key files
 remove_key end
  30. 30. Release Distribution 30 fastlane / Fastfile Build Distribution Import lane :deploy do # Generate key files dir = “./fastlane/certs” add_key( keystore_path: File.join(dir, “release.keystore”), play_p12_path: File.join(dir, “play.p12”) ) # Build gradle(task: “assembleRelease”) # Upload to Google Play supply( track: “alpha” ) # Delete key files
 remove_key end Custom Action Custom Action
  31. 31. Release Distribution 31 fastlane / Fastfile - Custom Action module Fastlane module Actions class AddKeyAction < Action def self.run(params) keystore_path = params[:keystore_path] play_p12_path = params[:play_p12_path] encryption_secret = ENV["ENCRYPTION_SECRET"] sh "openssl aes-256-cbc -k #{encryption_secret} -in #{keystore_path}.enc -d -a -out #{keystore_path}" sh "openssl aes-256-cbc -k #{encryption_secret} -in #{play_p12_path}.enc -d -a -out #{play_p12_path}" end end end end module Fastlane module Actions class RemoveKeyAction < Action def self.run(params) sh "rm -rf fastlane/certs" end end end end
  32. 32. Release Distribution 32 fastlane / metadata fastlane ├── Appfile ├── Fastfile ├── actions │   ├── add_key.rb │   └── remove_key.rb ├── certs │   ├── play.p12.enc │   └── release.keystore.enc └── metadata    └── android    └── ja-JP    ├── full_description.txt    ├── images    │   ├── featureGraphic.png    │   ├── icon.png    │   ├── phoneScreenshots    │   │   ├── 1.jpeg    │   │   └── 2.jpeg    │   ├── sevenInchScreenshots    │   ├── tenInchScreenshots    │   ├── tvScreenshots    │   └── wearScreenshots    ├── short_description.txt    ├── title.txt    └── video.txt
  33. 33. fastlane • Use fastlane to 1. Build using gradle 2. Beta Distribution 3. Upload builds and metadata to Google Play 33
  34. 34. WE ARE HIRING!

×