Fix error in mirror-workspace-git-repos
The project src_dir contains 'src/', so use work_root instead of src_root. Change-Id: I3017dded1a8baf7fcad0b47a759dfc9f7355d0b1
This commit is contained in:
parent
dae413bc34
commit
e8b82ac4de
@ -1,14 +1,14 @@
|
|||||||
- name: Synchronize src repos to workspace directory
|
- name: Synchronize src repos to workspace directory
|
||||||
command: "git push --mirror git+ssh://{{ ansible_user }}@{{ ansible_host }}/{{ ansible_user_dir }}/{{ item.src_dir}}"
|
command: "git push --mirror git+ssh://{{ ansible_user }}@{{ ansible_host }}/{{ ansible_user_dir }}/{{ item.src_dir}}"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ zuul.executor.src_root }}/{{ item.src_dir }}"
|
chdir: "{{ zuul.executor.work_root }}/{{ item.src_dir }}"
|
||||||
with_items: "{{ zuul.projects }}"
|
with_items: "{{ zuul.projects }}"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Determine local HEAD
|
- name: Determine local HEAD
|
||||||
shell: "git status |head -1 |awk '{ print $NF }'"
|
shell: "git status |head -1 |awk '{ print $NF }'"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ zuul.executor.src_root }}/{{ item.src_dir }}"
|
chdir: "{{ zuul.executor.work_root }}/{{ item.src_dir }}"
|
||||||
with_items: "{{ zuul.projects }}"
|
with_items: "{{ zuul.projects }}"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
register: statuses
|
register: statuses
|
||||||
@ -16,7 +16,7 @@
|
|||||||
- name: Checkout local HEAD on remote
|
- name: Checkout local HEAD on remote
|
||||||
command: "git checkout {{ item.1 }}"
|
command: "git checkout {{ item.1 }}"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ zuul.executor.src_root }}/{{ item.0.src_dir }}"
|
chdir: "{{ zuul.executor.work_root }}/{{ item.0.src_dir }}"
|
||||||
with_together:
|
with_together:
|
||||||
- "{{ zuul.projects }}"
|
- "{{ zuul.projects }}"
|
||||||
- "{{ statuses }}"
|
- "{{ statuses }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user