Skip to content
Snippets Groups Projects

ci: cache client bundle on server builds

Merged Warren Gifford requested to merge devx/server-galore into main

Created by: jhchabran

So @burmudar and I woke up this morning and we decided that the server image needed a 🧹.

Half the build time is spent building the client bundle. So we cached the client bundle :shrug:‍♂️.

It's done in a very crude way, but it works unless proven otherwise. It checksums the /ui, /client folders and ./package.json in order to build a cache key. It caches the entire /ui folder.

It effectively shaves off about 7~9 minutes on the server image build.

Test plan

  1. Build the server image on CI (cache miss)
  2. Build the server image on CI again (cache hit)
  3. Pull the docker image locally and run it
  4. Check that the assets are being served.

See https://buildkite.com/sourcegraph/sourcegraph/builds/161358#018211ad-d76c-40b7-b4c6-e37533ccd2d7 (18m) and https://buildkite.com/sourcegraph/sourcegraph/builds/161366#_ (8m)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading