Showing with 606 additions and 346 deletions.
  1. +3 −0 .fixtures.yml
  2. +6 −2 .rubocop.yml
  3. +3 −19 .sync.yml
  4. +101 −15 .travis.yml
  5. +6 −0 .vscode/extensions.json
  6. +14 −0 CHANGELOG.md
  7. +14 −16 Gemfile
  8. +1 −1 README.md
  9. +12 −2 Rakefile
  10. +25 −0 distelli-manifest.yml
  11. +9 −4 manifests/config/context.pp
  12. +7 −3 manifests/config/context/environment.pp
  13. +7 −3 manifests/config/context/manager.pp
  14. +7 −3 manifests/config/context/resource.pp
  15. +7 −3 manifests/config/context/resourcelink.pp
  16. +7 −3 manifests/config/context/valve.pp
  17. +7 −3 manifests/config/server.pp
  18. +7 −3 manifests/config/server/connector.pp
  19. +7 −3 manifests/config/server/context.pp
  20. +7 −3 manifests/config/server/engine.pp
  21. +12 −7 manifests/config/server/globalnamingresource.pp
  22. +7 −3 manifests/config/server/host.pp
  23. +7 −3 manifests/config/server/listener.pp
  24. +7 −3 manifests/config/server/realm.pp
  25. +7 −3 manifests/config/server/service.pp
  26. +7 −3 manifests/config/server/tomcat_users.pp
  27. +7 −3 manifests/config/server/valve.pp
  28. +8 −6 metadata.json
  29. +19 −0 provision.yaml
  30. +20 −16 spec/acceptance/acceptance_1b_spec.rb
  31. +25 −17 spec/acceptance/acceptance_2b_spec.rb
  32. +24 −20 spec/acceptance/acceptance_3b_spec.rb
  33. +7 −7 spec/acceptance/acceptance_4b_spec.rb
  34. +0 −10 spec/acceptance/nodesets/centos-7-x64.yml
  35. +0 −10 spec/acceptance/nodesets/debian-8-x64.yml
  36. +0 −10 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. +13 −16 spec/acceptance/readme_spec.rb
  41. +7 −0 spec/spec_helper.rb
  42. +74 −88 spec/spec_helper_acceptance.rb
  43. +98 −0 spec/spec_helper_acceptance_local.rb
3 changes: 3 additions & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ fixtures:
concat: "https://github.com/puppetlabs/puppetlabs-concat.git"
archive: "https://github.com/voxpupuli/puppet-archive.git"
augeas_core: "https://github.com/puppetlabs/puppetlabs-augeas_core.git"
facts: 'git://github.com/puppetlabs/puppetlabs-facts.git'
puppet_agent: 'git://github.com/puppetlabs/puppetlabs-puppet_agent.git'
provision: 'git://github.com/puppetlabs/provision.git'

symlinks:
tomcat: "#{source_dir}"
8 changes: 6 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
require: rubocop-rspec
require:
- rubocop-rspec
- rubocop-i18n
AllCops:
DisplayCopNames: true
TargetRubyVersion: '2.1'
Expand All @@ -19,10 +21,12 @@ AllCops:
Metrics/LineLength:
Description: People have wide screens, use them.
Max: 200
GetText:
Enabled: false
GetText/DecorateString:
Description: We don't want to decorate test output.
Exclude:
- spec/*
- spec/**/*
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
22 changes: 3 additions & 19 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,20 @@
unmanaged: true

.travis.yml:
docker_sets:
- set: docker/centos-7
- set: docker/ubuntu-14.04
docker_defaults:
bundler_args: ""
secure: ""
branches:
- release
unmanaged: true

appveyor.yml:
delete: true

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
- gem: rspec-retry
require: false
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')"
- gem: 'rspec-retry'
require: false

