This will help us use standard mechanisms to install libraries that
Zuul has cloned from github
Change-Id: I8ecfeeba9133ce175fb72fc59be696879013d927
... | ... |
@@ -1,4 +1,4 @@ |
1 |
-- name: Find all source repos used by this job |
|
1 |
+- name: Find all OpenStack source repos used by this job |
|
2 | 2 |
find: |
3 | 3 |
paths: |
4 | 4 |
- src/git.openstack.org/openstack |
... | ... |
@@ -12,6 +12,30 @@ |
12 | 12 |
with_items: '{{ found_repos.files }}' |
13 | 13 |
become: yes |
14 | 14 |
|
15 |
+# Github projects are github.com/username/repo (username might be a |
|
16 |
+# top-level project too), so we have to do a two-step swizzle to just |
|
17 |
+# get the full repo path (ansible's find module doesn't help with this |
|
18 |
+# :/) |
|
19 |
+- name: Find top level github projects |
|
20 |
+ find: |
|
21 |
+ paths: |
|
22 |
+ - src/github.com |
|
23 |
+ file_type: directory |
|
24 |
+ register: found_github_projects |
|
25 |
+ |
|
26 |
+- name: Find actual github repos |
|
27 |
+ find: |
|
28 |
+ paths: '{{ found_github_projects.files | map(attribute="path") | list }}' |
|
29 |
+ file_type: directory |
|
30 |
+ register: found_github_repos |
|
31 |
+ when: found_github_projects.files |
|
32 |
+ |
|
33 |
+- name: Copy github repos into devstack working directory |
|
34 |
+ command: rsync -a {{ item.path }} {{ devstack_base_dir }} |
|
35 |
+ with_items: '{{ found_github_repos.files }}' |
|
36 |
+ become: yes |
|
37 |
+ when: found_github_projects.files |
|
38 |
+ |
|
15 | 39 |
- name: Setup refspec for repos into devstack working directory |
16 | 40 |
shell: |
17 | 41 |
# Copied almost "as-is" from devstack-gate setup-workspace function |