From a37f0eed21617fd914c84cca35761bad802a989d Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Tue, 14 Jun 2022 10:15:32 -0400 Subject: feat(grfn/home): Add function to purge a readyset deployment Change-Id: I9d0426fa4a38551f256dc5fe08a1a0115f7915fb Reviewed-on: https://cl.tvl.fyi/c/depot/+/5934 Tested-by: BuildkiteCI Reviewed-by: grfn Autosubmit: grfn --- users/grfn/system/home/modules/development/readyset.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/users/grfn/system/home/modules/development/readyset.nix b/users/grfn/system/home/modules/development/readyset.nix index 38792f9a7c44..e3e84a31afce 100644 --- a/users/grfn/system/home/modules/development/readyset.nix +++ b/users/grfn/system/home/modules/development/readyset.nix @@ -35,4 +35,8 @@ "public.ecr.aws" = "ecr-login"; }; }; + + programs.zsh.functions."purge_deployment" = '' + for key in $(http :8500/v1/kv/$1 keys==true | jq -r .'[]'); do http DELETE ":8500/v1/kv/$key"; done + ''; } -- cgit 1.4.1