spec/spec_helper.rb:
mock_with: ':rspec'
Expand Down
116 changes: 101 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
dist: xenial
language: ruby
cache: bundler
before_install:
Expand All @@ -23,23 +24,117 @@ matrix:
fast_finish: true
include:
-
bundler_args:
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=debian_puppet5
rvm: 2.5.3
script: bundle exec rake beaker
before_script:
- bundle exec rake 'litmus:provision_list[travis_debian]'
- bundle exec rake 'litmus:install_agent[puppet5]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
sudo: required
stage: acceptance
-
bundler_args:
dist: trusty
env: PLATFORMS=debian_puppet6
rvm: 2.5.3
before_script:
- bundle exec rake 'litmus:provision_list[travis_debian]'
- bundle exec rake 'litmus:install_agent[puppet6]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
sudo: required
stage: acceptance
-
bundler_args:
dist: trusty
env: PLATFORMS=ubuntu_puppet5
rvm: 2.5.3
before_script:
- bundle exec rake 'litmus:provision_list[travis_ubuntu]'
- bundle exec rake 'litmus:install_agent[puppet5]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
sudo: required
stage: acceptance
-
bundler_args:
dist: trusty
env: PLATFORMS=ubuntu_puppet6
rvm: 2.5.3
before_script:
- bundle exec rake 'litmus:provision_list[travis_ubuntu]'
- bundle exec rake 'litmus:install_agent[puppet6]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
sudo: required
stage: acceptance
-
bundler_args:
dist: trusty
env: PLATFORMS=el6_puppet5
rvm: 2.5.3
before_script:
- bundle exec rake 'litmus:provision_list[travis_el6]'
- bundle exec rake 'litmus:install_agent[puppet5]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
sudo: required
stage: acceptance
-
bundler_args:
dist: trusty
env: PLATFORMS=el6_puppet6
rvm: 2.5.3
before_script:
- bundle exec rake 'litmus:provision_list[travis_el6]'
- bundle exec rake 'litmus:install_agent'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
sudo: required
stage: acceptance
-
bundler_args:
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=el7_puppet5
rvm: 2.5.3
script: bundle exec rake beaker
before_script:
- bundle exec rake 'litmus:provision_list[travis_el7]'
- bundle exec rake 'litmus:install_agent[puppet5]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
sudo: required
stage: acceptance
-
bundler_args:
dist: trusty
env: PLATFORMS=el7_puppet6
rvm: 2.5.3
before_script:
- bundle exec rake 'litmus:provision_list[travis_el7]'
- bundle exec rake 'litmus:install_agent'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
sudo: required
stage: acceptance
-
env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
stage: static
Expand All @@ -61,12 +156,3 @@ branches:
- release
notifications:
email: false
deploy:
provider: puppetforge
user: puppet
password:
secure: ""
on:
tags: true
all_branches: true
condition: "$DEPLOY_TO_FORGE = yes"
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"jpogran.puppet-vscode",
"rebornix.Ruby"
]
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

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-tomcat/tree/v3.1.0) (2019-09-13)

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

### Added

- FM-8413 add support on Debian10 [\#361](https://github.com/puppetlabs/puppetlabs-tomcat/pull/361) ([lionce](https://github.com/lionce))
- \(FM-8232\) Convert to litmus [\#360](https://github.com/puppetlabs/puppetlabs-tomcat/pull/360) ([tphoney](https://github.com/tphoney))
- FM-8050 - add redhat8 support [\#354](https://github.com/puppetlabs/puppetlabs-tomcat/pull/354) ([lionce](https://github.com/lionce))

### Fixed

- add show diff to all augeas calls [\#322](https://github.com/puppetlabs/puppetlabs-tomcat/pull/322) ([johmicd](https://github.com/johmicd))

## [v3.0.0](https://github.com/puppetlabs/puppetlabs-tomcat/tree/v3.0.0) (2019-05-17)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-tomcat/compare/2.5.0...v3.0.0)
Expand Down
30 changes: 14 additions & 16 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,21 @@ end
ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = ruby_version_segments[0..1].join('.')


group :development do
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
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 "puppet-module-posix-default-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "github_changelog_generator", require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
end
group :system_tests do
gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-win-system-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "rspec-retry", require: false
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
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]
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "github_changelog_generator", require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
gem "rspec-retry", require: false
end

puppet_version = ENV['PUPPET_GEM_VERSION']
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ Puppet Labs modules on the Puppet Forge are open projects, and community contrib

We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.

For more information, see our [module contribution guide.](https://docs.puppetlabs.com/forge/contributing.html)
For more information, see our [module contribution guide.](https://puppet.com/docs/puppet/latest/contributing.html)

### Contributors

Expand Down
14 changes: 12 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-syntax/tasks/puppet-syntax'
require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
Expand All @@ -14,8 +15,17 @@ end

def changelog_project
return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = nil || JSON.load(File.read('metadata.json'))['name']
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
25 changes: 25 additions & 0 deletions distelli-manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
team-modules/puppetlabs-tomcat:
PreBuild:
- source /opt/rh/rh-ruby25/enable
- echo "--- LETS update BUNDLER ---"
- bundle install --path vendor/bundle --jobs 3
Build:
- echo "--- PROVISIONING ---"
- source /opt/rh/rh-ruby25/enable
- bundle exec rake 'litmus:provision_list[release_checks]'
- cat inventory.yaml
- echo "--- AGENT INSTALLATION ---"
- bundle exec rake 'litmus:install_agent'
- echo "--- MODULE INSTALLATION ---"
- bundle exec rake 'litmus:install_module'
- echo "--- TESTS RUNNING ---"
- bundle exec rake 'litmus:acceptance:parallel'
AfterBuildSuccess:
- source /opt/rh/rh-ruby25/enable
- bundle exec rake litmus:tear_down
AfterBuildFailure:
- source /opt/rh/rh-ruby25/enable
- bundle exec rake litmus:tear_down
CommitData:
- RepoType: Git
- RepoPath: .
13 changes: 9 additions & 4 deletions manifests/config/context.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
#
# @param catalina_base
# Specifies the root of the Tomcat installation.
# @param show_diff
# Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
#
define tomcat::config::context (
$catalina_base = undef,
$catalina_base = undef,
Boolean $show_diff = true,
) {
include ::tomcat
$_catalina_base = pick($catalina_base, $::tomcat::catalina_home)
Expand All @@ -20,9 +23,11 @@

if ! empty($changes) {
augeas { "context-${_catalina_base}":
lens => 'Xml.lns',
incl => "${_catalina_base}/conf/context.xml",
changes => $changes,
lens => 'Xml.lns',
incl => "${_catalina_base}/conf/context.xml",
changes => $changes,
show_diff => $show_diff,

}
}
}
Loading