add gitea refs

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
Reviewed-on: https://<censored>/ahuston-0/hydra/pulls/1
This commit is contained in:
2025-03-31 04:07:10 -04:00
parent 0ba8126ccd
commit f47d78f32e
3 changed files with 161 additions and 2 deletions

View File

@@ -157,6 +157,12 @@ in
git -C /tmp/repo commit --allow-empty -m 'Additional change'
git -C /tmp/repo push origin pr
git -C /tmp/repo log >&2
# Create release branch
git -C /tmp/repo checkout -b release/release-1.0
git -C /tmp/repo commit --allow-empty -m 'Additional change'
git -C /tmp/repo push origin release/release-1.0
git -C /tmp/repo log >&2
'';
scripts.hydra-setup = pkgs.writeShellScript "hydra.sh" ''
@@ -211,6 +217,11 @@ in
"type": "giteapulls",
"value": "localhost:3001 root repo http",
"emailresponsible": false
},
"releases": {
"type": "gitea_refs",
"value": "localhost:3001 root repo heads http - release",
"emailresponseible": false
}
}
}
@@ -239,7 +250,7 @@ in
};
smallDrv = pkgs.writeText "jobset.nix" ''
{ pulls, ... }:
{ pulls, releases, ... }:
let
genDrv = name: builtins.derivation {
@@ -261,9 +272,19 @@ in
}
) prJobNames
);
rels = builtins.fromJSON (builtins.readFile releases);
relJobNames = builtins.attrNames rels;
relJobset = builtins.listToAttrs (
map (
name: {
inherit name;
value = genDrv name;
}
) relJobNames
);
in {
trivial = genDrv "trivial";
} // prJobset
} // prJobset // relJobset
'';
in
''