COE : Pass proper GERRIT_REFSPEC 42/78842/4
authorFaseela K <faseela.k@ericsson.com>
Mon, 17 Dec 2018 15:52:32 +0000 (21:22 +0530)
committerJamo Luhrsen <jluhrsen@redhat.com>
Tue, 18 Dec 2018 17:50:57 +0000 (17:50 +0000)
Change-Id: Idf3c9ea9305e9abae99881c274a621ab3af51055
Signed-off-by: Faseela K <faseela.k@ericsson.com>
Signed-off-by: Karthika Panneer <r.p.karthika@ericsson.com>
csit/libraries/Coe.robot

index c23811d14903bd29f9bd2800bb1a1ebbc54c01d5..9eed0faa8b2f458f116b10e3a356d4446059301c 100644 (file)
@@ -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