refactor(ops/buildkite): Use tools.checks.validateTerraform
Remove some code duplication. Change-Id: I7ff49e728e1bd584bca3b84cdc033d93e60aefc2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5851 Tested-by: BuildkiteCI Reviewed-by: asmundo <asmundo@gmail.com>
This commit is contained in:
parent
e0c6198d58
commit
72f91f032b
1 changed files with 6 additions and 8 deletions
|
@ -5,12 +5,10 @@ depot.nix.readTree.drvTargets rec {
|
||||||
p.buildkite
|
p.buildkite
|
||||||
]);
|
]);
|
||||||
|
|
||||||
validate = pkgs.runCommand "tf-validate-buildkite"
|
validate = depot.tools.checks.validateTerraform {
|
||||||
{
|
inherit terraform;
|
||||||
BUILDKITE_API_TOKEN = "ci-dummy";
|
name = "buildkite";
|
||||||
} ''
|
src = lib.cleanSource ./.;
|
||||||
cp -r ${lib.cleanSource ./.}/* . && chmod -R u+w .
|
env.BUILDKITE_API_TOKEN = "ci-dummy";
|
||||||
${terraform}/bin/terraform init -upgrade -backend=false -input=false
|
};
|
||||||
${terraform}/bin/terraform validate | tee $out
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue