2022-06-04 01:15:13 +02:00
|
|
|
{ depot, lib, pkgs, ... }:
|
2021-12-24 17:23:08 +01:00
|
|
|
|
2022-06-04 01:15:13 +02:00
|
|
|
depot.nix.readTree.drvTargets rec {
|
2021-12-24 17:23:08 +01:00
|
|
|
# Provide a Terraform wrapper with the right provider installed.
|
|
|
|
terraform = pkgs.terraform.withPlugins (_: [
|
|
|
|
depot.third_party.terraform-provider-glesys
|
|
|
|
]);
|
2022-06-04 01:15:13 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
2021-12-24 17:23:08 +01:00
|
|
|
}
|