How We Cut Frontend Build Time by Over 50% Using Automated CI and Docker Caching
By migrating all Dada front‑end projects to an automated CI build platform, introducing Docker volume caching and internal npm mirrors, we eliminated manual steps, reduced build time by more than half, and saved roughly 40 hours of developer time each month.
In the past six months, we migrated all Dada front‑end projects to an automated build platform, eliminating inefficient and unsafe manual operations and reducing error risk during task switching.
Background: Traditional local builds required pulling code, installing dependencies, packaging, uploading assets, and modifying online configurations, leading to complex, error‑prone, time‑consuming, and insecure processes.
Automated Build Principle: The new workflow pulls code from the repository, resolves dependencies, builds, and uploads assets automatically without manual version bumps or secret key handling, decoupling the process from git operations and backend configuration centers.
Speed Improvement: After integrating CI, we identified dependency installation as a bottleneck. By using Docker data volumes for persistent node_modules and global Yarn caches, and by setting up an internal npm registry, we dramatically reduced install time.
docker run -v [server_directory/persistent]/node_modules:[container_directory/node_modules]We also employed project‑level caches, shared global caches across projects, and an internal npm server to avoid slow foreign npm downloads.
From July to December 2019, the average front‑end build time dropped from 4 min 45 s to 1 min 56 s, a reduction of over 50%, saving about 2 min 50 s per build and keeping average build times under 2 minutes.
Between October and November last year, 45 active projects performed 1,607 builds, saving a total of 78.7 hours, equivalent to roughly 40 hours per month.
Outlook and Thanks: We plan to extend CI automation to unconventional projects such as WeChat mini‑programs and explore containerized front‑end solutions for parallel development. Special thanks to the Quality Assurance and Logistics Operations teams for their support and insights.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Dada Group Technology
Sharing insights and experiences from Dada Group's R&D department on product refinement and technology advancement, connecting with fellow geeks to exchange ideas and grow together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
