From 029fd685ab7e9ad117a667523974f17c0150329f Mon Sep 17 00:00:00 2001 From: Sam Hague Date: Mon, 26 Nov 2018 15:17:14 -0500 Subject: [PATCH] Use gerrit patch for coe csit Change-Id: I93ee4bce847a86adaa89409b12dd8a3ae760dfc1 Signed-off-by: Sam Hague --- csit/libraries/Coe.robot | 2 +- csit/variables/coe/coe_play.yaml | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/csit/libraries/Coe.robot b/csit/libraries/Coe.robot index f428855053..90034b4d2f 100644 --- a/csit/libraries/Coe.robot +++ b/csit/libraries/Coe.robot @@ -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 diff --git a/csit/variables/coe/coe_play.yaml b/csit/variables/coe/coe_play.yaml index 53cccd4490..90e02d019b 100644 --- a/csit/variables/coe/coe_play.yaml +++ b/csit/variables/coe/coe_play.yaml @@ -27,10 +27,22 @@ 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: -- 2.36.6