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:
James E. Blair 2017-08-30 15:51:55 -07:00
parent dae413bc34
commit e8b82ac4de

View File

@ -1,14 +1,14 @@
- name: Synchronize src repos to workspace directory
command: "git push --mirror git+ssh://{{ ansible_user }}@{{ ansible_host }}/{{ ansible_user_dir }}/{{ item.src_dir}}"
args:
chdir: "{{ zuul.executor.src_root }}/{{ item.src_dir }}"
chdir: "{{ zuul.executor.work_root }}/{{ item.src_dir }}"
with_items: "{{ zuul.projects }}"
delegate_to: localhost
- name: Determine local HEAD
shell: "git status |head -1 |awk '{ print $NF }'"
args:
chdir: "{{ zuul.executor.src_root }}/{{ item.src_dir }}"
chdir: "{{ zuul.executor.work_root }}/{{ item.src_dir }}"
with_items: "{{ zuul.projects }}"
delegate_to: localhost
register: statuses
@ -16,7 +16,7 @@
- name: Checkout local HEAD on remote
command: "git checkout {{ item.1 }}"
args:
chdir: "{{ zuul.executor.src_root }}/{{ item.0.src_dir }}"
chdir: "{{ zuul.executor.work_root }}/{{ item.0.src_dir }}"
with_together:
- "{{ zuul.projects }}"
- "{{ statuses }}"