diff options
Diffstat (limited to 'ops/buildkite/default.nix')
-rw-r--r-- | ops/buildkite/default.nix | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ops/buildkite/default.nix b/ops/buildkite/default.nix index f085bc6d9780..46c20e4a5f93 100644 --- a/ops/buildkite/default.nix +++ b/ops/buildkite/default.nix @@ -1,7 +1,16 @@ -{ depot, pkgs, ... }: +{ depot, lib, pkgs, ... }: -depot.nix.readTree.drvTargets { +depot.nix.readTree.drvTargets rec { terraform = pkgs.terraform.withPlugins (p: [ p.buildkite ]); + + validate = pkgs.runCommand "tf-validate-buildkite" + { + BUILDKITE_API_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 + ''; } |