Compare commits

..

4 commits

View file

@ -6,11 +6,9 @@
{
_class = "nixosTest";
name = "deployment-model";
name = "deployment-basic";
sourceFileset = lib.fileset.unions [
../../data-model.nix
../../function.nix
./constants.nix
./deployment.nix
];
@ -18,6 +16,7 @@
nodes.deployer =
{ pkgs, ... }:
{
# FIXME: sad times
system.extraDependencies = with pkgs; [
jq
@ -39,21 +38,8 @@
hello.fail("hello 1>&2")
cowsay.fail("cowsay 1>&2")
# SETTINGS.BIN_PATH
# CONFIG
env = {
"PATH": settings.bin_path,
# "TF_LOG": "info",
} | {
# pass in form info to our deployment
# FIXME: ensure sensitive info is protected
f"TF_VAR_{k}": v if isinstance(v, str) else json.dumps(v) for k, v in json.loads(config.model_dump_json()).items()
}
# USE ENV
# SETTINGS.REPO_DIR
with subtest("Run the deployment"):
deployer.succeed("cd ${settings.repo_dir}/infra/operator && tofu apply --auto-approve -lock=false -parallelism=1")
deployer.succeed("nixops4 apply check-deployment-basic --show-trace --no-interactive 1>&2")
with subtest("Check the deployment"):
hello.succeed("hello 1>&2")