Loading .hydra/declarative-jobsets.nix 0 → 100644 +57 −0 Original line number Diff line number Diff line # Mostly copied from https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/blob/master/.hydra/declarative-jobsets.nix?ref_type=heads { nixpkgs, pulls, ... }: 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}"; checkinterval = 60; schedulingshares = 20; enableemail = false; emailoverride = ""; keepnr = 2; type = 1; flake = "gitlab:marius851000/fediverse-canvas-atlas-2024/merge-requests/${info.iid}/head?host=git.sc07.company"; } ) prs; /*mkFlakeJobset = branch: { description = "Build ${branch} branch of Simple NixOS MailServer"; checkinterval = "60"; enabled = "1"; schedulingshares = 100; enableemail = false; emailoverride = ""; keepnr = 3; hidden = false; type = 1; flake = "gitlab:simple-nixos-mailserver/nixos-mailserver/${branch}"; };*/ desc = prJobsets/* // { "master" = mkFlakeJobset "master"; "nixos-23.11" = mkFlakeJobset "nixos-23.11"; "nixos-24.05" = mkFlakeJobset "nixos-24.05"; }*/; log = { pulls = prs; jobsets = desc; }; in { jobsets = pkgs.runCommand "spec-jobsets.json" {} '' cat >$out <<EOF ${builtins.toJSON desc} EOF # This is to get nice .jobsets build logs on Hydra cat >tmp <<EOF ${builtins.toJSON log} EOF ${pkgs.jq}/bin/jq . tmp ''; } .hydra/spec.json 0 → 100644 +31 −0 Original line number Diff line number Diff line { "enabled": 1, "hidden": false, "description": "Fediverse Canvas Atlas 2024", "nixexprinput": "nixexpr", "nixexprpath": ".hydra/declarative-jobsets.nix", "checkinterval": 60, "schedulingshares": 100, "enableemail": false, "emailoverride": "", "keepnr": 10, "type": 0, "inputs": { "nixexpr": { "value": "https://git.sc07.company/marius851000/fediverse-canvas-atlas-2024.git main", "type": "git", "emailresponsible": false }, "nixpkgs": { "value": "https://github.com/NixOS/nixpkgs 0f920b05cbcdb8c0f3c5c4a8ea29f1f0065c7033 ", "type": "git", "emailresponsible": false }, "pulls": { "type": "gitlabpulls", "value": "https://git.sc07.company 16", "emailresponsible": false } } } No newline at end of file flake.nix +27 −19 Original line number Diff line number Diff line Loading @@ -2,7 +2,9 @@ inputs = { utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system: outputs = { self, nixpkgs, utils }: let result = utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; in Loading @@ -25,4 +27,10 @@ }; } ); in result // { hydraJobs.x86_64-linux = { website = result.packages.x86_64-linux.website; }; }; } No newline at end of file Loading
.hydra/declarative-jobsets.nix 0 → 100644 +57 −0 Original line number Diff line number Diff line # Mostly copied from https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/blob/master/.hydra/declarative-jobsets.nix?ref_type=heads { nixpkgs, pulls, ... }: 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}"; checkinterval = 60; schedulingshares = 20; enableemail = false; emailoverride = ""; keepnr = 2; type = 1; flake = "gitlab:marius851000/fediverse-canvas-atlas-2024/merge-requests/${info.iid}/head?host=git.sc07.company"; } ) prs; /*mkFlakeJobset = branch: { description = "Build ${branch} branch of Simple NixOS MailServer"; checkinterval = "60"; enabled = "1"; schedulingshares = 100; enableemail = false; emailoverride = ""; keepnr = 3; hidden = false; type = 1; flake = "gitlab:simple-nixos-mailserver/nixos-mailserver/${branch}"; };*/ desc = prJobsets/* // { "master" = mkFlakeJobset "master"; "nixos-23.11" = mkFlakeJobset "nixos-23.11"; "nixos-24.05" = mkFlakeJobset "nixos-24.05"; }*/; log = { pulls = prs; jobsets = desc; }; in { jobsets = pkgs.runCommand "spec-jobsets.json" {} '' cat >$out <<EOF ${builtins.toJSON desc} EOF # This is to get nice .jobsets build logs on Hydra cat >tmp <<EOF ${builtins.toJSON log} EOF ${pkgs.jq}/bin/jq . tmp ''; }
.hydra/spec.json 0 → 100644 +31 −0 Original line number Diff line number Diff line { "enabled": 1, "hidden": false, "description": "Fediverse Canvas Atlas 2024", "nixexprinput": "nixexpr", "nixexprpath": ".hydra/declarative-jobsets.nix", "checkinterval": 60, "schedulingshares": 100, "enableemail": false, "emailoverride": "", "keepnr": 10, "type": 0, "inputs": { "nixexpr": { "value": "https://git.sc07.company/marius851000/fediverse-canvas-atlas-2024.git main", "type": "git", "emailresponsible": false }, "nixpkgs": { "value": "https://github.com/NixOS/nixpkgs 0f920b05cbcdb8c0f3c5c4a8ea29f1f0065c7033 ", "type": "git", "emailresponsible": false }, "pulls": { "type": "gitlabpulls", "value": "https://git.sc07.company 16", "emailresponsible": false } } } No newline at end of file
flake.nix +27 −19 Original line number Diff line number Diff line Loading @@ -2,7 +2,9 @@ inputs = { utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system: outputs = { self, nixpkgs, utils }: let result = utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; in Loading @@ -25,4 +27,10 @@ }; } ); in result // { hydraJobs.x86_64-linux = { website = result.packages.x86_64-linux.website; }; }; } No newline at end of file