From 6e6ab0764207c8a4e56930ded29774a0c747629b Mon Sep 17 00:00:00 2001 From: Timofey Turenko Date: Tue, 21 May 2019 13:21:23 +0300 Subject: [PATCH] Make .ssh/id_rsa.pub default source of public keys for VMs 'build' and 'run_test' copies public ssh keys to all created VMs Legacy code takes keys from different locations, e.g. ~/build-scripts/team_keys which causes errors due to lack of such files. Now public keys goes from file defined on or if not defined from .ssh/id_rsa.pub of current host machine --- BUILD/mdbci/build.sh | 4 ++-- maxscale-system-test/mdbci/set_run_test_variables.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BUILD/mdbci/build.sh b/BUILD/mdbci/build.sh index 0b45af572..3a11f13e3 100755 --- a/BUILD/mdbci/build.sh +++ b/BUILD/mdbci/build.sh @@ -29,6 +29,7 @@ export platform=`${mdbci_dir}/mdbci show boxinfo --box-name=$box --field='platfo export platform_version=`${mdbci_dir}/mdbci show boxinfo --box-name=$box --field='platform_version' --silent` export dist_sfx="$platform"."$platform_version" export cmake_flags="${cmake_flags} -DPACKAGE=Y -DDISTRIB_SUFFIX=${dist_sfx}" +export team_keys=${team_keys:-${HOME}/.ssh/id_rsa.pub} # prerare VM export provider=`${mdbci_dir}/mdbci show provider $box --silent 2> /dev/null` @@ -73,8 +74,7 @@ $(<${script_dir}/templates/build.json.template) exit 1 fi echo "copying public keys to VM" - cp ~/build-scripts/team_keys . - ${mdbci_dir}/mdbci public_keys --key team_keys --silent $name + ${mdbci_dir}/mdbci public_keys --key ${team_keys} --silent $name fi echo "Get VM info" diff --git a/maxscale-system-test/mdbci/set_run_test_variables.sh b/maxscale-system-test/mdbci/set_run_test_variables.sh index 8a1a323c3..a58e9d7b2 100644 --- a/maxscale-system-test/mdbci/set_run_test_variables.sh +++ b/maxscale-system-test/mdbci/set_run_test_variables.sh @@ -9,7 +9,7 @@ export PATH=$PATH:$HOME/mdbci/ export JOB_NAME=${JOB_NAME:-"local_test"} export BUILD_NUMBER=${BUILD_NUMBER:-`date '+%Y%m%d%H%M'`} export BUILD_TAG=${BUILD_TAG:-jenkins-${JOB_NAME}-${BUILD_NUMBER}} -export team_keys=${team_keys:-${HOME}/team_keys} +export team_keys=${team_keys:-${HOME}/.ssh/id_rsa.pub} export do_not_destroy_vm=${do_not_destroy_vm:-"yes"} #export test_set=${test_set:-"-LE UNSTABLE"} export test_set=${test_set:-"-I 1,5"}