mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00: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 {
|
meta-data = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "";
|
default = "";
|
||||||
@ -98,10 +106,12 @@ in
|
|||||||
token="${catOrLiteral cfg.token}"
|
token="${catOrLiteral cfg.token}"
|
||||||
name="${cfg.name}"
|
name="${cfg.name}"
|
||||||
meta-data="${cfg.meta-data}"
|
meta-data="${cfg.meta-data}"
|
||||||
hooks-path="${pkgs.buildkite-agent}/share/hooks"
|
hooks-path="${cfg.hooks-path}"
|
||||||
build-path="/var/lib/buildkite-agent/builds"
|
build-path="/var/lib/buildkite-agent/builds"
|
||||||
bootstrap-script="${pkgs.buildkite-agent}/share/bootstrap.sh"
|
bootstrap-script="${pkgs.buildkite-agent}/share/bootstrap.sh"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
chmod +x ${cfg.hooks-path}/* 2>/dev/null || true # Guard against read-only paths.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig =
|
serviceConfig =
|
||||||
|
Loading…
Reference in New Issue
Block a user