From 31d9376c851af03a78fa9cc0b25df6859b8b79c6 Mon Sep 17 00:00:00 2001 From: Mariia Azbeleva Date: Thu, 28 Nov 2024 11:29:38 +0200 Subject: [PATCH] Read secrets from agent Signed-off-by: Mariia Azbeleva --- Robot-Framework/config/variables.robot | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Robot-Framework/config/variables.robot b/Robot-Framework/config/variables.robot index 7badfbe7..6c006bf5 100644 --- a/Robot-Framework/config/variables.robot +++ b/Robot-Framework/config/variables.robot @@ -13,6 +13,7 @@ ${SWITCH_SECRET} ${EMPTY} ${TEST_WIFI_SSID} ${EMPTY} ${TEST_WIFI_PSWD} ${EMPTY} ${DEVICE_TYPE} ${EMPTY} +${LOGIN} ghaf *** Keywords *** @@ -44,6 +45,25 @@ Set Variables Set Global Variable ${ADMIN_VM} admin-vm Set Global Variable @{VMS} ${GUI_VM} ${CHROME_VM} ${GALA_VM} ${ZATHURA_VM} ${COMMS_VM} ${BUSINESS_VM} ${ADMIN_VM} + Set Log Level NONE + + ${result} Run Process sh -c cat /run/secrets/dut-pass shell=true + Set Global Variable ${PASSWORD} ${result.stdout} + ${result} Run Process sh -c cat /run/secrets/plug-login shell=true + Set Global Variable ${PLUG_USERNAME} ${result.stdout} + ${result} Run Process sh -c cat /run/secrets/plug-pass shell=true + Set Global Variable ${PLUG_PASSWORD} ${result.stdout} + ${result} Run Process sh -c cat /run/secrets/switch-token shell=true + Set Global Variable ${SWITCH_TOKEN} ${result.stdout} + ${result} Run Process sh -c cat /run/secrets/switch-secret shell=true + Set Global Variable ${SWITCH_SECRET} ${result.stdout} + ${result} Run Process sh -c cat /run/secrets/wifi-ssid shell=true + Set Global Variable ${TEST_WIFI_SSID} ${result.stdout} + ${result} Run Process sh -c cat /run/secrets/wifi-password shell=true + Set Global Variable ${TEST_WIFI_PSWD} ${result.stdout} + + Set Log Level INFO + IF $BUILD_ID != '${EMPTY}' ${config}= Read Config ../config/${BUILD_ID}.json Set Global Variable ${JOB} ${config['Job']}