another attempt at making SSH key accessible

This commit is contained in:
Sebastien Bourdeauducq 2019-03-14 14:06:40 +08:00
parent 376efcf94b
commit 04e68d8b8b

View File

@ -41,7 +41,7 @@ in
# One major downside of this hack is the tests are only run when generateTestOkHash # One major downside of this hack is the tests are only run when generateTestOkHash
# changes, i.e. when the ARTIQ version changes (and not the dependencies). # changes, i.e. when the ARTIQ version changes (and not the dependencies).
# Impure derivations, when they land in Nix/Hydra, should improve the situation. # Impure derivations, when they land in Nix/Hydra, should improve the situation.
kc705-tests = pkgs.stdenv.mkDerivation { kc705-tests = pkgs.stdenv.mkDerivation rec {
name = "kc705-tests"; name = "kc705-tests";
outputHashAlgo = "sha256"; outputHashAlgo = "sha256";
outputHashMode = "recursive"; outputHashMode = "recursive";
@ -52,13 +52,13 @@ in
artiqpkgs.openocd artiqpkgs.openocd
pkgs.iputils pkgs.iputils
]; ];
sshKey = /var/lib/hydra/queue-runner/.ssh/id_rsa
phases = [ "buildPhase" ]; phases = [ "buildPhase" ];
buildPhase = buildPhase =
'' ''
# set HOME to make SSH private key accessible export HOME=`mktemp -d`
export HOME=/var/lib/hydra/queue-runner mkdir $HOME/.ssh
echo XXX listing cp ${sshKey} $HOME/.ssh/id_rsa
ls ~/.ssh
artiq_flash -t kc705 -H rpi artiq_flash -t kc705 -H rpi
sleep 15 sleep 15
# ping: socket: Operation not permitted # ping: socket: Operation not permitted