Uploaded image for project: 'Puppet Development Kit'
  1. Puppet Development Kit
  2. PDK-1061

PDK build fails to find rake unless unit tests have been run once

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PDK 1.6.1
    • None
    • Windows, or Linux container with PDK 1.6 installed

    • Hide

      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).

      Show
      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).
    • Needs Assessment
    • Bug Fix
    • `pdk build` now creates the rake binstub needed to clean up the module prior to packaging.
    • 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.

      Attachments

        Activity

          People

            tim.sharpe Tim Sharpe
            BrettJ Brett Jacobson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support