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
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: