From 421e9055c492bc23febe3a5e8652ecb83fbf3afd Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Wed, 24 Jan 2018 13:51:08 +0000 Subject: [PATCH] Correct manifest index of openstack git folders Currently the manifest contains all the possible repositories which would be present if a non-selective git clone was done, rather than the actual resulting list of git folders. This patch corrects the manifest to only contain the list of what is actually there after the build process completes. Depends-On: I15f993a3f80283f772bbb8ad75311f5117ff7ac0 Change-Id: I20ad8d21d4a68f8daa30c730a08a134b0cc9c0d3 --- tasks/repo_build_index.yml | 11 ++++++++++- templates/manifest.in.j2 | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/tasks/repo_build_index.yml b/tasks/repo_build_index.yml index 7ce1dd7..a8dbba7 100644 --- a/tasks/repo_build_index.yml +++ b/tasks/repo_build_index.yml @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Index all manifest items +- name: Index all os-releases/venvs files find: file_type: any paths: @@ -23,6 +23,15 @@ tags: - repo-create-release-manifest +- name: Index all openstackgit directories + find: + file_type: directory + paths: + - "{{ repo_build_git_dir }}" + register: manifest_git_items + tags: + - repo-create-release-manifest + - name: Create release manifest template: src: "manifest.in.j2" diff --git a/templates/manifest.in.j2 b/templates/manifest.in.j2 index f95d70d..14af494 100644 --- a/templates/manifest.in.j2 +++ b/templates/manifest.in.j2 @@ -8,6 +8,6 @@ {{ item_cleaned }} {% endif %} {% endfor %} -{% for clone_item in local_packages['results'][0]['item']['remote_package_parts'] %} -{{ repo_build_git_dir | basename }}/{{ clone_item['name'] }} +{% for item in manifest_git_items['files'] %} +{{ item['path'] | regex_replace(repo_build_base_path ~ "/", '') }} {% endfor %}