Merge pull request #77773 from mrkkrp/buildkite-agent-fixup

Buildkite agent fixup
This commit is contained in:
Graham Christensen 2020-01-15 12:35:34 -05:00 committed by GitHub
commit 40e18bc75e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -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";

View File

@ -5,9 +5,9 @@ callPackage ./generic.nix (args // rec {
owner = "buildkite";
repo = "agent";
rev = "v${version}";
sha256 = "0sr1rxl92d4wdipl66f1yymx5bmyj1y85v6k22v57rzr6yhyfmsf";
sha256 = "0a7x919kxnpdn0pnhc5ilx1z6ninx8zgjvsd0jcg4qwh0qqp5ppr";
};
version = "3.8.4";
version = "3.17.0";
hasBootstrapScript = false;
postPatch = ''
substituteInPlace bootstrap/shell/shell.go --replace /bin/bash ${bash}/bin/bash