edestecd / puppet-software

Puppet Module to install various Desktop Software
GNU General Public License v3.0
8 stars 7 forks source link

Enable PDK (validation, testing) #15

Closed bittner closed 6 years ago

bittner commented 6 years ago

As mentioned in #9, a few changes can make it possible to use Puppet's new PDK with this module.

I've also fixed the linter complaints pdk validate has reported.

bittner commented 6 years ago

The Travis configuration now uses the PDK commands and the beautiful Travis build stages feature for enhanced readability.

We could specify a list of Rubys or RVMs in addition for running a build matrix, e.g.

rvm:
  - 2.3
  - 2.4

More details in the related docs.

You probably know better what would be sensible to test against.

bittner commented 6 years ago

Note that PR #16 contains changes that will conflict with this PR.

Specifically, the RSpec tests for Skype require the old hash rocket syntax and no trailing comma after the last item in the with clause. This should could be changed when merging to:

          it {
            is_expected.to contain_apt__source('skype-stable')
              .with(
                location: 'https://repo.skype.com/deb',
                release: 'stable',
                repos: 'main',
                architecture: 'amd64',
              )
          }
bittner commented 6 years ago

This PR is now ready for merging.

bittner commented 6 years ago

@edestecd Any chance of getting this merged?

bittner commented 6 years ago

:bell: ping!

Please merge!

bittner commented 6 years ago

@edestecd Any chance to get this merged?

edestecd commented 6 years ago

@bittner Sorry, thanks for bugging me about it. This module needs some serious love. I finally got around to learning PDK and converted some of our modules already. Can you use a newer version of PDK and use pdk convert: https://puppet.com/docs/pdk/1.x/pdk_reference.html#pdk-convert-command

PDK version 1.4.1 or 1.5.0 will do. I think my other modules are pinned at 1.4.1, so thats probably best: https://github.com/edestecd/puppet-mariadb/blob/master/metadata.json#L74

Also can you use this .sync.yml? https://github.com/edestecd/puppet-mariadb/blob/master/.sync.yml Put it in prior to running pdk convert to get our preferred template settings. I'll update the secure password for puppetforge after its merged.

bittner commented 6 years ago

I don't have access to the comsolit repository anymore (stopped working with that client). It would be easier for me if you could merge the PR "as is", and we deal with refactoring things afterwards. I believe the build should still pass.

edestecd commented 6 years ago

I was going to say whats the point, b/c the new PDK will replace all the files you edited.... But you did fix the -> ordering statements in quite a few classes and there is value to that.

I will probably merge this then and add the new PDK convert after.

edestecd commented 6 years ago

@bittner thanks for your contribution and pestering me to get this in.

edestecd commented 6 years ago

If you want to do the PDK convert also, let me know and i'll wait

bittner commented 6 years ago

If you want to do the PDK convert also, let me know and i'll wait

No, go on with the merging. Thank you!

bittner commented 6 years ago

Thank you! :+1:

bittner commented 6 years ago

The build on master fails now related to Windows tooling, if I'm not totally mistaken:

Could not find class ::chocolatey

Not sure what's going on. :confused:

edestecd commented 6 years ago

I'll look in a bit. I'm going to update pdk in a few.

bittner commented 6 years ago

Could it be that chocolately needs to be added to the .fixtures.yml?

edestecd commented 6 years ago

more than likely

edestecd commented 6 years ago

Whew, there were a lot of windows issues I had to fix. I suspect the tests were not actually running against windows before. Probably the facts gem did not contain facts for the versions of windows specified in out metadata.json. Anyways its all fixed up now.