This commit is contained in:
2026-10-23 18:16:37 -04:00
parent 9a72bb38cb
commit 3f2f448c03
3 changed files with 109 additions and 120 deletions
+10 -11
View File
@@ -77,9 +77,9 @@
pigeon = pkgs.writeShellApplication {
name = "pigeon";
runtimeInputs = with pkgs; [ coreutils curl e2fsprogs firecracker gcc git gnumake ];
runtimeInputs = with pkgs; [ coreutils curl diffutils e2fsprogs firecracker git jq sqlite ];
text = builtins.replaceStrings
[ "@kernel@" "@rootfs@" ] [ "${kernel}" "${rootfs}"]
[ "@kernel@" "@rootfs@" "@toolchain@" ] [ "${kernel}" "${rootfs}" "${toolchain}" ]
(builtins.readFile ./pigeon.sh);
};
@@ -92,8 +92,7 @@
pass-arguments-to-command = [
{ source = "string"; name = "${pigeon}/bin/pigeon"; }
{ source = "payload"; name = "project.id"; }
{ source = "payload"; name = "project.namespace"; }
{ source = "payload"; name = "project.name"; }
{ source = "payload"; name = "project.path_with_namespace"; }
{ source = "payload"; name = "commit.id"; }
{ source = "payload"; name = "tag"; }
{ source = "payload"; name = "created_at"; }
@@ -117,7 +116,7 @@
match = {
type = "value";
parameter = { source = "header"; name = "X-Gitlab-Token"; };
value = "{{ getenv `PIGEON_GITLAB_SECRET` | js }}";
value = "{{ getenv `SECRET` | js }}";
};
}
];
@@ -127,13 +126,13 @@
name = "pigeon-webhook";
runtimeInputs = with pkgs; [ coreutils jq nq sqlite webhook ];
text = ''
: "''${PIGEON_GITLAB_SECRET:?}"
: "''${PIGEON_GITLAB_TOKEN:?}"
: "''${PIGEON_PROJECTS:?}"
: "''${PIGEON_STATE}"
: "''${SECRET:?}"
: "''${TOKEN:?}"
: "''${GRADER:?}"
: "''${STATE:?}"
mkdir -p "$PIGEON_STATE"
export NQDIR="$PIGEON_STATE/nqdir"
mkdir -p "$STATE"
export NQDIR="$STATE/nqdir"
exec webhook -hooks ${hooks} -template -port 3000 -verbose -debug
'';
};