[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

Status: Closed
Project: Puppet Development Kit
Component/s: None
Affects Version/s: None
Fix Version/s: PDK 1.6.1

Type: Bug Priority: Normal
Reporter: Brett Jacobson Assignee: Tim Sharpe
Resolution: Fixed Votes: 0
Labels: resolved-issue-added
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows, or Linux container with PDK 1.6 installed


Template:
Acceptance Criteria:

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

 Description   

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.


Generated at Wed Oct 16 02:10:34 PDT 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.