Skip to content

Migrate to PDK#597

Merged
albertvaka merged 3 commits intomasterfrom
albertvaka/pdk-release
Jan 10, 2020
Merged

Migrate to PDK#597
albertvaka merged 3 commits intomasterfrom
albertvaka/pdk-release

Conversation

@albertvaka
Copy link
Copy Markdown
Contributor

@albertvaka albertvaka commented Jan 9, 2020

Puppet Development Kit (PDK) is the recommended way to build and release Puppet modules.

PDK adds a base set of files to the projects (think skel in the Unix world), which I've tried to respect and merge with the stuff we already had.

Gem dependencies are now grouped under the meta-packages puppet-module-*, although unfortunately this is not available for Ruby 2.2 and earlier, where we still have to list dependencies manually. Also, these meta-packages don't work with unsupported combinations like Ruby 2.6 with Puppet < 6, so I had to remove those from the test matrix.

I haven't enabled the rubocop check since it has lots of offenses, but will do so on a separate PR.

Releases of the module can now be done using pdk build.

@albertvaka albertvaka force-pushed the albertvaka/pdk-release branch 7 times, most recently from f6a2091 to 19451b9 Compare January 9, 2020 22:21
@albertvaka albertvaka force-pushed the albertvaka/pdk-release branch from 19451b9 to 8b3f304 Compare January 10, 2020 10:52
Copy link
Copy Markdown
Member

@truthbk truthbk left a comment

Choose a reason for hiding this comment

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

I don't see anything wrong with this, added a couple of questions, but no objections from me.

Comment thread .rubocop.yml
Style/StringMethods:
Enabled: true
GetText/DecorateFunctionMessage:
Enabled: false
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we've disabled a bunch of stuff here? Are all these necessary? Definitely fine if it is, just wondering.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

PDK adds this file as-is by default. We aren't using it yet, though.

Comment thread Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should probably state somewhere what ruby, puppet version was used to generate the lock file; I guess we could call that the reference platform.

Like we discussed last time, there are so many combinations this was probably why it hadn't been included in the repo in the past.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There is a default in the Gemfile that is used unless a specific version is given. This Gemfile.lock is generated from that default.

Comment thread manifests/init.pp
api_key => $api_key,
hostname => $host,
service_name => $service_name,
service_name => $datadog_agent::params::service_name,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🍰

@albertvaka albertvaka merged commit a38a497 into master Jan 10, 2020
@albertvaka albertvaka deleted the albertvaka/pdk-release branch January 10, 2020 15:56
cegeka-jenkins pushed a commit to cegeka/puppet-datadog_agent that referenced this pull request Apr 6, 2020
Puppet Development Kit (PDK) is the recommended way to build and release Puppet modules.

PDK adds a base set of files to the projects (think skel in the Unix world), which I've tried to respect and merge with the stuff we already had.

Gem dependencies are now grouped under the meta-packages `puppet-module-*`, although unfortunately this is not available for Ruby 2.2 and earlier, where we still have to list dependencies manually. Also, these meta-packages don't work with unsupported combinations like Ruby 2.6 with Puppet < 6, so I had to remove those from the test matrix.

I haven't enabled the rubocop check since it has lots of offenses, but will do so on a separate PR.

Releases of the module can now be done using `pdk build`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants