2022-06-04 01:14:07 +02:00
|
|
|
{ depot, lib, pkgs, ... }:
|
2022-06-04 00:40:40 +02:00
|
|
|
|
2022-06-04 01:14:07 +02:00
|
|
|
depot.nix.readTree.drvTargets rec {
|
2022-06-04 00:40:40 +02:00
|
|
|
terraform = pkgs.terraform.withPlugins (p: [
|
|
|
|
p.buildkite
|
|
|
|
]);
|
2022-06-04 01:14:07 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
2022-06-04 00:40:40 +02:00
|
|
|
}
|