Share
Embed
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
Transcript
34 slides
-
ͯ͢ͷεϙʔπΛ εϚϗͰ ϦΞϧͰ ҰͭͷॴͰ ϥΠϒͷڰΛ ͍ͭͰͲ͜Ͱ ిंͷதͰ57͕ͳͯ͘ɺ͜Ε ͔ΒεϙʔπΛ͍ͭͰͲ͜Ͱɻ εϙʔπχϡʔεΛ ·ͱΊಡΈ
͋ͳͨͷ͔ΘΓʹɺ͋ͳ͕ͨ΄ ͍͠χϡʔεΛ͕͖ͯ͞͠·͢ɻ ઐՈஶ໊ਓ͏ εϙʔπ4/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 -
#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 -
#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 -
#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 -
#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 -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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