2021-05-27 23:03:20 +02:00
|
|
|
{ nixpkgs, pulls, ... }:
|
2020-04-18 01:03:15 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs {};
|
|
|
|
|
|
|
|
prs = builtins.fromJSON (builtins.readFile pulls);
|
|
|
|
prJobsets = pkgs.lib.mapAttrs (num: info:
|
|
|
|
{ enabled = 1;
|
|
|
|
hidden = false;
|
|
|
|
description = "PR ${num}: ${info.title}";
|
|
|
|
nixexprinput = "snm";
|
|
|
|
nixexprpath = ".hydra/default.nix";
|
|
|
|
checkinterval = 30;
|
|
|
|
schedulingshares = 20;
|
|
|
|
enableemail = false;
|
|
|
|
emailoverride = "";
|
|
|
|
keepnr = 1;
|
|
|
|
type = 0;
|
|
|
|
inputs = {
|
2021-05-31 09:53:52 +02:00
|
|
|
# This is only used to allow Niv to use pkgs.fetchzip which is
|
|
|
|
# required because of Hydra restricted evaluation mode.
|
|
|
|
nixpkgs = {
|
|
|
|
value = "https://github.com/NixOS/nixpkgs b6eefa48d8e10491e43c0c6155ac12b463f6fed3";
|
|
|
|
type = "git";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
2020-04-19 14:59:01 +02:00
|
|
|
snm = {
|
2020-04-18 01:03:15 +02:00
|
|
|
type = "git";
|
|
|
|
value = "${info.target_repo_url} merge-requests/${info.iid}/head";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
) prs;
|
|
|
|
|
|
|
|
desc = prJobsets // {
|
|
|
|
master = {
|
|
|
|
description = "Build master branch of Simple NixOS MailServer";
|
|
|
|
checkinterval = "60";
|
|
|
|
enabled = "1";
|
|
|
|
nixexprinput = "snm";
|
|
|
|
nixexprpath = ".hydra/default.nix";
|
|
|
|
schedulingshares = 100;
|
|
|
|
enableemail = false;
|
|
|
|
emailoverride = "";
|
|
|
|
keepnr = 3;
|
|
|
|
hidden = false;
|
|
|
|
type = 0;
|
|
|
|
inputs = {
|
2021-05-31 09:53:52 +02:00
|
|
|
# This is only used to allow Niv to use pkgs.fetchzip which is
|
|
|
|
# required because of Hydra restricted evaluation mode.
|
|
|
|
nixpkgs = {
|
|
|
|
value = "https://github.com/NixOS/nixpkgs b6eefa48d8e10491e43c0c6155ac12b463f6fed3";
|
|
|
|
type = "git";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
2020-04-18 01:03:15 +02:00
|
|
|
snm = {
|
|
|
|
value = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver master";
|
|
|
|
type = "git";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2020-05-22 15:02:06 +02:00
|
|
|
"nixos-20.03" = {
|
|
|
|
description = "Build the nixos-20.03 branch of Simple NixOS MailServer";
|
|
|
|
checkinterval = "60";
|
|
|
|
enabled = "1";
|
|
|
|
nixexprinput = "snm";
|
|
|
|
nixexprpath = ".hydra/default.nix";
|
|
|
|
schedulingshares = 100;
|
|
|
|
enableemail = false;
|
|
|
|
emailoverride = "";
|
|
|
|
keepnr = 3;
|
|
|
|
hidden = false;
|
|
|
|
type = 0;
|
|
|
|
inputs = {
|
|
|
|
snm = {
|
|
|
|
value = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver nixos-20.03";
|
|
|
|
type = "git";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2020-11-20 09:11:38 +01:00
|
|
|
"nixos-20.09" = {
|
|
|
|
description = "Build the nixos-20.09 branch of Simple NixOS MailServer";
|
2020-05-05 21:03:10 +02:00
|
|
|
checkinterval = "60";
|
|
|
|
enabled = "1";
|
|
|
|
nixexprinput = "snm";
|
|
|
|
nixexprpath = ".hydra/default.nix";
|
|
|
|
schedulingshares = 100;
|
|
|
|
enableemail = false;
|
|
|
|
emailoverride = "";
|
|
|
|
keepnr = 3;
|
|
|
|
hidden = false;
|
|
|
|
type = 0;
|
|
|
|
inputs = {
|
2021-05-31 09:53:52 +02:00
|
|
|
# This is only used to allow Niv to use pkgs.fetchzip which is
|
|
|
|
# required because of Hydra restricted evaluation mode.
|
|
|
|
nixpkgs = {
|
|
|
|
value = "https://github.com/NixOS/nixpkgs b6eefa48d8e10491e43c0c6155ac12b463f6fed3";
|
|
|
|
type = "git";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
2020-05-05 21:03:10 +02:00
|
|
|
snm = {
|
2020-11-20 09:11:38 +01:00
|
|
|
value = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver nixos-20.09";
|
2020-05-05 21:03:10 +02:00
|
|
|
type = "git";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2020-04-18 01:03:15 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
in {
|
|
|
|
jobsets = pkgs.runCommand "spec-jobsets.json" {} ''
|
|
|
|
cat >$out <<EOF
|
|
|
|
${builtins.toJSON desc}
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
}
|