summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Eiche <lewo@abesis.fr>2021-06-06 09:52:00 +0200
committerAntoine Eiche <lewo@abesis.fr>2021-06-06 10:20:14 +0200
commit92a09398964f773d313d9e2a0e02a71ef5811fab (patch)
tree10ae4a979b34e37c2dedba839a2fd258658aed41
parentbbcc6863b549b5e0348d826544c52d035d26acf4 (diff)
ci: simplify declarative-jobsets.nix
-rw-r--r--.hydra/declarative-jobsets.nix109
1 files changed, 29 insertions, 80 deletions
diff --git a/.hydra/declarative-jobsets.nix b/.hydra/declarative-jobsets.nix
index 43c9fa8..7d36ea6 100644
--- a/.hydra/declarative-jobsets.nix
+++ b/.hydra/declarative-jobsets.nix
@@ -32,89 +32,38 @@ let
};
}
) 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 = {
- # 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;
- };
- snm = {
- value = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver master";
- type = "git";
- emailresponsible = false;
- };
+ mkJobset = branch: {
+ description = "Build ${branch} 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 = {
+ # 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;
};
- };
- "nixos-20.09" = {
- description = "Build the nixos-20.09 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 = {
- # 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;
- };
- snm = {
- value = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver nixos-20.09";
- type = "git";
- emailresponsible = false;
- };
- };
- };
- "nixos-21.05" = {
- description = "Build the nixos-21.05 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 = {
- # 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;
- };
- snm = {
- value = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver master";
- type = "git";
- emailresponsible = false;
- };
+ snm = {
+ value = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver ${branch}";
+ type = "git";
+ emailresponsible = false;
};
};
+ };
+
+ desc = prJobsets // {
+ "master" = mkJobset "master";
+ "nixos-20.09" = mkJobset "nixos-20.09";
+ "nixos-21.05" = mkJobset "nixos-21.05";
};
in {