puppet/puppet-dev-tools

By puppet

Updated about 1 year ago

Puppet development tools such as PDK, onceover, and a set of helpful Rake tasks

Image
10

1M+

puppet/puppet-dev-tools repository overview

Puppet Dev Tools

GitHub Actions Build-Test-Push status Dependabot Status

Docker Tags

  • <year>-<month>-<day>-<a short string>: Each merge to master generates an image tagged with the date of its build followed by a short git SHA. These images are suitable for pinning to if you do not wish to live on the edge with 4.x. Changes from one image to the next will include things shown in the commit history on GitHub and updated operating system packages pulled in at build time. The latest version of the PDK is also pulled in at build time.
  • <year>-<month>-<day>-<a short string>-rootless: This is just like the tag above but the container runs as a user namecd puppetdev.
  • 4.x: This the tag that is used in the 4.x versions of CD4PE. This tag is updated manually from time to time.
  • latest: This is a legacy tag and not not actually the current build of puppet-dev-tools. It is the build used in older versions of CD4PE (prior to 4.0). These builds are manually created by the CD4PE team.

Running

You can use this container by running docker run --rm -v $(pwd):/repo puppet/puppet-dev-tools <command> where <command> is any of the ones listed below.

Supported Commands

  1. PDK - pdk
    • run docker run --rm puppet/puppet-dev-tools:4.x pdk --help to see builtin help
    • see the PDK command reference for details
  2. Onceover - onceover
    • run docker run --rm puppet/puppet-dev-tools:4.x onceover --help to see builtin help
    • see Onceover's readme for details
  3. Rake tasks from the installed gems (see below)
    • run a single rake task like so: docker run --rm -v $(pwd):/repo puppet/puppet-dev-tools:4.x rake -f /Rakefile lint
    • run multiple rake tasks sequentially like so: docker run --rm -v $(pwd):/repo puppet/puppet-dev-tools:4.x rake -f /Rakefile lint syntax yamllint
A note on Onceover usage

If your control repository contains a Gemfile you will likely want to modify the commands listed above to something like this:

docker run --rm -v $(pwd):/repo puppet/puppet-dev-tools:latest \
/bin/bash -c "bundle install && bundle exec onceover run spec --force --trace --parallel"
Rake Tasks
CommandDescription
rake beakerRun beaker acceptance tests
rake beaker:setsList available beaker nodesets
rake beaker:ssh[set,node]Try to use vagrant to login to the Beaker node
rake buildBuild puppet module package
rake build:pdkBuild Puppet module with PDK
rake build:pmtBuild Puppet module package with PMT (Puppet < 6.0.0 only)
rake checkRun static pre release checks
rake check:dot_underscoreFails if any ._ files are present in directory
rake check:git_ignoreFails if directories contain the files specified in .gitignore
rake check:symlinksFails if symlinks are present in directory
rake check:test_fileFails if .pp files present in tests folder
rake check_for_spec_testsGet spec test status
rake cleanClean a built module package
rake compute_dev_versionPrint development version of module
rake generate_fixturesWrites a fixtures.yml file based on the Puppetfile / Generate Fixtures files for role/profile
rake generate_spec_testsGenerate spec tests for missing classes
rake helpDisplay the list of available rake tasks
rake hiera_setupModifies your hiera.yaml to point at the hieradata relative to its position
rake lintRun puppet-lint
rake lint_fixRun puppet-lint
rake parallel_specRun spec tests in parallel and clean the fixtures directory if successful
rake parallel_spec_standaloneParallel spec tests
rake pe_only_modsShow PE Only Modules
rake r10k:dependenciesPrint outdated forge modules
rake r10k:duplicatesCheck Puppetfile for duplicates
rake r10k:installInstall modules specified in Puppetfile
rake r10k:solve_dependencies[allow_major_bump]Find missing or outdated module dependencies
rake r10k:syntaxSyntax check Puppetfile
rake r10k:validateValidate the git urls and branches, refs, or tags
rake release_checksRuns all necessary checks on a module in preparation for a release
rake rubocopRun RuboCop
rake rubocop:auto_correctAuto-correct RuboCop offenses
rake run_testsRun tests
rake specRun spec tests and clean the fixtures directory if successful
rake spec:simplecovRun spec tests with ruby simplecov code coverage
rake spec_cleanClean up the fixtures directory
rake spec_clean_symlinksClean up any fixture symlinks
rake spec_list_jsonList spec tests in a JSON document
rake spec_prepCreate the fixtures directory
rake spec_standaloneRun RSpec code examples
rake strings:generate[patterns,debug,backtrace,markup,json,markdown,yard_args]Generate Puppet documentation with YARD
rake strings:generate:reference[patterns,debug,backtrace]Generate Puppet Reference documentation
rake strings:gh_pages:updateUpdate docs on the gh-pages branch and push to GitHub
rake syntaxSyntax check Puppet manifests and templates
rake syntax:hieraSyntax check Hiera config files
rake syntax:manifestsSyntax check Puppet manifests
rake syntax:templatesSyntax check Puppet templates
rake validateCheck syntax of Ruby files and call :syntax and :metadata_lint
rake yamllintRun yamllint

Tag summary

Content type

Image

Digest

sha256:ac9641358

Size

561.7 MB

Last updated

about 1 year ago

docker pull puppet/puppet-dev-tools:2025-06-25-917710d