Skip to content
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

.pmtignore: implement module layout specification #899

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bastelfreak
Copy link
Member

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.

Comment on lines -39 to -41
<% if ! @configs['paths'].nil? -%>
<% @configs['paths'].each do |path| -%>
<%= path %>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of our modules used that

@bastelfreak
Copy link
Member Author

I tested this by hand and run bundle exec module:build and it worked fine. It would be cooler to implement this also into puppet-modulebuilder but had no luck yet.

@bastelfreak
Copy link
Member Author

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we build this list into puppet-modulebuilder? I'm debating how though.

You could make it default, but then it'd still read .gitignore.

You could control it via some option, but we invoke it in 2 ways: release and acceptance tests. We'd need to keep that in sync.

Adding another config file for it is ugly, but enhancing the ignore file with options is ugly too.

@bastelfreak
Copy link
Member Author

It took me some testing, but puppetlabs/puppet-modulebuilder#79 implements it in the gem itself. I think in the acceptance tests we also only build the module itself? I need to check that. I think ideally we can drop support support for parsing pdkignore/pmtignore/gitignore because the specifications define all allowed directories and those are already implemented in the allowlist in puppetlabs/puppet-modulebuilder#79

@bastelfreak
Copy link
Member Author

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.
@bastelfreak
Copy link
Member Author

this works almost. The problem is that we see empty directories:

$ tree puppet-allknowingdns-3.0.2-rc0/
puppet-allknowingdns-3.0.2-rc0/
├── CHANGELOG.md
├── LICENSE
├── manifests
├── metadata.json
├── README.md
├── REFERENCE.md
├── spec
│   ├── acceptance
│   │   └── nodesets
│   ├── classes
│   ├── defines
│   ├── fixtures
│   │   └── manifests
│   ├── functions
│   └── hosts
└── templates

@bastelfreak
Copy link
Member Author

I raised highb/pathspec-ruby#53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants