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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDK 1.6.1
    • Component/s: None
    • Environment:

      Windows, or Linux container with PDK 1.6 installed

    • Template:
    • Acceptance Criteria:
      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).
    • 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.

        Attachments

          Activity

            jsd-sla-details-panel

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: