Revert "Move to dictionary list of projects zuul._projects"
This reverts commit df987735730e712ea3bc57f99d3c96cb561c43a9. The order in which we iterate over items in the "determine local HEAD" task is not always the order in which we iterate over mirror-workspace- git-repos. Change-Id: I181d6a2cfa2c3104730f20362bbdc10fa582339f
This commit is contained in:
parent
fa896e2125
commit
f28cc33bc3
@ -3,14 +3,14 @@
|
|||||||
name: receive.denyCurrentBranch ignore
|
name: receive.denyCurrentBranch ignore
|
||||||
value: ignore
|
value: ignore
|
||||||
scope: local
|
scope: local
|
||||||
repo: "{{ ansible_user_dir }}/{{ item.value.src_dir}}"
|
repo: "{{ ansible_user_dir }}/{{ item.src_dir}}"
|
||||||
with_dict: "{{ zuul._projects }}"
|
with_items: "{{ zuul.projects }}"
|
||||||
|
|
||||||
- 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.value.src_dir}}"
|
command: "git push --mirror git+ssh://{{ ansible_user }}@{{ ansible_host }}/{{ ansible_user_dir }}/{{ item.src_dir}}"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ zuul.executor.work_root }}/{{ item.value.src_dir }}"
|
chdir: "{{ zuul.executor.work_root }}/{{ item.src_dir }}"
|
||||||
with_dict: "{{ zuul._projects }}"
|
with_items: "{{ zuul.projects }}"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
# ANSIBLE0006: Skip linting since it triggers on the "git" command,
|
# ANSIBLE0006: Skip linting since it triggers on the "git" command,
|
||||||
# but push is not supported by ansible git module.
|
# but push is not supported by ansible git module.
|
||||||
@ -20,8 +20,8 @@
|
|||||||
- 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.work_root }}/{{ item.value.src_dir }}"
|
chdir: "{{ zuul.executor.work_root }}/{{ item.src_dir }}"
|
||||||
with_dict: "{{ zuul._projects }}"
|
with_items: "{{ zuul.projects }}"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
register: statuses
|
register: statuses
|
||||||
# ANSIBLE0006: Skip linting since it triggers on the "git" command,
|
# ANSIBLE0006: Skip linting since it triggers on the "git" command,
|
||||||
@ -39,9 +39,9 @@
|
|||||||
# checkout the branch matching the branch set up by the executor
|
# checkout the branch matching the branch set up by the executor
|
||||||
git checkout {{ item.1.stdout }}
|
git checkout {{ item.1.stdout }}
|
||||||
args:
|
args:
|
||||||
chdir: "{{ ansible_user_dir }}/{{ zuul._projects.get(item.0).src_dir }}"
|
chdir: "{{ ansible_user_dir }}/{{ item.0.src_dir }}"
|
||||||
with_together:
|
with_together:
|
||||||
- "{{ zuul._projects }}"
|
- "{{ zuul.projects }}"
|
||||||
- "{{ statuses.results }}"
|
- "{{ statuses.results }}"
|
||||||
# ANSIBLE0006: Skip linting since it triggers on the "git" command,
|
# ANSIBLE0006: Skip linting since it triggers on the "git" command,
|
||||||
# but we prefer the shell above
|
# but we prefer the shell above
|
||||||
|
@ -15,5 +15,5 @@
|
|||||||
tox_envlist: "{{ tox_envlist }}"
|
tox_envlist: "{{ tox_envlist }}"
|
||||||
tox_constraints_file: "{{ tox_constraints_file | default(omit) }}"
|
tox_constraints_file: "{{ tox_constraints_file | default(omit) }}"
|
||||||
project_dir: "{{ zuul_work_dir }}"
|
project_dir: "{{ zuul_work_dir }}"
|
||||||
projects: "{{ zuul._projects.values() | selectattr('required') | list }}"
|
projects: "{{ zuul.projects | selectattr('required') | list }}"
|
||||||
when: tox_install_siblings
|
when: tox_install_siblings
|
||||||
|
Loading…
x
Reference in New Issue
Block a user