From 563ac387780bc32cfd8e29d204ca475d13b6f51e Mon Sep 17 00:00:00 2001 From: Faseela K Date: Mon, 17 Dec 2018 21:22:32 +0530 Subject: [PATCH] COE : Pass proper GERRIT_REFSPEC Change-Id: Idf3c9ea9305e9abae99881c274a621ab3af51055 Signed-off-by: Faseela K Signed-off-by: Karthika Panneer --- csit/libraries/Coe.robot | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/csit/libraries/Coe.robot b/csit/libraries/Coe.robot index c23811d149..9eed0faa8b 100644 --- a/csit/libraries/Coe.robot +++ b/csit/libraries/Coe.robot @@ -73,12 +73,13 @@ Configuration Playbook OperatingSystem.Create File ${WATCHER_COE} ${watcher} SSHKeywords.Copy_File_To_Remote_System ${K8s_MASTER_IP} ${WATCHER_COE} ${USER_HOME} OperatingSystem.Copy File ${PLAYBOOK_FILE} ${USER_HOME} - ${gerrit_ref_spec} = BuiltIn.Set Variable If '${GERRIT_PROJECT}' == 'coe' ${GERRIT_REFSPEC} HEAD + ${default_ref_spec} = BuiltIn.Catenate SEPARATOR= refs/heads/ ${GERRIT_BRANCH} + ${gerrit_ref_spec} = BuiltIn.Set Variable If '${GERRIT_PROJECT}' == 'coe' ${GERRIT_REFSPEC} ${default_ref_spec} Run Coe Playbook ${gerrit_ref_spec} Run Coe Playbook [Arguments] ${gerrit_ref_spec} - ${play_output} = OperatingSystem.Run ansible-playbook -v ${USER_HOME}/coe_play.yaml -i ${USER_HOME}/hosts.yaml --extra-vars '{"gerrit_branch":"FETCH_HEAD","gerrit_refspec":"${gerrit_ref_spec}"}' + ${play_output} = OperatingSystem.Run ansible-playbook -v ${USER_HOME}/coe_play.yaml -i ${USER_HOME}/hosts.yaml --extra-vars '{"gerrit_branch":"${GERRIT_BRANCH}","gerrit_refspec":"${gerrit_ref_spec}"}' BuiltIn.Log ${play_output} Modifying templates in playbook -- 2.36.6