[PDK-1061] PDK build fails to find rake unless unit tests have been run once Created: 2018/06/30 Updated: 2018/07/26 Resolved: 2018/07/03
|Project:||Puppet Development Kit|
|Fix Version/s:||PDK 1.6.1|
|Reporter:||Brett Jacobson||Assignee:||Tim Sharpe|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
Windows, or Linux container with PDK 1.6 installed
pdk build should get rake into the ./bin folder (and whatever else it needs), without assuming that pdk test unit has been executed; since in a GitLab CI pipeline, pdk build is likely being executed in a separate job in a fresh container (because unit tests were run in a prior step).
|Method Found:||Needs Assessment|
|Release Notes:||Bug Fix|
|Release Notes Summary:||`pdk build` now creates the rake binstub needed to clean up the module prior to packaging.|
|QA Risk Assessment:||Needs Assessment|
If you do pdk build in a module directory where ./bin/rake does not exist, you get an error like:
Failed to execute '/path-to-my-module/bin/rake spec_clean': No such file or directory
The only command that will put rake in ./bin is pdk test unit.
This is very problematic in a CI pipeline where pdk build is run in a separate step in a clean container from the unit test step. The workaround is to execute a unit test, but this drastically increases the time of the build step, because pdk test unit will download all dependent modules, which takes minutes.