Affects Version/s: None
Fix Version/s: PDK 1.8.0
Method Found:Needs Assessment
Release Notes:Bug Fix
Release Notes Summary:PDK validate and unit test commands will now ignore files in the vendor directory.
QA Risk Assessment:Needs Assessment
PDK scans directories it should ignore and fails validation on any .pp files these directories contain.
This is important if you want to be able to run the "real" PDK validate commands in CI systems such as Travis using a custom .travis.yml file
Uploading a .travis.yml to run pdk validate metadata,puppet in debug mode revealed gems being installed to ./vendor
Two failure modes were observed:
1. puppet-syntax: UTF-8: Could not parse for environment production: invalid byte sequence
2. Attempt to redefine entity 'http://puppet.com/2016.1/runtime/type/puppet::ast'
steps to reproduce
1. pdk new module
2. mkdir -p vendor/bundle
3. gem install -i vendor/bundle XXX
4. pdk validate metadata,puppet
Caused by installing puppet-5.3.5 gem in vendor/bundle
Caused by installing puppet-6.0.0 gem in vendor/bundle
Vendor directory can't be removed - it's needed for running tests
Since tests fails are only caused by .pp files which themselves are only testcases, remove them as part of travis run: