Move to dictionary list of projects zuul._projects
Zuul exports the projects list as a dictionary in _projects in the depends-on. The idea is that we switch these jobs to that, and do some testing. When ready, we switch "projects" to be the dictionary view, and revert "_project" calls here to "project". Change-Id: I430277369f9ecb2ecc0a31f795c72bba83bcecff
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
command: "git remote add origin https://{{ item.canonical_name }}"
|
command: "git remote add origin https://{{ item.canonical_name }}"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ ansible_user_dir }}/src/{{ item.canonical_name }}"
|
chdir: "{{ ansible_user_dir }}/src/{{ item.canonical_name }}"
|
||||||
with_items: "{{ zuul.projects }}"
|
with_items: "{{ zuul._projects.values() }}"
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- legacy-copy-project-config-scripts
|
- legacy-copy-project-config-scripts
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
- name: Find locally cached git repos
|
- name: Find locally cached git repos
|
||||||
stat:
|
stat:
|
||||||
path: "/opt/git/{{ item.name }}"
|
path: "/opt/git/{{ item.name }}"
|
||||||
with_items: "{{ zuul.projects }}"
|
with_items: "{{ zuul.projects.values() }}"
|
||||||
register: cached_repos
|
register: cached_repos
|
||||||
|
|
||||||
- name: Clone cached repo to workspace
|
- name: Clone cached repo to workspace
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
creates: "{{ ansible_user_dir }}/{{ item.0.src_dir}}"
|
creates: "{{ ansible_user_dir }}/{{ item.0.src_dir}}"
|
||||||
when: item.1.stat.exists
|
when: item.1.stat.exists
|
||||||
with_together:
|
with_together:
|
||||||
- "{{ zuul.projects }}"
|
- "{{ zuul.projects.values() }}"
|
||||||
- "{{ cached_repos.results }}"
|
- "{{ cached_repos.results }}"
|
||||||
|
|
||||||
- name: Clone upstream repo to workspace
|
- name: Clone upstream repo to workspace
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
creates: "{{ ansible_user_dir }}/{{ item.0.src_dir}}"
|
creates: "{{ ansible_user_dir }}/{{ item.0.src_dir}}"
|
||||||
when: not item.1.stat.exists
|
when: not item.1.stat.exists
|
||||||
with_together:
|
with_together:
|
||||||
- "{{ zuul.projects }}"
|
- "{{ zuul.projects.values() }}"
|
||||||
- "{{ cached_repos.results }}"
|
- "{{ cached_repos.results }}"
|
||||||
|
|
||||||
- name: Remove origin from local git repos
|
- name: Remove origin from local git repos
|
||||||
|
|||||||
Reference in New Issue
Block a user