Developing in the Fastlane -> How LookLive uses Fastlane to automate and speed up the app deployment...
-
Upload
donny-wals -
Category
Technology
-
view
379 -
download
1
Transcript of Developing in the Fastlane -> How LookLive uses Fastlane to automate and speed up the app deployment...
www.looklive.com@donnywals
Developing in the Fastlane
How LookLive uses Fastlane to automate and speed up the app deployment process
www.looklive.com@donnywals
A typical deploy day..
Finalize codeHurry to write some tests
Run tests
Upload to Crashlytics
Update release notes
Upload to iTunes ConnectWait…
Update (localized) app info
Update (localized) screenshots
Submit buildWait for review…
Archive build
Update build numberUpdate release notes
www.looklive.com@donnywals
That’s a lot of steps
And I actually forgot a couple..
www.looklive.com@donnywals
Fastlane to the rescue
fastlane lets you define and run your deployment pipelines for different environments. It helps you unify your app’s release process and automate the whole process. fastlane connects all fastlane tools and
third party tools, like CocoaPods and Gradle.
www.looklive.com@donnywals
CocoaPods
Carthage
verify_xcode
clear_derived_data
xcodebuild
clean_build_artifacts
dsym_zip
splunkmintslather
increment_build_number
add_git_tag
push_to_git_remote
swiftlint
s3
deploygateproduce
git_commitensure_git_status_clean
www.looklive.com@donnywals
Feature-packed
• A range of built in actions (incrementing build numbers, pushing to git, tagging your repo, crashlytics and more)
• A lot of integrated tools (sigh, gym, scan, pilot and more)
www.looklive.com@donnywals
Initial goals for LookLive
Finalize codeHurry to write some tests
Run tests
Upload to Crashlytics
Update release notes
Upload to iTunes ConnectWait…
Update (localized) app info
Update (localized) screenshots
Submit buildWait for review…
Archive build
Update build numberUpdate release notes
www.looklive.com@donnywals
A LookLive deploy day..
Finalize codeHurry to write some tests
Wait
Submit buildWait for review
fastlane deliver
fastlane develop or fastlane beta
www.looklive.com@donnywals
The end resultIncrement
buildRun the
tests Build app Upload Crashlytics
Run the tests Build app Upload
CrashlyticsUpload
TestFlight
Upload Metadata
Develop
Beta
Deliver
www.looklive.com@donnywals
Ingredients• fastlane (install through gem install fastlane)
• scan (part of fastlane, used for testing)
• gym (part of fastlane, used for building)
• sigh (part of fastlane, used for downloading certificates)
• crashlytics (function in fastlane, uploads to Crashlytics beta)
• pilot (part of fastlane, uploads to iTunes Connect)
• deliver (part of fastlane, uploads metadata)
www.looklive.com@donnywals
Ingredients• fastlane (install through gem install fastlane)
• scan (part of fastlane, used for testing)
• gym (part of fastlane, used for building)
• sigh (part of fastlane, used for downloading certificates)
• crashlytics (function in fastlane, uploads to Crashlytics beta)
• pilot (part of fastlane, uploads to iTunes Connect)
• deliver (part of fastlane, uploads metadata)
www.looklive.com@donnywals
Ingredients• fastlane (install through gem install fastlane)
• scan (part of fastlane, used for testing)
• gym (part of fastlane, used for building)
• sigh (part of fastlane, used for downloading certificates)
• crashlytics (function in fastlane, uploads to Crashlytics beta)
• pilot (part of fastlane, uploads to iTunes Connect)
• deliver (part of fastlane, uploads metadata)
www.looklive.com@donnywals
Ingredients• fastlane (install through gem install fastlane)
• scan (part of fastlane, used for testing)
• gym (part of fastlane, used for building)
• sigh (part of fastlane, used for downloading certificates)
• crashlytics (function in fastlane, uploads to Crashlytics beta)
• pilot (part of fastlane, uploads to iTunes Connect)
• deliver (part of fastlane, uploads metadata)
www.looklive.com@donnywals
Ingredients• fastlane (install through gem install fastlane)
• scan (part of fastlane, used for testing)
• gym (part of fastlane, used for building)
• sigh (part of fastlane, used for downloading certificates)
• crashlytics (function in fastlane, uploads to Crashlytics beta)
• pilot (part of fastlane, uploads to iTunes Connect)
• deliver (part of fastlane, uploads metadata)
www.looklive.com@donnywals
Ingredients• fastlane (install through gem install fastlane)
• scan (part of fastlane, used for testing)
• gym (part of fastlane, used for building)
• sigh (part of fastlane, used for downloading certificates)
• crashlytics (function in fastlane, uploads to Crashlytics beta)
• pilot (part of fastlane, uploads to iTunes Connect)
• deliver (part of fastlane, uploads metadata)
www.looklive.com@donnywals
Ingredients• fastlane (install through gem install fastlane)
• scan (part of fastlane, used for testing)
• gym (part of fastlane, used for building)
• sigh (part of fastlane, used for downloading certificates)
• crashlytics (function in fastlane, uploads to Crashlytics beta)
• pilot (part of fastlane, uploads to iTunes Connect)
• deliver (part of fastlane, uploads metadata)
www.looklive.com@donnywals
The develop laneincrement_build_number commit_version_bump
sigh(development: true) scan(scheme: 'LookLive') gym(scheme: "LookLive")
crashlytics( crashlytics_path: ‘:path_to_crashlytics:’, groups: 'b2c-team', api_token: ':secret:', build_secret: ‘:secret:’, notes: File.read("release_notes") )
clean_build_artifacts add_git_tag push_to_git_remote
Because I always forget
Download certificates, test (UI and unit) and build
Send beta to Crashlytics for dev testing
Clean up, tag the repo and push to git
www.looklive.com@donnywals
Mind blowing awesomeness.
[sound of mind blowing up]
www.looklive.com@donnywals
The beta lanesigh scan(scheme: 'LookLive') gym(scheme: "LookLive")
pilot( skip_submission: true )
crashlytics( crashlytics_path: ‘:path_to_crashlytics:’, groups: ‘internal-testers‘, api_token: ':secret:', build_secret: ‘:secret:’, notes: File.read("release_notes") )
clean_build_artifacts
Download certificates, test (UI and unit) and build
Send beta to Testflight
Clean up
Send beta to Crashlytics for internal testing
www.looklive.com@donnywals
The deliver lanedeliver( force: true, skip_screenshots: true )
Uploads all the things
www.looklive.com@donnywals
Two more things…
error do |lane, exception| clean_build_artifacts end
andbefore_all do ensure_git_status_clean end
www.looklive.com@donnywals
Time saved: ± 15 minutes for a beta ± 30 minutes for metadata changes ± 4 hours for screenshot updates
www.looklive.com@donnywals
Next level
• Use snapshot to automate localised screenshots
• Run fastlane on a Jenkins slave
• Automate submitting for review
www.looklive.com@donnywals
And that’s how we brought deployment to the Fastlane
Check out the Fastfile at:
https://gist.github.com/donnywals/02da9957696111f99248