switch to the attic queue
This commit is contained in:
parent
1d554127b4
commit
b883cb7854
2 changed files with 14 additions and 25 deletions
|
@ -4,6 +4,7 @@
|
|||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
hydra,
|
||||
...
|
||||
}: let
|
||||
machines = pkgs.writeText "machines" ''
|
||||
|
@ -55,7 +56,10 @@ in {
|
|||
];
|
||||
services.hydra = {
|
||||
enable = true;
|
||||
package = pkgs.hydra-unstable;
|
||||
package = hydra.packages.${system}.hydra.overrideAttrs (_: {
|
||||
doCheck = false;
|
||||
doInstallCheck = false;
|
||||
});
|
||||
hydraURL = "https://hydra.chir.rs/";
|
||||
notificationSender = "hydra@chir.rs";
|
||||
useSubstitutes = true;
|
||||
|
@ -82,7 +86,7 @@ in {
|
|||
</git-input>
|
||||
<runcommand>
|
||||
job = *:*:*
|
||||
command = cat $HYDRA_JSON | ${pkgs.jq}/bin/jq -r '.drvPath' | xargs ${pkgs.nix}/bin/nix-store -q -R --include-outputs >> /var/lib/hydra/queue-runner/upload-queue
|
||||
command = cat $HYDRA_JSON | ${pkgs.jq}/bin/jq -r '.drvPath' | xargs ${pkgs.nix}/bin/nix-store -q -R --include-outputs >> /var/lib/hydra/queue-runner/upload
|
||||
</runcommand>
|
||||
max_concurrent_evals = 1
|
||||
'';
|
||||
|
@ -157,32 +161,17 @@ in {
|
|||
path = "/var/lib/hydra/queue-runner/.config/attic/config.toml";
|
||||
};
|
||||
|
||||
systemd.services."upload-hydra-results" = {
|
||||
description = "Upload hydra build results";
|
||||
systemd.services."attic-queue" = {
|
||||
description = "Upload build results";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "hydra-queue-runner";
|
||||
Group = "hydra";
|
||||
};
|
||||
script = ''
|
||||
set -ex
|
||||
if [ -e /var/lib/hydra/queue-runner/uploading ]; then
|
||||
cat /var/lib/hydra/queue-runner/uploading | xargs ${attic.packages.${system}.attic-client}/bin/attic push chir-rs
|
||||
rm /var/lib/hydra/queue-runner/uploading
|
||||
fi
|
||||
mv /var/lib/hydra/queue-runner/upload-queue /var/lib/hydra/queue-runner/uploading
|
||||
cat /var/lib/hydra/queue-runner/uploading | xargs ${attic.packages.${system}.attic-client}/bin/attic push chir-rs
|
||||
rm /var/lib/hydra/queue-runner/uploading
|
||||
export QUEUE_PATH=/var/lib/hydra/queue-runner/upload
|
||||
export SLED_PATH=/var/lib/hydra/queue-runner/queue-db
|
||||
exec ${attic.packages.${system}.attic-queue}/bin/attic-queue
|
||||
'';
|
||||
};
|
||||
systemd.timers.upload-hydra-results = {
|
||||
enable = true;
|
||||
description = "Upload hydra build results";
|
||||
requires = ["upload-hydra-results.service"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
timerConfig = {
|
||||
OnBootSec = 300;
|
||||
OnUnitActiveSec = 300;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -100,11 +100,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694160842,
|
||||
"narHash": "sha256-KqzSSagAay+qBhXlDGHc05dpio9PZ/ZFVmQcuJum/qU=",
|
||||
"lastModified": 1702996488,
|
||||
"narHash": "sha256-On/T5jRCumZNopbqvgljjIIvqR20dk/V/DRB9iA3l6c=",
|
||||
"owner": "DarkKirb",
|
||||
"repo": "attic",
|
||||
"rev": "9460d742caf366a1f999936dacd4d6e9274d956b",
|
||||
"rev": "a55ea52aa46ac0b0c1bd4e1148cd3c5369aac06d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
Loading…
Reference in a new issue