Showing with 801 additions and 524 deletions.
  1. +13 −0 .fixtures.yml
  2. +1 −0 .gitignore
  3. +0 −31 .nodeset.yml
  4. +1 −0 .pdkignore
  5. +0 −23 .project
  6. +7 −0 .rubocop.yml
  7. +87 −36 .sync.yml
  8. +33 −22 .travis.yml
  9. +10 −0 CHANGELOG.md
  10. +2 −0 CODEOWNERS
  11. +1 −0 Gemfile
  12. +3 −3 REFERENCE.md
  13. +11 −2 Rakefile
  14. +30 −4 appveyor.yml
  15. +25 −0 distelli-manifest.yml
  16. +4 −4 lib/puppet/provider/java_ks/keytool.rb
  17. +3 −3 lib/puppet/type/java_ks.rb
  18. +7 −5 metadata.json
  19. +16 −0 provision.yaml
  20. +14 −0 spec/acceptance/certs/ca.pem
  21. +14 −0 spec/acceptance/certs/ca2.pem
  22. +28 −0 spec/acceptance/certs/chain.pem
  23. +14 −0 spec/acceptance/certs/chain2.pem
  24. BIN spec/acceptance/certs/leaf.p12
  25. +14 −0 spec/acceptance/certs/leaf.pem
  26. BIN spec/acceptance/certs/leaf2.p12
  27. +42 −0 spec/acceptance/certs/leafchain.pem
  28. +28 −0 spec/acceptance/certs/leafchain2.pem
  29. +15 −0 spec/acceptance/certs/leafkey.pem
  30. +15 −0 spec/acceptance/certs/privkey.pem
  31. +29 −30 spec/acceptance/chain_key_spec.rb
  32. +8 −9 spec/acceptance/destkeypass_spec.rb
  33. +18 −18 spec/acceptance/keystore_spec.rb
  34. +0 −10 spec/acceptance/nodesets/centos-7-x64.yml
  35. +0 −10 spec/acceptance/nodesets/debian-8-x64.yml
  36. +0 −18 spec/acceptance/nodesets/default.yml
  37. +0 −12 spec/acceptance/nodesets/docker/centos-7.yml
  38. +0 −11 spec/acceptance/nodesets/docker/debian-8.yml
  39. +0 −12 spec/acceptance/nodesets/docker/ubuntu-14.04.yml
  40. +25 −51 spec/acceptance/pkcs12_spec.rb
  41. +4 −6 spec/acceptance/private_key_spec.rb
  42. +12 −10 spec/acceptance/truststore_spec.rb
  43. +0 −19 spec/acceptance/unsupported_spec.rb
  44. +1 −0 spec/default_facts.yml
  45. +76 −173 spec/spec_helper_acceptance.rb
  46. +188 −0 spec/spec_helper_acceptance_local.rb
  47. +2 −2 spec/unit/puppet/provider/java_ks/keytool_spec.rb
13 changes: 13 additions & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
fixtures:
repositories:
facts: 'git://github.com/puppetlabs/puppetlabs-facts.git'
provision: 'git://github.com/puppetlabs/provision.git'
puppet_agent: 'git://github.com/puppetlabs/puppetlabs-puppet_agent.git'
forge_modules:
chocolatey: "puppetlabs/chocolatey"
java: "puppetlabs/java"
powershell: "puppetlabs/powershell"
registry: "puppetlabs/registry"
stdlib: "puppetlabs/stdlib"
symlinks:
java_ks: "#{source_dir}"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
/convert_report.txt
/update_report.txt
.DS_Store
.project
.envrc
/inventory.yaml
31 changes: 0 additions & 31 deletions .nodeset.yml

This file was deleted.

1 change: 1 addition & 0 deletions .pdkignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
/convert_report.txt
/update_report.txt
.DS_Store
.project
.envrc
/inventory.yaml
/appveyor.yml
Expand Down
23 changes: 0 additions & 23 deletions .project

This file was deleted.

7 changes: 7 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ GetText/DecorateString:
Description: We don't want to decorate test output.
Exclude:
- spec/**/*
Enabled: false
RSpec/BeforeAfterAll:
Description: Beware of using after(:all) as it may cause state to leak between tests.
A necessary evil in acceptance testing.
Expand Down Expand Up @@ -89,6 +90,12 @@ Style/MethodCalledOnDoEndBlock:
Enabled: true
Style/StringMethods:
Enabled: true
GetText/DecorateFunctionMessage:
Enabled: false
GetText/DecorateStringFormattingUsingInterpolation:
Enabled: false
GetText/DecorateStringFormattingUsingPercent:
Enabled: false
Layout/EndOfLine:
Enabled: false
Layout/IndentHeredoc:
Expand Down
123 changes: 87 additions & 36 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,96 @@
---
.gitignore:
required:
- ---.project

