about summary refs log blame commit diff
path: root/ops/glesys/default.nix
blob: 80a86fec70c970d618837c8bf5aba8ae081d199a (plain) (tree)
1
2
3
4
5
6
7
                          
 
                                   
                                                                  
                                              

                                               








                                                                        
 
{ 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
  '';
}