From 5f005647551716fcd806bc69f0638aaef74abf51 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Tue, 23 Mar 2021 17:46:53 -0700 Subject: [PATCH] auotmatic jenkins setup (#20448) * auotmatic jenkins setup * fix quote * ne wkey old-commit-hash: 7aade3db43e1a651be0b8af76b214a691ec08884 --- Jenkinsfile | 2 +- selfdrive/test/setup_device_ci.sh | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 44c732cdf5..1d9a71faea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ def phone(String ip, String step_label, String cmd) { - withCredentials([file(credentialsId: 'id_rsa_public', variable: 'key_file')]) { + withCredentials([file(credentialsId: 'id_rsa', variable: 'key_file')]) { def ssh_cmd = """ ssh -tt -o StrictHostKeyChecking=no -i ${key_file} -p 8022 'comma@${ip}' /usr/bin/bash <<'EOF' diff --git a/selfdrive/test/setup_device_ci.sh b/selfdrive/test/setup_device_ci.sh index b605a8e8c8..435a6af436 100755 --- a/selfdrive/test/setup_device_ci.sh +++ b/selfdrive/test/setup_device_ci.sh @@ -12,8 +12,18 @@ if [ -z "$TEST_DIR" ]; then exit 1 fi +# setup jenkins device if [ ! -d "$SOURCE_DIR" ]; then - git clone https://github.com/commaai/openpilot.git "$SOURCE_DIR" + # write continue.sh + CONTINUE_FILE="/data/data/com.termux/files/continue.sh" + echo "#!/usr/bin/bash" > $CONTINUE_FILE + echo "wpa_cli IFNAME=wlan0 SCAN" >> $CONTINUE_FILE + echo "sleep infinity" >> $CONTINUE_FILE + + # write SSH keys + curl "https://github.com/commaci2.keys" > /data/params/d/GithubSshKeys + + git clone --depth 1 https://github.com/commaai/openpilot.git "$SOURCE_DIR" fi # clear scons cache dirs that haven't been written to in one day