featurebase/.gitlab
Garrison Davis cf5a8c8382 Cache lattice in CI
The `build lattice` job is a source of frustration because it is a
dependency for building additional jobs in CI, has a wildly varying
runtime--anywhere from 2-7 minutes to finish--and doing a yarn install
&& yarn build is the most CPU/memory hungry part of our CI pipeline.

To address this, I'm hashing the lattice directory, and using the hash
to look for an artifact in S3 which can be downloaded instead of
building the web ui from scratch each commit.

This cache happy path (cached file exists in S3) cuts the time of this
job down to somewhere below 2 minutes even with many concurrent jobs and
pipelines running.

This also gives us the ability to pull built versions of lattice
associated with the commits that produced them, because each new file in
S3 also gets a zero-byte file with the long name of the git revision
(e.g., a zero-byte file called
`924a152ae92372a178bd0fc32b411612b995a6a1` will be stored in S3 so it is
possible to know which commit changed the lattice directory.)

Invalidating this build cache is as simple as deleting a specific key
(or all keys) at s3://molecula-artifact-storage/lattice/<hash> (or
s3://molecula-artifact-storage/lattice/*).
2022-11-18 12:55:17 -06:00
..
.gitlab-ci.yml Cache lattice in CI 2022-11-18 12:55:17 -06:00
.perf-able-gitlab-ci.yml drop PLG builds and related functionality, streamline phases 2022-10-14 09:49:19 -05:00
batch-ci.yml stop uploading test results to sonarcloud, stop telling it we did 2022-11-16 15:31:06 -06:00
Dockerfile fix broken dockerfile 2022-01-27 10:55:20 -06:00