Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Fastlane for Androidによる継続的デリバリー/continuous-delivery-with-fastlane-for-android

Fastlane for Androidによる継続的デリバリー/continuous-delivery-with-fastlane-for-android

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

Fumiya Nakamura

January 13, 2016
Tweet

More Decks by Fumiya Nakamura

Other Decks in Programming

Transcript

  1. ͢΂ͯͷεϙʔπΛ εϚϗͰ ϦΞϧͰ Ұͭͷ৔ॴͰ ϥΠϒͷ೤ڰΛ ͍ͭͰ΋Ͳ͜Ͱ΋ ిंͷதͰ΋57͕ͳͯ͘΋ɺ͜Ε ͔Β͸εϙʔπΛ͍ͭͰ΋Ͳ͜Ͱ΋ɻ εϙʔπχϡʔεΛ ·ͱΊಡΈ

    ͋ͳͨͷ͔ΘΓʹɺ͋ͳ͕ͨ΄ ͍͠χϡʔεΛ͕͖ͯ͞͠·͢ɻ ઐ໳Ո΍ஶ໊ਓ΋࢖͏ εϙʔπ4/4 ੈքதʹίϝϯςʔλʔ͕͍·͢ɻ ͋ͳͨ΋ͦͷҰਓ͔΋͠Ε·ͤΜɻ αʔϏε֓ཁ
  2. #FUB%JTUSJCVUJPO  GBTUMBOF'BTUpMF #VJME %JTUSJCVUJPO *NQPSU 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
  3. #FUB%JTUSJCVUJPO  GBTUMBOF'BTUpMF #VJME %JTUSJCVUJPO *NQPSU 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
  4. #FUB%JTUSJCVUJPO  GBTUMBOF'BTUpMF #VJME %JTUSJCVUJPO *NQPSU 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
  5. #FUB%JTUSJCVUJPO  GBTUMBOF'BTUpMF #VJME %JTUSJCVUJPO *NQPSU 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
  6. #FUB%JTUSJCVUJPO  GBTUMBOF'BTUpMF #VJME %JTUSJCVUJPO *NQPSU 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 "DUJPO "DUJPO "DUJPO
  7. w &YFDVUFXPSLqPXTXJUIGBTUMBOF 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 #FUB%JTUSJCVUJPO DJSDMFZNM https://circleci.com/docs/configuration
  8. w &YFDVUFXPSLqPXTXJUIGBTUMBOF 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 #FUB%JTUSJCVUJPO DJSDMFZNM $POpHVSFUIFWJSUVBMNBDIJOF https://circleci.com/docs/configuration
  9. w &YFDVUFXPSLqPXTXJUIGBTUMBOF 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 #FUB%JTUSJCVUJPO DJSDMFZNM 4QFDJGZEFQFOEFODJFT https://circleci.com/docs/configuration
  10. w &YFDVUFXPSLqPXTXJUIGBTUMBOF 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 #FUB%JTUSJCVUJPO DJSDMFZNM %FQMPZVTJOHGBTUMBOF https://circleci.com/docs/configuration
  11. 3FMFBTF%JTUSJCVUJPO  GBTUMBOF'BTUpMF #VJME %JTUSJCVUJPO *NQPSU 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
  12. 3FMFBTF%JTUSJCVUJPO  GBTUMBOF'BTUpMF #VJME %JTUSJCVUJPO *NQPSU 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
  13. 3FMFBTF%JTUSJCVUJPO  GBTUMBOF'BTUpMF #VJME %JTUSJCVUJPO *NQPSU 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
  14. 3FMFBTF%JTUSJCVUJPO  GBTUMBOF'BTUpMF #VJME %JTUSJCVUJPO *NQPSU 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
  15. 3FMFBTF%JTUSJCVUJPO  GBTUMBOF"QQpMF # Follow https://github.com/fastlane/supply#setup to get one issuer

    [email protected]” # Path to the keyfile keyfile “./fastlane/certs/play.p12" # e.g. com.krausefx.app package_name “your.package.name” w 4FUVQGPSDPOOFDUJOHUP(PPHMF1MBZ
  16. 3FMFBTF%JTUSJCVUJPO  GBTUMBOF'BTUpMF #VJME %JTUSJCVUJPO *NQPSU 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
  17. 3FMFBTF%JTUSJCVUJPO  GBTUMBOF'BTUpMF #VJME %JTUSJCVUJPO *NQPSU 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 $VTUPN"DUJPO $VTUPN"DUJPO
  18. 3FMFBTF%JTUSJCVUJPO  GBTUMBOF'BTUpMF$VTUPN"DUJPO 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
  19. 3FMFBTF%JTUSJCVUJPO  GBTUMBOFNFUBEBUB 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