Skip to content

Commit cc391e4

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "setup-devstack-source-dirs: also copy github libraries"
2 parents a5aa242 + 7bb5fff commit cc391e4

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

  • roles/setup-devstack-source-dirs/tasks

roles/setup-devstack-source-dirs/tasks/main.yaml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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
22
find:
33
paths:
44
- src/git.openstack.org/openstack
@@ -12,6 +12,30 @@
1212
with_items: '{{ found_repos.files }}'
1313
become: yes
1414

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+
1539
- name: Setup refspec for repos into devstack working directory
1640
shell:
1741
# Copied almost "as-is" from devstack-gate setup-workspace function

0 commit comments

Comments
 (0)