-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Module layout specification #157
Conversation
130c1af
to
0ff2c04
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I'm in favor of a specific list of what's allowed. I'd suggest the make sure puppet-modulebuilder has this list built in. It may be a breaking change to switch to it, so perhaps at first it should be opt-in.
Short term I think this may work for .pmtignore
, if it follows gitignore:
# Ignore everything
*
# except
!manifest/**/*.pp
!metadata.json
!README*
!CHANGELOG*
!LICENSE*
...
a94a4f5
to
457d81e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from that one comment this LGTM.
Would probably need a few more eyes on it before merging though, considering the importance.
This is a good start. i would like to see |
@donoghuc thanks for the hint, I added it. |
4093583
to
773e3af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it's useful to show a tree form.
$ mkdir -p docs examples facts.d files functions lib/facter lib/puppet/{type,provider,functions,parser/functions,puppet_x,augeas/lenses} locales plans scripts tasks templates types
$ touch CHANGELOG LICENSE README REFERENCE.md bolt_plugin.json hiera.yaml metadata.json
$ tree
.
├── bolt_plugin.json
├── CHANGELOG
├── docs
├── examples
├── facts.d
├── files
├── functions
├── hiera.yaml
├── lib
│ ├── facter
│ └── puppet
│ ├── augeas
│ │ └── lenses
│ ├── functions
│ ├── parser
│ │ └── functions
│ ├── provider
│ ├── puppet_x
│ └── type
├── LICENSE
├── locales
├── manifests
├── metadata.json
├── plans
├── README
├── REFERENCE.md
├── scripts
├── tasks
├── templates
└── types
24 directories, 7 files
On the console it helpfully shows directories as blue and files as white so it's even easier to understand.
I'd even consider a separate chapter for each file/directory describing it. Some descriptions are already quite long, but many of them could be further enhanced with references to official documentation. For example, files
can explain the puppet://
mechanism, but also the file()
function. And that the Puppetserver will serve the files as a fileserver. Similarly, for lib which things are synced to agents.
Just a thought : as we have consider bolt scenario here so should we consider below 2 files also to be part of specification ?
|
@Ramesh7 no those are for bolt projects. A bolt project is not a module. This spec is for modules. |
| `/lib/augeas/lenses/` | Custom [Augeas](https://augeas.net/) lenses | | ||
| `/functions/` | Can contain [functions written in Puppet DSL](https://www.puppet.com/docs/puppet/latest/lang_write_functions_in_puppet.html) | | ||
| `/metadata.json` | The `metadata.json` file MUST be present and MUST adhere to [Puppet's metadata](https://www.puppet.com/docs/puppet/latest/modules_metadata.html). [metadata-json-lint](https://github.com/voxpupuli/metadata-json-lint#metadata-json-lint) can be used to validate your file. | | ||
| `/README` | A README that describes what the module does. It's best practice to add a file extension like `.md`, `.rst` when a markup language is used | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it says at the end .md/,rst, would it make sense to do README.md by default, given that is the community standard.
|
||
## Schema versioning | ||
|
||
This is version 0 of the schema. A changelog will be added when the schema is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we semver this? so 0.1.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at other places Puppet only used major versions for schema. For example for the report format. I'm fine with everything here.
This document describes all files/directories that are allowed or mandatory within a module. The forge can use it as an allowlist and filter other files out. r10k/code-manager can use it as an allowlist as well when modules are pulled from version controll systems like github (similar to the `--exclude-spec` option in r10k). Co-authored-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
Co-authored-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
This implements puppetlabs/puppet-specifications#157 * By default every file is ignored * Only files from the official specification for puppet modules are added to the allowlist * support for .pdkignore, .pmtignore and .gitignore is removed
This implements puppetlabs/puppet-specifications#157 * By default every file is ignored * Only files from the official specification for puppet modules are added to the allowlist * support for .pdkignore, .pmtignore and .gitignore is removed
puppetlabs/puppet-specifications#157 defines which files are allowed in a puppet module release. This commit basically changes the .pmtignore into an allowlist, not a denylist anymore.
This implements puppetlabs/puppet-specifications#157 * By default every file is ignored * Only files from the official specification for puppet modules are added to the allowlist * support for .pdkignore, .pmtignore and .gitignore is removed
This implements puppetlabs/puppet-specifications#157 * By default every file is ignored * Only files from the official specification for puppet modules are added to the allowlist * support for .pdkignore, .pmtignore and .gitignore is removed
This implements puppetlabs/puppet-specifications#157 * By default every file is ignored * Only files from the official specification for puppet modules are added to the allowlist * support for .pdkignore, .pmtignore and .gitignore is removed
This implements puppetlabs/puppet-specifications#157 * By default every file is ignored * Only files from the official specification for puppet modules are added to the allowlist * support for .pdkignore, .pmtignore and .gitignore is removed
puppetlabs/puppet-specifications#157 defines which files are allowed in a puppet module release. This commit basically changes the .pmtignore into an allowlist, not a denylist anymore.
This implements puppetlabs/puppet-specifications#157 * By default every file is ignored * Only files from the official specification for puppet modules are added to the allowlist * support for .pdkignore, .pmtignore and .gitignore is removed
This implements puppetlabs/puppet-specifications#157 * By default every file is ignored * Only files from the official specification for puppet modules are added to the allowlist * support for .pdkignore, .pmtignore and .gitignore is removed
This implements puppetlabs/puppet-specifications#157 * By default every file is ignored * Only files from the official specification for puppet modules are added to the allowlist * support for .pdkignore, .pmtignore and .gitignore is removed
This implements puppetlabs/puppet-specifications#157 * By default every file is ignored * Only files from the official specification for puppet modules are added to the allowlist * support for .pdkignore, .pmtignore and .gitignore is removed
This implements puppetlabs/puppet-specifications#157 * By default every file is ignored * Only files from the official specification for puppet modules are added to the allowlist * support for .pdkignore, .pmtignore and .gitignore is removed
This implements puppetlabs/puppet-specifications#157 * By default every file is ignored * Only files from the official specification for puppet modules are added to the allowlist * support for .pdkignore, .pmtignore and .gitignore is removed
This document describes all files/directories that are allowed or mandatory within a module. The forge can use it as an allowlist and filter other files out. r10k/code-manager can use it as an allowlist as well when modules are pulled from version controll systems like github (similar to the
--exclude-spec
option in r10k).