summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rwxr-xr-xutils/fetch_os_creds.sh8
-rwxr-xr-xutils/gpg_import_key.sh14
2 files changed, 16 insertions, 6 deletions
diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh
index 4bc585885..b40b75b75 100755
--- a/utils/fetch_os_creds.sh
+++ b/utils/fetch_os_creds.sh
@@ -164,7 +164,13 @@ elif [ "$installer_type" == "apex" ]; then
if [ -f /root/.ssh/id_rsa ]; then
chmod 600 /root/.ssh/id_rsa
fi
- sudo scp $ssh_options root@$installer_ip:/home/stack/overcloudrc.v3 $dest_path
+
+ if [ "${BRANCH}" == "stable/fraser" ]; then
+ rc_file=overcloudrc.v3
+ else
+ rc_file=overcloudrc
+ fi
+ sudo scp $ssh_options root@$installer_ip:/home/stack/${rc_file} $dest_path
elif [ "$installer_type" == "compass" ]; then
if [ "${BRANCH}" == "stable/danube" ]; then
diff --git a/utils/gpg_import_key.sh b/utils/gpg_import_key.sh
index f45e40919..94ffbaab5 100755
--- a/utils/gpg_import_key.sh
+++ b/utils/gpg_import_key.sh
@@ -51,10 +51,14 @@ else
if [ -z "$NODE_NAME" ];
then echo "Cannot find node name"
exit 0
- else echo "Importing key for '$NODE_NAME'";
- gsutil cp gs://opnfv-signing-keys/"$NODE_NAME"-subkey .
- gpg2 --import "$NODE_NAME"-subkey
- rm -f "$NODE_NAME"-subkey
- fi
+ elif gsutil ls gs://opnfv-signing-keys | grep $NODE_NAME; then
+ echo "Importing key for '$NODE_NAME'"
+ gsutil cp gs://opnfv-signing-keys/"$NODE_NAME"-subkey .
+ gpg2 --import "$NODE_NAME"-subkey
+ rm -f "$NODE_NAME"-subkey
+ else
+ echo "No keys found locally or remotely for host, skipping import"
+ exit 0
+ fi
fi