.gitlab-ci.yml:
unmanaged: true

.rubocop.yml:
".gitlab-ci.yml":
delete: true
".rubocop.yml":
default_configs:
inherit_from: .rubocop_todo.yml

.travis.yml:
docker_sets:
- set: docker/centos-7
- set: docker/ubuntu-14.04
docker_defaults:
bundler_args: ""
secure: ""
inherit_from: ".rubocop_todo.yml"
".travis.yml":
deploy_to_forge:
enabled: false
simplecov: true
branches:
- release

- release
includes:
-
bundler_args:
dist: trusty
env: PLATFORMS=deb_puppet5
rvm: 2.5.3
before_script:
- bundle exec rake 'litmus:provision_list[travis_deb]'
- bundle exec bolt command run 'apt-get install wget -y' --inventoryfile inventory.yaml --nodes='localhost*'
- bundle exec rake 'litmus:install_agent[puppet5]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
sudo: required
-
bundler_args:
dist: trusty
env: PLATFORMS=deb_puppet6
rvm: 2.5.3
before_script:
- bundle exec rake 'litmus:provision_list[travis_deb]'
- bundle exec bolt command run 'apt-get install wget -y' --inventoryfile inventory.yaml --nodes='localhost*'
- bundle exec rake 'litmus:install_agent[puppet6]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
-
bundler_args:
dist: trusty
env: PLATFORMS=el_puppet5
rvm: 2.5.3
before_script:
- bundle exec rake 'litmus:provision_list[travis_el]'
- bundle exec rake 'litmus:install_agent[puppet5]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
sudo: required
-
bundler_args:
dist: trusty
env: PLATFORMS=el_puppet6
rvm: 2.5.3
before_script:
- bundle exec rake 'litmus:provision_list[travis_el]'
- bundle exec rake 'litmus:install_agent[puppet6]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
sudo: required
appveyor.yml:
spec_type: spec

simplecov: true
use_litmus: true
matrix_extras:
- RUBY_VERSION: 25-x64
ACCEPTANCE: 'yes'
TARGET_HOST: localhost
- RUBY_VERSION: 25-x64
ACCEPTANCE: 'yes'
TARGET_HOST: localhost
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
Gemfile:
required:
':system_tests':
- gem: 'puppet-module-posix-system-r#{minor_version}'
platforms: ruby
- gem: 'puppet-module-win-system-r#{minor_version}'
platforms:
- mswin
- mingw
- x64_mingw
":system_tests":
- gem: puppet-module-posix-system-r#{minor_version}
platforms: ruby
- gem: puppet-module-win-system-r#{minor_version}
platforms:
- mswin
- mingw
- x64_mingw
optional:
':development':
- gem: 'github_changelog_generator'
git: 'https://github.com/skywinder/github-changelog-generator'
ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018'
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')"

