Making an Efficient Deploy Bot

Making an Efficient Deploy Bot

These are the slides for my presentation at "Build Eureka.swift × Bitrise"
Event page: https://eure.connpass.com/event/121871/

Note: This topic is an update to my previous presentations at other meetups. We are continuously improving our deployment builds and trying out different tools and services.

06aad43b39f220d9e92cef95745e706d?s=128

John Estropia

March 28, 2019
Tweet

Transcript

  1. 2.

    @JOHNESTROPIA ➤ Senior Engineer @ ➤ ➤ ! ➤ Dev

    since 2008 (mostly mobile apps) ➤ iAppli, BREW, Windows CE/Mobile ➤ iOS 4.0~ (Swift beta~) ➤ http://github.com/JohnEstropia/CoreStore
  2. 3.

    AGENDA ➤ Why we needed a deploy bot in Pairs

    JP ➤ Meet our deploy bot ➤ Future features
  3. 11.

    PROBLEM 2: WAITING FOR BUILD SCRIPTS ➤ Pairs JP project:

    • *.swift: 130,000~ lines of code • *.m: 8,000~ lines of code • Dependencies: • Pods: 50~ frameworks • Carthage: 20~ frameworks ➤ Build Time: • Debug: 5~ minutes (+ preparation + upload time) • Release: 15~ minutes (+ preparation + upload time)
  4. 13.

    PROBLEM 2: WAITING FOR BUILD SCRIPTS ➤ Solution: ➤ Continuous

    Integration / Delivery ➤ We currently use ➤ Work on something else while CI/CD runs
  5. 17.

    OUR WEEKLY DEPLOYMENT SCHEDULE Mon Tue Wed Thur Fri Sat

    Sun Code Freeze QA Test AppStore Submission
  6. 18.

    OUR WEEKLY DEPLOYMENT SCHEDULE Mon Tue Wed Thur Fri Sat

    Sun Code Freeze QA Test AppStore Submission
  7. 19.

    OUR WEEKLY DEPLOYMENT SCHEDULE Mon Tue Wed Thur Fri Sat

    Sun AppStore Release Code Freeze QA Test AppStore Submission
  8. 20.

    OUR WEEKLY DEPLOYMENT SCHEDULE Mon Tue Wed Thur Fri Sat

    Sun AppStore Release Code Freeze QA Test AppStore Submission
  9. 21.

    OUR WEEKLY DEPLOYMENT SCHEDULE ➤ Wednesdays: Code-freeze ➤ Finish new

    features for next version ➤ Deploy testing binary (for QA) ➤ Fridays: AppStore Submission ➤ Finish hotfixes for those features ➤ Deploy production binary (for AppStore review) ➤ Delays = overtime / reschedule update ➤ Monday ~ Friday: Anyone can deploy their own testing binary
  10. 25.

    @PORYGON: SLACKBOT ➤ Written in Swift! ➤ Runs on a

    dedicated local iMac ➤ Own file system ➤ Own keys/accounts ➤ Own integrations
  11. 41.

    @Z: FASTER BRANCH-SWITCHING/CHECKOUTS ➤ Using git worktrees ➤ Load all

    repositories on initial execution only ➤ fetch+worktree magic on branch change
  12. 42.
  13. 44.

    @Z: THREADING MICRO-MANAGEMENT ➤ fastlane scripts are broken down by

    relevant queues ➤ Run unrelated tasks in parallel ➤ No need to wait for whole deploy scripts before running the next
  14. 47.

    @Z: OTHER FEATURES ➤ Self-updating ➤ Type-safe Swift config file

    ➤ User permissions (by Slack user ID, workgroup) ➤ Team-specific features ➤ Example: generating QR codes for testing universal deeplinks
  15. 48.

    WRAP-UP ➤ We’re designing our build process to balance speed

    & convenience ➤ WIP ➤ Exploring Bitrise workflows to optimize micro-tasks ➤ Optimize our dedicated bot to fill in the gaps ➤ super-customizations ➤ Also hoping Bitrise would fill in some of those gaps