mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
Make buildkite agent service compatible with buildkite-agent3
This commit is contained in:
parent
24e5a5f5d9
commit
a8cdfd30ff
1 changed files with 5 additions and 2 deletions
|
@ -210,6 +210,9 @@ in
|
|||
## don't end up in the Nix store.
|
||||
preStart = let
|
||||
sshDir = "${cfg.dataDir}/.ssh";
|
||||
metaData = if cfg.meta-data == ""
|
||||
then ""
|
||||
else "meta-data=${cfg.meta-data}";
|
||||
in
|
||||
''
|
||||
mkdir -m 0700 -p "${sshDir}"
|
||||
|
@ -220,7 +223,7 @@ in
|
|||
cat > "${cfg.dataDir}/buildkite-agent.cfg" <<EOF
|
||||
token="$(cat ${toString cfg.tokenPath})"
|
||||
name="${cfg.name}"
|
||||
meta-data="${cfg.meta-data}"
|
||||
${metaData}
|
||||
build-path="${cfg.dataDir}/builds"
|
||||
hooks-path="${cfg.hooksPath}"
|
||||
${cfg.extraConfig}
|
||||
|
@ -228,7 +231,7 @@ in
|
|||
'';
|
||||
|
||||
serviceConfig =
|
||||
{ ExecStart = "${pkgs.buildkite-agent}/bin/buildkite-agent start --config /var/lib/buildkite-agent/buildkite-agent.cfg";
|
||||
{ ExecStart = "${cfg.buildkite-agent}/bin/buildkite-agent start --config /var/lib/buildkite-agent/buildkite-agent.cfg";
|
||||
User = "buildkite-agent";
|
||||
RestartSec = 5;
|
||||
Restart = "on-failure";
|
||||
|
|
Loading…
Reference in a new issue