":development":
- gem: github_changelog_generator
git: https://github.com/skywinder/github-changelog-generator
ref: 20ee04ba1234e9e83eb2ffb5056e23d641c7a018
condition: Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
spec/spec_helper.rb:
mock_with: ':rspec'
mock_with: ":rspec"
coverage_report: true
55 changes: 33 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,63 @@ before_install:
- gem --version
- bundle -v
script:
- 'bundle exec rake $CHECK'
- 'SIMPLECOV=yes bundle exec rake $CHECK'
bundler_args: --without system_tests
rvm:
- 2.5.3
stages:
- static
- spec
- acceptance
-
if: tag =~ ^v\d
name: deploy
matrix:
fast_finish: true
include:
-
env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
stage: static
-
env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec
rvm: 2.4.5
stage: spec
-
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
rvm: 2.5.3
stage: spec
-
before_script: ["bundle exec rake 'litmus:provision_list[travis_deb]'", "bundle exec bolt command run 'apt-get install wget -y' --inventoryfile inventory.yaml --nodes='localhost*'", "bundle exec rake 'litmus:install_agent[puppet5]'", "bundle exec rake litmus:install_module"]
bundler_args:
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/centos-7 BEAKER_TESTMODE=apply
env: PLATFORMS=deb_puppet5
rvm: 2.5.3
script: bundle exec rake beaker
script: ["bundle exec rake litmus:acceptance:parallel"]
services: docker
stage: acceptance
sudo: required
-
before_script: ["bundle exec rake 'litmus:provision_list[travis_deb]'", "bundle exec bolt command run 'apt-get install wget -y' --inventoryfile inventory.yaml --nodes='localhost*'", "bundle exec rake 'litmus:install_agent[puppet6]'", "bundle exec rake litmus:install_module"]
bundler_args:
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/ubuntu-14.04 BEAKER_TESTMODE=apply
env: PLATFORMS=deb_puppet6
rvm: 2.5.3
script: bundle exec rake beaker
script: ["bundle exec rake litmus:acceptance:parallel"]
services: docker
stage: acceptance
sudo: required
-
env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
stage: static
-
env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec
rvm: 2.4.5
stage: spec
-
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
before_script: ["bundle exec rake 'litmus:provision_list[travis_el]'", "bundle exec rake 'litmus:install_agent[puppet5]'", "bundle exec rake litmus:install_module"]
bundler_args:
dist: trusty
env: PLATFORMS=el_puppet5
rvm: 2.5.3
stage: spec
script: ["bundle exec rake litmus:acceptance:parallel"]
services: docker
sudo: required
-
env: DEPLOY_TO_FORGE=yes
stage: deploy
before_script: ["bundle exec rake 'litmus:provision_list[travis_el]'", "bundle exec rake 'litmus:install_agent[puppet6]'", "bundle exec rake litmus:install_module"]
bundler_args:
dist: trusty
env: PLATFORMS=el_puppet6
rvm: 2.5.3
script: ["bundle exec rake litmus:acceptance:parallel"]
services: docker
sudo: required
branches:
only:
- master
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).

## [v3.1.0](https://github.com/puppetlabs/puppetlabs-java_ks/tree/v3.1.0) (2019-12-09)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-java_ks/compare/v3.0.0...v3.1.0)

### Added

- \(FM-8224\) - Addition of support for CentOS 8 [\#294](https://github.com/puppetlabs/puppetlabs-java_ks/pull/294) ([david22swan](https://github.com/david22swan))
- \(feat\) adding litmus support [\#292](https://github.com/puppetlabs/puppetlabs-java_ks/pull/292) ([tphoney](https://github.com/tphoney))
- pdksync - "Add support on Debian10" [\#288](https://github.com/puppetlabs/puppetlabs-java_ks/pull/288) ([lionce](https://github.com/lionce))

## [v3.0.0](https://github.com/puppetlabs/puppetlabs-java_ks/tree/v3.0.0) (2019-08-20)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-java_ks/compare/2.4.0...v3.0.0)
Expand Down
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Setting ownership to the modules team
* @puppetlabs/modules
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ group :development do
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-posix-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
Expand Down
6 changes: 3 additions & 3 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Valid values: present, absent, latest
Has three states: present, absent, and latest. Latest
will compare the on disk SHA1 fingerprint of the certificate to that
in keytool to determine if insync? returns true or false. We redefine
insync? for this paramerter to accomplish this.
insync? for this parameter to accomplish this.

Default value: present

Expand Down Expand Up @@ -75,10 +75,10 @@ All certificates will be placed in the keystore. This will autorequire the spec

##### `storetype`

Valid values: jceks, pkcs12
Valid values: jceks, pkcs12, jks

Optional storetype
Valid options: <jceks>, <pkcs12>
Valid options: <jceks>, <pkcs12>, <jks>

##### `private_key`

Expand Down
13 changes: 11 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@ end

def changelog_project
return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = nil || JSON.load(File.read('metadata.json'))['source'].match(%r{.*/([^/]*)})[1]
raise "unable to find the changelog_project in .sync.yml or the name in metadata.json" if returnVal.nil?

returnVal = nil
returnVal ||= begin
metadata_source = JSON.load(File.read('metadata.json'))['source']
metadata_source_match = metadata_source && metadata_source.match(%r{.*\/([^\/]*?)(?:\.git)?\Z})

metadata_source_match && metadata_source_match[1]
end

raise "unable to find the changelog_project in .sync.yml or calculate it from the source in metadata.json" if returnVal.nil?

puts "GitHubChangelogGenerator project:#{returnVal}"
returnVal
end
Expand Down
Loading