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

Increasing iOS development productivity with automation

Increasing iOS development productivity with automation

Presentation slide for TechTalk iOS&AndroidエンジニアによるLT 〜 開発効率向上のための取り組み 〜
https://mercari.connpass.com/event/227800/

Reference Links on the last slide:

Automation/karakuri for increasing engineering productivity
https://engineering.mercari.com/en/blog/entry/2019-09-13-110000/

Building automated workflow using Slackbot and CircleCI
https://engineering.mercari.com/en/blog/entry/2020-06-25-154358/

メルペイiOSでのAppium活用事例
https://engineering.mercari.com/blog/entry/20210923-32355a8c7b/

Celia Yunjie Li

October 26, 2021
Tweet

Other Decks in Technology

Transcript

  1. 2 Self Introduction @celia PICTURE Picture which can be identified

    your face is preferable 顔がわかる写真が好ま しいです • Full Name : Li Yunjie (李 蘊潔) • Twitter : @ylisr • Joining Time : 2018/10/01 • Career : iOS Engineer 丁香園 ->アリペイ-> 面白法人カヤック -> Merpay • 最近はメルペイのeKYC(本人確認)、バーチャルカード等機能 開発のTech Leadをやっています。 • リリース、CI/CD、業務効率化の自動化等の改善が好きです。
  2. 3 Find What to Automate Example answers: -update dependency -merge

    to keep work branch updated -run tests -prepare for release Yes, mostly are done in command line Yes, automatable with fastlane, and it can be run on CI Some repetitive tasks can, and others happen on an as-needed basis
  3. 5 Background - Merpay and mercari’s iOS codebase is stored

    in different github repository - Merpay code exists in mercari app as a git submodule, and we use Carthage (an iOS dependency manager) to manage it - The Mercari app has recently updated its release cycle from bi-weekly to weekly. In each cycle a team member will be assigned to handle release related tasks
  4. 6 Examples of automated tasks Tasks happen on an as-needed

    basis are automated with a trigger (CI branch filter, pull request label, or bot command) and a circleCI pipeline. - Update merpay in mercari repository - Add a label in merpay side pull request to create a pull request in mercari side that checks out your branch, and deploy a test build - Useful for QA - Re-capture snapshots for snapshot test - Add `Capture Snapshots` label to create a pull request with updated snapshots - Useful when UI layout or text is changed - Capture screenshots - Call a bot command `capture screenshots` to run Appium on CI to generate screenshots and display on slack - Useful for UI Testing
  5. 7 Example of scheduled tasks Repetitive tasks that can be

    put on a schedule. These are set up as cron job on circleCI. - Nightly merge - Every night on weekdays, create a merge pull request to update the work branch - Nightly Build - Confirm the main branch is buildable and deploy a test app - Update dependency - Run command to update bundle dependency/Carthage and create a pull request if diff exists - Automatic swiftlint correction - Run lint and create a pull request if diff exists
  6. 9 Revolution of merpay iOS release Partially Manual Scheduled 3

    hours + 168 min 40 min 5 min Time spent (by release owner) Automated Manual Run one bot command Wait for 12 min for the pull request Wait for 30 min for CI to finish running tests Merge pull request when slack reminds you Stage 1 Stage 2 Stage 3 Stage 4
  7. 10 Automated Release - Slackbot built in GAE + golang,

    can parse simple incoming arguments, and make HTTP request to circleCI pipeline - Automated jobs running on circleCI that can perform release tasks in sequence, and make another request to mercari’s circleCI to update merpay
  8. 12 Scheduled Automatic Release Put the above workflow on circleCI

    cron, scheduled for every Tuesday: 
 
 
 One day before release branch cut: - Slack reminder about merge all pull request to be included in the next release by today -pass rotation of slack and github user group to next person in release duty rotation Release branch cut day: - Slack will remind release owner to check and merge the pull request for release - Merge the pull request
  9. 13 Conclusion - Find repetitive manual tasks and replace it

    with automation - Start small and increment - Better automation = happy engineers, fast delivery of quality products 
 
 

  10. 15 References Past blog posts: - Automation/karakuri for increasing engineering

    productivity - Building automated workflow using Slackbot and CircleCI - メルペイiOSでのAppium活用事例 by @hitsu