Fix refspec for coe test patch 77/78877/4
authorSam Hague <shague@redhat.com>
Wed, 19 Dec 2018 18:46:49 +0000 (13:46 -0500)
committerSam Hague <shague@redhat.com>
Thu, 20 Dec 2018 14:02:39 +0000 (14:02 +0000)
Depends-on: I5c67e9cf8db8b3e0ffc7ef857bae946cd3d7f489
Change-Id: I587245e1b61a0fa800d79cb920cab35667b678c5
Signed-off-by: Sam Hague <shague@redhat.com>
csit/libraries/Coe.robot
csit/variables/coe/coe_play.yaml

index 9eed0faa8b2f458f116b10e3a356d4446059301c..a80717759301630aa5091bf8ff4822c572de18fe 100644 (file)
@@ -73,13 +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}
-    ${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}
+    ${branch_ref_spec} =    BuiltIn.Catenate    SEPARATOR=    refs/heads/    ${GERRIT_BRANCH}
+    ${gerrit_ref_spec} =    BuiltIn.Set Variable If    '${GERRIT_PROJECT}' != 'coe'    ${branch_ref_spec}    ${GERRIT_REFSPEC}
     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":"${GERRIT_BRANCH}","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":"FETCH_HEAD","gerrit_refspec":"${gerrit_ref_spec}"}'
     BuiltIn.Log    ${play_output}
 
 Modifying templates in playbook
index 37cbfe748daceae4fba6d317e40e749fdb857c93..bf00bbcbfa5ce3d17b0a7044d2dd93f1e27e346f 100644 (file)
@@ -45,7 +45,7 @@
       shell: "git --no-pager log --pretty=format:'%h %<(30)%ad %<(30)%cd %<(20,trunc)%an%d %s' -n10"
       args:
         chdir: "{{ coe_path }}"
-        register: git_log_output
+      register: git_log_output
     - name: git log header
       run_once: true
       debug: