mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 15:36:47 +03:00
buildkite: allow configuration and actual use of agent-specific hooks
This commit is contained in:
parent
69422ff361
commit
775e49439f
@ -31,6 +31,14 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
hooks-path = mkOption {
|
||||
type = types.str;
|
||||
default = "${pkgs.buildkite-agent}/share/hooks";
|
||||
description = ''
|
||||
Path to the directory storing the hooks.
|
||||
'';
|
||||
};
|
||||
|
||||
meta-data = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
@ -98,10 +106,12 @@ in
|
||||
token="${catOrLiteral cfg.token}"
|
||||
name="${cfg.name}"
|
||||
meta-data="${cfg.meta-data}"
|
||||
hooks-path="${pkgs.buildkite-agent}/share/hooks"
|
||||
hooks-path="${cfg.hooks-path}"
|
||||
build-path="/var/lib/buildkite-agent/builds"
|
||||
bootstrap-script="${pkgs.buildkite-agent}/share/bootstrap.sh"
|
||||
EOF
|
||||
|
||||
chmod +x ${cfg.hooks-path}/* 2>/dev/null || true # Guard against read-only paths.
|
||||
'';
|
||||
|
||||
serviceConfig =
|
||||
|
Loading…
Reference in New Issue
Block a user