From 92a6e2538028987d589a22d1242ae8a4e4cfafe9 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 6 Jun 2022 21:28:11 +0000 Subject: refactor(ops/glesys): Use tools.checks.validateTerraform Remove some code duplication. Change-Id: Ia9e0b3b22926eb9e72f302e2c1ebcee68eaa1db9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5852 Tested-by: BuildkiteCI Reviewed-by: asmundo --- ops/glesys/default.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'ops') diff --git a/ops/glesys/default.nix b/ops/glesys/default.nix index 80a86fec70c9..e511e1f6b686 100644 --- a/ops/glesys/default.nix +++ b/ops/glesys/default.nix @@ -6,12 +6,10 @@ depot.nix.readTree.drvTargets rec { depot.third_party.terraform-provider-glesys ]); - validate = pkgs.runCommand "tf-validate-glesys" - { - GLESYS_TOKEN = "ci-dummy"; - } '' - cp -r ${lib.cleanSource ./.}/* . && chmod -R u+w . - ${terraform}/bin/terraform init -upgrade -backend=false -input=false - ${terraform}/bin/terraform validate | tee $out - ''; + validate = depot.tools.checks.validateTerraform { + inherit terraform; + name = "glesys"; + src = lib.cleanSource ./.; + env.GLESYS_TOKEN = "ci-dummy"; + }; } -- cgit 1.4.1