[gate-quickstart] Workaround for ansible bug 5504
Our gates in ci.centos currently fail when using depends-on in both the extras->quickstart and quickstart->extras directions. This patch addresses the extras->quickstart direction by adding a workaround for a bug in the ansible git module when using "force" Change-Id: I5e74377081ff1c4644da5930a496078a5b422692 Closes-Bug: 1655757
This commit is contained in:
parent
e9a6cb4fbe
commit
5d0a26d88c
|
@ -3,12 +3,20 @@
|
|||
set_fact:
|
||||
gated_project_name: '{{ gated_change.project | regex_replace("^.*/", "") }}'
|
||||
|
||||
- name: |
|
||||
Remove previously checked out git repo
|
||||
(workaround for ansible bug https://github.com/ansible/ansible-modules-core/issues/5504 )
|
||||
file:
|
||||
path: '{{ lookup("env", "WORKSPACE") }}/{{ gated_project_name }}'
|
||||
state: absent
|
||||
# do not remove the repo if it was cloned by the jenkins job
|
||||
when: gated_change.project != "{{ lookup('env', 'GERRIT_PROJECT') }}"
|
||||
|
||||
- name: Check out the gated change
|
||||
git:
|
||||
repo: 'https://{{ gated_change.host }}/{{ gated_change.project }}'
|
||||
dest: '{{ lookup("env", "WORKSPACE") }}/{{ gated_project_name }}'
|
||||
refspec: '{{ gated_change.refspec }}'
|
||||
force: yes
|
||||
version: 'FETCH_HEAD'
|
||||
# do not check out the gated change if it was already cloned by the jenkins job
|
||||
when: gated_change.project != "{{ lookup('env', 'GERRIT_PROJECT') }}"
|
||||
|
@ -25,3 +33,4 @@
|
|||
pip:
|
||||
name: '{{ gated_project_name }}'
|
||||
state: absent
|
||||
|
||||
|
|
Loading…
Reference in New Issue