The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com
Ability to exclude particular items from a built module
|Target version:||PMT v3|
|Keywords:||forge module-tool||Affected URL:|
As we figure out how to solve robust testing and development workflows for Puppet modules, modules are increasingly littered with files that aid in that process. My concern is that as the number of these files grow, they may be undesirable to sysadmins that just want to download a module to manage their systems.
How should we resolve this?
#2 Updated by Ryan Coleman almost 3 years ago
(changed the ticket to be less about the solution, more about the problem)
One should be able to include an ignore file in the root of a module that puppet module build will use to exclude certain items from inclusion in the forge tarball.
.gitignore Gemfile .travis.yml
Alternatively, perhaps these files -are- sent to the Forge but aren’t included by default unless the user specifies —all or —development. Just a thought.
#5 Updated by Dominic Cleal over 2 years ago
This is biting me a bit, because my module directory is filling up with files that I don’t even want to push to the forge for developers, let alone to sysadmins. As an example, I’m using librarian-puppet and submodules to pull down other dependencies, so developers are able to do this themselves without it needing to be tarred up during a
puppet module generate.
I’d prefer to see a .moduleignore rather than a .forgeignore to ensure files never make it into the tarball rather than Forge-side “filtering”.
Edit: I see
puppet module already has a limited filter using a hardcoded list of files in
#6 Updated by Ryan Coleman over 2 years ago
- Subject changed from How should we handle testing & development content in Forge modules to Forge modules need an ignore file
- Description updated (diff)
We’ll definitely be doing something like this, just a matter of priority and implementation at this point. Stay tuned for details.
#9 Updated by Ken Barber almost 2 years ago
This would help with cases like this:
Either an ignore file, or having the ability to specifically include content during build would help.
As a work-around, I’m having to strip out the ‘spec’ directory first and tarring it myself (this also means I can set the permissions of the tarball to work around that problem as well).
#11 Updated by James Shubin over 1 year ago
FWIW this sort of feature is pretty crucial for devs even caring the puppet forge exists.
I have been publishing my puppet modules on github.
Each module has it’s own git repo, which is where I do my coding. I typically have some personal “hack” directories like tmp/, or foobar/, which are in my .gitignore. These are absolutely not to be pushed publicly or stored in git.
I figured I would try to contribute to the forge, but I’m not deleting my personal hack dirs to do so. If someone has an interim script to do whatever build needs to do, that would be great. It would also make a whole lot of sense if it could upload the tarball too. Basically ‘git push’ is the easiest/best solution at the moment.
Hopefully puppet devs can appreciate the desire for this to be effortless and automatic.