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

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.

John Estropia

March 28, 2019
Tweet

More Decks by John Estropia

Other Decks in Technology

Transcript

  1. @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. AGENDA ➤ Why we needed a deploy bot in Pairs

    JP ➤ Meet our deploy bot ➤ Future features
  3. 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. PROBLEM 2: WAITING FOR BUILD SCRIPTS ➤ Solution: ➤ Continuous

    Integration / Delivery ➤ We currently use ➤ Work on something else while CI/CD runs
  5. OUR WEEKLY DEPLOYMENT SCHEDULE Mon Tue Wed Thur Fri Sat

    Sun Code Freeze QA Test AppStore Submission
  6. OUR WEEKLY DEPLOYMENT SCHEDULE Mon Tue Wed Thur Fri Sat

    Sun Code Freeze QA Test AppStore Submission
  7. OUR WEEKLY DEPLOYMENT SCHEDULE Mon Tue Wed Thur Fri Sat

    Sun AppStore Release Code Freeze QA Test AppStore Submission
  8. OUR WEEKLY DEPLOYMENT SCHEDULE Mon Tue Wed Thur Fri Sat

    Sun AppStore Release Code Freeze QA Test AppStore Submission
  9. 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. @PORYGON: SLACKBOT ➤ Written in Swift! ➤ Runs on a

    dedicated local iMac ➤ Own file system ➤ Own keys/accounts ➤ Own integrations
  11. @Z: FASTER BRANCH-SWITCHING/CHECKOUTS ➤ Using git worktrees ➤ Load all

    repositories on initial execution only ➤ fetch+worktree magic on branch change
  12. @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
  13. @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
  14. 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