fceb3fef73
Change-Id: I8d251d3ee1de77feca865d0a677041c9c485d211 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5843 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
17 lines
518 B
Nix
17 lines
518 B
Nix
{ depot, lib, pkgs, ... }:
|
|
|
|
depot.nix.readTree.drvTargets rec {
|
|
# Provide a Terraform wrapper with the right provider installed.
|
|
terraform = pkgs.terraform.withPlugins (_: [
|
|
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
|
|
'';
|
|
}
|