Merge pull request #121667 from Mic92/buildkite

nixos/buildkite-agents: fix race-condition when installing secrets
This commit is contained in:
Jörg Thalheim 2021-06-01 09:31:23 +02:00 committed by GitHub
commit 846f44e880
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -238,8 +238,7 @@ in
in
optionalString (cfg.privateSshKeyPath != null) ''
mkdir -m 0700 -p "${sshDir}"
cp -f "${toString cfg.privateSshKeyPath}" "${sshDir}/id_rsa"
chmod 600 "${sshDir}"/id_rsa
install -m600 "${toString cfg.privateSshKeyPath}" "${sshDir}/id_rsa"
'' + ''
cat > "${cfg.dataDir}/buildkite-agent.cfg" <<EOF
token="$(cat ${toString cfg.tokenPath})"