Merge pull request #77773 from mrkkrp/buildkite-agent-fixup
Buildkite agent fixup
This commit is contained in:
commit
40e18bc75e
@ -210,6 +210,9 @@ in
|
|||||||
## don't end up in the Nix store.
|
## don't end up in the Nix store.
|
||||||
preStart = let
|
preStart = let
|
||||||
sshDir = "${cfg.dataDir}/.ssh";
|
sshDir = "${cfg.dataDir}/.ssh";
|
||||||
|
metaData = if cfg.meta-data == ""
|
||||||
|
then ""
|
||||||
|
else "meta-data=${cfg.meta-data}";
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
mkdir -m 0700 -p "${sshDir}"
|
mkdir -m 0700 -p "${sshDir}"
|
||||||
@ -220,7 +223,7 @@ in
|
|||||||
cat > "${cfg.dataDir}/buildkite-agent.cfg" <<EOF
|
cat > "${cfg.dataDir}/buildkite-agent.cfg" <<EOF
|
||||||
token="$(cat ${toString cfg.tokenPath})"
|
token="$(cat ${toString cfg.tokenPath})"
|
||||||
name="${cfg.name}"
|
name="${cfg.name}"
|
||||||
meta-data="${cfg.meta-data}"
|
${metaData}
|
||||||
build-path="${cfg.dataDir}/builds"
|
build-path="${cfg.dataDir}/builds"
|
||||||
hooks-path="${cfg.hooksPath}"
|
hooks-path="${cfg.hooksPath}"
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
@ -228,7 +231,7 @@ in
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig =
|
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";
|
User = "buildkite-agent";
|
||||||
RestartSec = 5;
|
RestartSec = 5;
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
@ -5,9 +5,9 @@ callPackage ./generic.nix (args // rec {
|
|||||||
owner = "buildkite";
|
owner = "buildkite";
|
||||||
repo = "agent";
|
repo = "agent";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0sr1rxl92d4wdipl66f1yymx5bmyj1y85v6k22v57rzr6yhyfmsf";
|
sha256 = "0a7x919kxnpdn0pnhc5ilx1z6ninx8zgjvsd0jcg4qwh0qqp5ppr";
|
||||||
};
|
};
|
||||||
version = "3.8.4";
|
version = "3.17.0";
|
||||||
hasBootstrapScript = false;
|
hasBootstrapScript = false;
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace bootstrap/shell/shell.go --replace /bin/bash ${bash}/bin/bash
|
substituteInPlace bootstrap/shell/shell.go --replace /bin/bash ${bash}/bin/bash
|
||||||
|
Loading…
Reference in New Issue
Block a user