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

From Chaos to Consistency - Managing Build and Release for 25+ Android Repos with Github Actions

From Chaos to Consistency - Managing Build and Release for 25+ Android Repos with Github Actions

Managing the build and release process for over 25 Android repositories can be a daunting task. With each repository having its own pipeline or workflow, it can become difficult to ensure consistency and quality across all the repositories. In this talk, we will share our experience of how we tackled this challenge at YML by using a centralized Github Actions approach.

We will discuss how we created reusable workflows that can be easily shared across all the repositories, reducing the need to maintain multiple pipelines. We will also cover the various checks that we execute for each repository, such as unit tests, integration tests, and code quality checks. These checks help us catch issues early and ensure we are always release-ready.

By using a centralized Github Actions approach, we have been able to streamline our build and release process, reduce the time and effort required to maintain multiple pipelines and ensure that our code quality remains consistent across all the repositories.

Shrikant Ballal

June 14, 2023
Tweet

More Decks by Shrikant Ballal

Other Decks in Programming

Transcript

  1. From Chaos to Consistency: Managing to Build and Release for

    25+ Android Repos with Github Actions
  2. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Let’s Begin: Architecture
  3. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Previous CI/CD Setup
  4. The Tech we used before for CI/CD Separate Jenkins pipeline

    for Android Shell app and for each library project 9 YML.co droidcon SF 2023 One AWS Mac OS agent for all repositories 🤯
  5. The Tech we used before for CI/CD 10 YML.co droidcon

    SF 2023 No mechanism to publish AAR files to internal maven/nexus repositories No App Distribution in place.
  6. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Challenges
  7. Challenges Across All Repositories 13 YML.co droidcon SF 2023 Difficulties

    in adopting new tools, practices and enforcing standards Inefficient troubleshooting and debugging of pipeline failures
  8. Challenges Across All Repositories 14 YML.co droidcon SF 2023 Lack

    of Centralised visibility and reporting Limited visibility into test coverage and code quality metrics
  9. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Enter Reusable Work fl ows
  10. Github Reusable Workflows To The Rescue 16 YML.co droidcon SF

    2023 What are Github Reusable Workflows?
  11. Benefits of GitHub Reusable workflows 17 YML.co droidcon SF 2023

    Ensures consistency Improves efficiency Simplifies maintenance
  12. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Work fl ow Con fi guration
  13. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Work fl ow Integration
  14. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Work fl ow Customisation
  15. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Work fl ow Design
  16. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Our Work fl ow Structure
  17. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Prepare
  18. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Build
  19. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Library Publish and Integration
  20. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Notify
  21. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core App Distribution
  22. App Distribution - Alternatives 50 YML.co droidcon SF 2023 Google

    Play Firebase Alpha/Beta track Rolling to production Staged rollouts Not prod distribution Crash reports App Center
  23. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Monitoring the work fl ow
  24. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Dependency Management
  25. Dependabot vs renovatebot 57 YML.co droidcon SF 2023 Dependabot is

    simple Renovate Bot more flexible (auto merge, batch update)
  26. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Bene fi ts and Results
  27. Our Observation 59 YML.co droidcon SF 2023 Increased consistency and

    reliability across all repositories Streamlined build and release processes Time savings due to automation and reuse
  28. 60 YML.co droidcon SF 2023 Total Repositories Developer Hours Spent

    before Work fl ows (per Sprint) Developer Hours Saved with Work fl ows (per Sprint) Android Library Repo (22 Total) 6 hours * 22 repos 2 hours * 22 repos Total 132 hours 44 hours
  29. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Reusable Work fl ow Limitations
  30. Limitations of Reusable Workflow 62 YML.co droidcon SF 2023 Environment

    variables set in the caller workflow are not passed to the called workflow. You can call a maximum of 20 reusable workflows, including nested workflows. You can chain up to four workflows.
  31. Healthcare Client app )Mobile, Wearables, Web) Library project built in

    a standalone Github repository. Home Appointments Dependency fl ows in a direction Checkin Facilities Live Video Consultations Health Activity Tracking Feature Libraries Secured Storage Design Kit (Reusable UI Components) Analytics Location Awareness Personalisation Capability Libraries Core Cost Metrics