Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
4ef3ad467d
ensure path availability in deployments
Some checks failed
/ check-pre-commit (pull_request) Failing after 14s
/ check-data-model (pull_request) Successful in 32s
/ check-mastodon (pull_request) Successful in 22s
/ check-peertube (pull_request) Successful in 22s
/ check-panel (pull_request) Successful in 1m32s
/ check-proxmox-basic (pull_request) Successful in 36s
/ check-deployment-basic (pull_request) Successful in 33s
/ check-deployment-cli (pull_request) Successful in 43s
/ check-deployment-panel (pull_request) Successful in 1m48s
/ check-deployment-model (pull_request) Successful in 2m55s
/ check-deployment-model-ssh (pull_request) Successful in 10s
/ check-deployment-model-nixops4 (pull_request) Successful in 11m54s
/ check-deployment-model-tf (pull_request) Successful in 3m16s
/ check-resources (pull_request) Successful in 4m10s
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-09-03 17:14:38 +02:00
3 changed files with 39 additions and 18 deletions

View file

@ -39,10 +39,9 @@ in
]; ];
nodes.deployer = nodes.deployer =
{ pkgs, ... }: { ... }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = [
jq
deploy deploy
]; ];

View file

@ -31,11 +31,9 @@ in
]; ];
nodes.deployer = nodes.deployer =
{ pkgs, ... }: { ... }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = [
(pkgs.callPackage ../../run/tf-single-host/tf.nix { })
jq
deploy deploy
]; ];
@ -50,10 +48,10 @@ in
}; };
extraTestScript = '' extraTestScript = ''
with subtest("ssh: Check the status before deployment"): with subtest("Check the status before deployment"):
target.fail("hello 1>&2") target.fail("hello 1>&2")
with subtest("ssh: Run the deployment"): with subtest("Run the deployment"):
deployer.succeed(""" deployer.succeed("""
${lib.getExe deploy} ${lib.getExe deploy}
""") """)

View file

@ -3,6 +3,7 @@
config, config,
inputs, inputs,
pkgs, pkgs,
sources ? import ../npins,
... ...
}: }:
let let
@ -146,11 +147,22 @@ let
deployment_type = "ssh-host"; deployment_type = "ssh-host";
}; };
in in
pkgs.writeShellScriptBin "deploy-ssh.sh" '' pkgs.writers.writeBashBin "deploy-sh.sh"
env ${ {
toString (lib.mapAttrsToList (k: v: "${k}=\"${toBash v}\"") environment) makeWrapperArgs = [
} bash ./deployment/run/ssh-single-host/run.sh "--prefix"
''; "PATH"
":"
"${lib.makeBinPath [
pkgs.jq
]}"
];
}
''
env ${
toString (lib.mapAttrsToList (k: v: "${k}=\"${toBash v}\"") environment)
} bash ./deployment/run/ssh-single-host/run.sh
'';
}; };
}; };
}); });
@ -221,10 +233,22 @@ let
}; };
tf-env = pkgs.callPackage ./run/tf-single-host/tf-env.nix { }; tf-env = pkgs.callPackage ./run/tf-single-host/tf-env.nix { };
in in
pkgs.writeShellScriptBin "deploy-ssh.sh" '' pkgs.writers.writeBashBin "deploy-tf.sh"
env ${toString (lib.mapAttrsToList (k: v: "TF_VAR_${k}=\"${toBash v}\"") environment)} \ {
tf_env=${tf-env} bash ./deployment/run/tf-single-host/run.sh makeWrapperArgs = [
''; "--prefix"
"PATH"
":"
"${lib.makeBinPath [
pkgs.jq
(pkgs.callPackage ./run/tf-single-host/tf.nix { inherit sources; })
]}"
];
}
''
env ${toString (lib.mapAttrsToList (k: v: "TF_VAR_${k}=\"${toBash v}\"") environment)} \
tf_env=${tf-env} bash ./deployment/run/tf-single-host/run.sh
'';
}; };
}; };
}); });