Actions
Issue #1379
closedpulp-puppet-module-builder - Errors if no modules with 'Modulefile' or no modules with 'metadata.json' exist in git repo.
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 13
Quarter:
Description
From downstream. Note that there is already a PR from a community member.
https://github.com/pulp/pulp_puppet/pull/200
Description of problem:
Git repository content:
ls -l /var/tmp/puppet-modules/
total 8
drwxr-xr-x. 7 root root 4096 Nov 4 21:22 puppetlabs-stdlib
-rw-r--r--. 1 root root 50 Nov 4 21:22 README.md
There is an error, because the "paths" list will contain an empty element after running find on 'Modulefile' puppet module build is called with an empty path.
pulp-puppet-module-builder --working-dir=/var/tmp/ --output-dir=/puppet-modules --url=https://username:Changeme12@somehost/puppet/puppet-modules.git --branch=master --clean
rm -rf /var/tmp/puppet-modules.git
cd /var/tmp/
git clone --recursive https://username:Changeme12@somehost/puppet/puppet-modules.git
cd puppet-modules
git status
git remote show -n origin
git fetch
git fetch --tags
git checkout master
git pull
find . -name Modulefile
find . -name metadata.json
Pahts:
['', './puppetlabs-stdlib/metadata.json']
Modules:
set(['', './puppetlabs-stdlib'])
puppet module build
Error: Unable to find module root at /var/tmp/puppet-modules or parent directories
Error: Try 'puppet help module build' for usage
Version-Release number of selected component (if applicable):
pulp-puppet-tools-2.6.0.16-1.el7sat.noarch
How reproducible:
Every time.
Steps to Reproduce:
1. Create git repo
2. Add puppet modules with 'metadata.json'. Do not add modules with 'Modulefile'
3. Attempt to use pulp-puppet-module-builder to build all module in the repo.
Actual results:
pulp-puppet-module-builder --working-dir=/var/tmp/ --output-dir=/puppet-modules --url=https://username:Changeme12@somehost/puppet/puppet-modules.git --branch=master --clean
rm -rf /var/tmp/puppet-modules.git
cd /var/tmp/
git clone --recursive https://username:Changeme12@somehost/puppet/puppet-modules.git
cd puppet-modules
git status
git remote show -n origin
git fetch
git fetch --tags
git checkout master
git pull
find . -name Modulefile
find . -name metadata.json
Pahts:
['', './puppetlabs-stdlib/metadata.json']
Modules:
set(['', './puppetlabs-stdlib'])
puppet module build
Error: Unable to find module root at /var/tmp/puppet-modules or parent directories
Error: Try 'puppet help module build' for usage
Expected results:
All puppet modules in the git repo should be built.
Additional info:
Can be fixed by removing empty entries from the list before iterating to execute 'puppet module build'.
https://github.com/pulp/pulp_puppet/pull/200
Related issues
Updated by daviddavis over 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
Updated by daviddavis over 7 years ago
- Status changed from ASSIGNED to CLOSED - DUPLICATE
Updated by daviddavis over 7 years ago
- Is duplicate of Issue #1249: pulp_module_builder fails when there are no 'ModuleFile' metadata files added
Actions