Skip to content

Commit 13a6bdc

Browse files
authored
chore(ci): once a week, clean the nix store for the kTLS job. (#5430)
1 parent c866921 commit 13a6bdc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

codebuild/spec/buildspec_ktls.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
version: 0.2
1616
# This is designed to work with CodeBuild's reserved instances fleet and
1717
# curated Ec2 AMI for AL2023.
18-
# TODO: Move to a NixOS AMI
18+
#
19+
# Because the Ec2 reserved instance disks persist between runs,
20+
# we need to do periodic clean up; The `nix store gc` command runs on Sunday to
21+
# prevent the disk from filling up.
1922
env:
2023
shell: bash
2124
variables:
@@ -39,6 +42,7 @@ phases:
3942
- export PATH=$HOME/.nix-profile/bin:$PATH
4043
# Turn on flakes
4144
- mkdir -p ~/.config/nix; echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
45+
- if [[ $(date +%u) -eq 0 ]]; then nix store gc;fi
4246
# Populate the store from the nix cache
4347
- nix copy --from $NIX_CACHE_BUCKET --all --no-check-sigs
4448
# Load the TLS kernel module

0 commit comments

Comments
 (0)