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