Use gerrit patch for coe csit 70/78170/15
authorSam Hague <shague@redhat.com>
Mon, 26 Nov 2018 20:17:14 +0000 (15:17 -0500)
committerJamo Luhrsen <jluhrsen@redhat.com>
Wed, 28 Nov 2018 00:06:39 +0000 (00:06 +0000)
Change-Id: I93ee4bce847a86adaa89409b12dd8a3ae760dfc1
Signed-off-by: Sam Hague <shague@redhat.com>
csit/libraries/Coe.robot
csit/variables/coe/coe_play.yaml

index f4288550533512e1d96fe9aed169b4077bca4d56..90034b4d2fcee7f7a5abde196129fb4822a53c59 100644 (file)
@@ -78,7 +78,7 @@ 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}
-    ${play_output} =    OperatingSystem.Run    ansible-playbook ${USER_HOME}/coe_play.yaml -i ${USER_HOME}/hosts.yaml
+    ${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_REFSPEC}"}'
     BuiltIn.Log    ${play_output}
 
 Modifying templates in playbook
index 53cccd449010e543bcd27ea5b029781131718cac..90e02d019b4319653fd816cd0fdb73d191a567cf 100644 (file)
       shell: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
       args:
         creates: "{{ gopath }}/bin/dep"
+    - name: Show gerrit details
+      debug:
+        msg:
+          - "Fetch COE git repository https://git.opendaylight.org/gerrit/p/coe.git"
+          - "gerrit_branch {{ gerrit_branch }}"
+          - "gerrit_refspec {{ gerrit_refspec }}"
     - name: Fetch COE git repository
       git:
-        repo: 'https://git.opendaylight.org/gerrit/p/coe.git'
+        repo: "https://git.opendaylight.org/gerrit/p/coe.git"
+        version: "{{ gerrit_branch }}"
+        refspec: "{{ gerrit_refspec }}"
         dest: "{{ coe_path }}"
+    - name: List COE git repository recent patches
+      shell: "git --no-pager log --pretty=format:'%h %<(30)%ad %<(30)%cd %<(20,trunc)%an%d %s' -n10"
+      args:
+        chdir: "{{ coe_path }}"
     - name: Fetch odl-cni dependencies with dep
       shell: dep ensure -vendor-only
       args: