Project

Profile

Help

Issue #1379

closed

pulp-puppet-module-builder - Errors if no modules with 'Modulefile' or no modules with 'metadata.json' exist in git repo.

Added by mhrivnak over 8 years ago. Updated about 5 years ago.

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
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

Is duplicate of Puppet Support - Issue #1249: pulp_module_builder fails when there are no 'ModuleFile' metadata filesCLOSED - CURRENTRELEASEjcline@redhat.comActions
Actions #1

Updated by mhrivnak over 8 years ago

  • Triaged changed from No to Yes
Actions #3

Updated by ipanova@redhat.com over 7 years ago

  • Sprint/Milestone set to 31
Actions #4

Updated by daviddavis over 7 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis
Actions #5

Updated by daviddavis over 7 years ago

  • Status changed from ASSIGNED to CLOSED - DUPLICATE
Actions #6

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 #8

Updated by bmbouter about 6 years ago

  • Sprint set to Sprint 13
Actions #9

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (31)
Actions #10

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF