Update Hydra jobs

This commit is contained in:
Yannik Rödel 2022-03-02 12:32:21 +01:00
parent 23b3349de3
commit 1a1442324f

View file

@ -32,23 +32,10 @@
mv dist $out mv dist $out
''; '';
}; };
container = pkgs.dockerTools.buildImage {
name = "angestoepselt-site";
tag = "latest";
config = {
Cmd = [
"${pkgs.caddy}/bin/caddy"
"file-server"
"-root" "${site}"
];
};
};
in in
rec { rec {
packages = { packages = {
inherit site container; inherit site;
# This package isn't actually the fully-built site, but rather a # This package isn't actually the fully-built site, but rather a
# derivation that contains the relevant programs (with correctly set up # derivation that contains the relevant programs (with correctly set up
@ -90,7 +77,25 @@
devShell = packages.devEnv; devShell = packages.devEnv;
hydraJobs = { hydraJobs = {
container = packages.container; inherit site;
container = { site }: let
container = pkgs.dockerTools.buildImage {
name = "angestoepselt-site-container";
tag = "latest";
config = {
Cmd = [
"${pkgs.caddy}/bin/caddy"
"file-server"
"-root" "${site}"
];
};
};
in pkgs.runCommand "container" {} ''
mkdir -p $out/nix-support
echo "file none ${container}" > $out/nix-support/hydra-build-products
'';
}; };
}); });
in (base // { in (base // {