From d0041b07a760c3c461ae1eeee481ed9b0e7e16be Mon Sep 17 00:00:00 2001 From: "Aguiar, Valentino" Date: Fri, 22 Apr 2022 09:01:05 +0100 Subject: [PATCH 01/36] Compare if statement for service desk v software --- templates/setenv.sh.epp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/setenv.sh.epp b/templates/setenv.sh.epp index 5c724d27..271be6c2 100755 --- a/templates/setenv.sh.epp +++ b/templates/setenv.sh.epp @@ -38,7 +38,7 @@ JVM_CODE_CACHE_ARGS='<%= pick_default($jira::jvm_code_cache_args, $jira::config: # # The following are the required arguments for Jira. # -<%- if versioncmp($jira::version, '8.11.0') > 0 { -%> +<%- if ($jira::product != "servicedesk" and versioncmp($jira::version, '8.11.0') > 0) or ($jira::product == "servicedesk" and (versioncmp($jira::version, '4.11.0') > 0)){ -%> JVM_REQUIRED_ARGS='-Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Dorg.dom4j.factory=com.atlassian.core.xml.InterningDocumentFactory' <% } else { -%> JVM_REQUIRED_ARGS='-Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true' From 4604845072bc822fd8edc13a59edcdcf4a0d5b7d Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 28 Apr 2023 14:01:25 +0200 Subject: [PATCH 02/36] Drop Puppet 6 support --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index ee7ace98..7f7e60f2 100644 --- a/metadata.json +++ b/metadata.json @@ -28,7 +28,7 @@ "requirements": [ { "name": "puppet", - "version_requirement": ">= 6.1.0 < 8.0.0" + "version_requirement": ">= 7.0.0 < 8.0.0" } ], "operatingsystem_support": [ From c6a4ae2d8ad0fe1338ea85c881a633c078fb8062 Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 18 Sep 2021 00:07:46 +0200 Subject: [PATCH 03/36] modulesync 4.2.0 --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1dadbe82..c314f01f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,10 @@ name: CI on: pull_request +concurrency: + group: ${{ github.head_ref }} + cancel-in-progress: true + jobs: setup_matrix: name: 'Setup Test Matrix' From 779cdcb9db784c199a29782ab23423a290a28cd6 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 15 Dec 2021 20:28:31 +0100 Subject: [PATCH 04/36] modulesync 5.1.0 --- .msync.yml | 2 +- .puppet-lint.rc | 3 +++ Gemfile | 4 ++-- Rakefile | 2 +- spec/spec_helper.rb | 10 +++++----- 5 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 .puppet-lint.rc diff --git a/.msync.yml b/.msync.yml index 43966c2f..a83abd9b 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '4.2.0' +modulesync_config_version: '5.1.0' diff --git a/.puppet-lint.rc b/.puppet-lint.rc new file mode 100644 index 00000000..dd8272c7 --- /dev/null +++ b/.puppet-lint.rc @@ -0,0 +1,3 @@ +--fail-on-warnings +--no-parameter_documentation-check +--no-parameter_types-check diff --git a/Gemfile b/Gemfile index e43173e0..113a3614 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source ENV['GEM_SOURCE'] || "https://rubygems.org" group :test do - gem 'voxpupuli-test', '~> 2.5', :require => false + gem 'voxpupuli-test', '~> 5.0', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false gem 'puppet_metadata', '~> 1.0', :require => false @@ -22,7 +22,7 @@ end group :release do gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5' - gem 'voxpupuli-release', '>= 1.0.2', :require => false + gem 'voxpupuli-release', '>= 1.2.0', :require => false gem 'puppet-strings', '>= 2.2', :require => false end diff --git a/Rakefile b/Rakefile index 80b799d6..f92f0516 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,7 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -# Attempt to load voxupuli-test (which pulls in puppetlabs_spec_helper), +# Attempt to load voxpupuli-test (which pulls in puppetlabs_spec_helper), # otherwise attempt to load it directly. begin require 'voxpupuli/test/rake' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 57a70076..8bbf1e62 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,18 +1,18 @@ +# frozen_string_literal: true + # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ # puppetlabs_spec_helper will set up coverage if the env variable is set. # We want to do this if lib exists and it hasn't been explicitly set. -ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../../lib', __FILE__)) +ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../lib', __dir__)) require 'voxpupuli/test/spec_helper' if File.exist?(File.join(__dir__, 'default_module_facts.yml')) facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml'))) - if facts - facts.each do |name, value| - add_custom_fact name.to_sym, value - end + facts&.each do |name, value| + add_custom_fact name.to_sym, value end end From 489c60703ee387261a4abfcf8fea585786efd4ac Mon Sep 17 00:00:00 2001 From: Christos Papageorgiou Date: Mon, 4 Apr 2022 18:06:18 +0300 Subject: [PATCH 05/36] modulesync 5.2.0 --- .github/CONTRIBUTING.md | 7 +++---- .github/workflows/ci.yml | 3 ++- .github/workflows/release.yml | 32 ++++++++++---------------------- .msync.yml | 2 +- Dockerfile | 2 +- Gemfile | 2 +- 6 files changed, 18 insertions(+), 30 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 048d2b55..25743a13 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -124,7 +124,7 @@ If you have Ruby 2.x or want a specific version of Puppet, you must set an environment variable such as: ```sh -export PUPPET_VERSION="~> 5.5.6" +export PUPPET_GEM_VERSION="~> 5.5.6" ``` You can install all needed gems for spec tests into the modules directory by @@ -232,17 +232,16 @@ simple tests against it after applying the module. You can run this with: ```sh -BEAKER_setfile=debian10-x64 bundle exec rake beaker +BEAKER_setfile=debian11-64 bundle exec rake beaker ``` You can replace the string `debian10` with any common operating system. The following strings are known to work: -* ubuntu1604 * ubuntu1804 * ubuntu2004 -* debian9 * debian10 +* debian11 * centos7 * centos8 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c314f01f..0fb5a04c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ name: CI on: pull_request concurrency: - group: ${{ github.head_ref }} + group: ${{ github.ref_name }} cancel-in-progress: true jobs: @@ -90,3 +90,4 @@ jobs: name: Test suite steps: - run: echo Test suite completed + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 664ba694..15f17213 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,26 +9,14 @@ on: tags: - '*' -env: - BUNDLE_WITHOUT: development:test:system_tests - jobs: - deploy: - name: 'deploy to forge' - runs-on: ubuntu-latest - if: github.repository_owner == 'voxpupuli' - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: '2.7' - bundler-cache: true - - name: Build and Deploy - env: - # Configure secrets here: - # https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets - BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}' - BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}' - run: bundle exec rake module:push + release: + name: Release + uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v1 + with: + allowed_owner: 'voxpupuli' + secrets: + # Configure secrets here: + # https://docs.github.com/en/actions/security-guides/encrypted-secrets + username: ${{ secrets.PUPPET_FORGE_USERNAME }} + api_key: ${{ secrets.PUPPET_FORGE_API_KEY }} diff --git a/.msync.yml b/.msync.yml index a83abd9b..968a9367 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '5.1.0' +modulesync_config_version: '5.2.0' diff --git a/Dockerfile b/Dockerfile index e3cf307f..8dd82d63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /opt/puppet # https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39 RUN mkdir -p /etc/sv -ARG PUPPET_VERSION="~> 6.0" +ARG PUPPET_GEM_VERSION="~> 6.0" ARG PARALLEL_TEST_PROCESSORS=4 # Cache gems diff --git a/Gemfile b/Gemfile index 113a3614..4ae6fa14 100644 --- a/Gemfile +++ b/Gemfile @@ -29,7 +29,7 @@ end gem 'rake', :require => false gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test] -puppetversion = ENV['PUPPET_VERSION'] || '>= 6.0' +puppetversion = ENV['PUPPET_GEM_VERSION'] || '>= 6.0' gem 'puppet', puppetversion, :require => false, :groups => [:test] # vim: syntax=ruby From 3c1485e6484d0eab4d01ce5b2a932cdd3225ea27 Mon Sep 17 00:00:00 2001 From: Christos Papageorgiou Date: Mon, 4 Apr 2022 18:07:46 +0300 Subject: [PATCH 06/36] rubocop:auto_correct --- spec/acceptance/default_parameters_spec.rb | 4 +- spec/acceptance/mysql_spec.rb | 4 +- spec/classes/jira_config_spec.rb | 48 +++++++---- spec/classes/jira_init_spec.rb | 4 +- spec/classes/jira_install_spec.rb | 88 +++++++++++---------- spec/classes/jira_mysql_connector_spec.rb | 29 ++++--- spec/classes/jira_service_spec.rb | 6 +- spec/classes/jira_sso_spec.rb | 8 +- spec/classes/jira_upgrade_spec.rb | 6 +- spec/spec_helper.rb | 2 +- spec/spec_helper_acceptance.rb | 2 + spec/support/acceptance/constants.rb | 28 ++++--- spec/type_aliases/jvm_types_spec.rb | 2 + spec/type_aliases/tomcat_attributes_spec.rb | 2 + spec/type_aliases/tomcat_connectors_spec.rb | 2 + 15 files changed, 149 insertions(+), 86 deletions(-) diff --git a/spec/acceptance/default_parameters_spec.rb b/spec/acceptance/default_parameters_spec.rb index a7d02f98..816d9bf7 100644 --- a/spec/acceptance/default_parameters_spec.rb +++ b/spec/acceptance/default_parameters_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper_acceptance' describe 'jira postgresql' do @@ -45,7 +47,7 @@ class { 'jira': EOS # jira just takes *ages* to start up :-( - WGET_CMD = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 localhost:8080'.freeze + WGET_CMD = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 localhost:8080' apply_manifest(pp, catch_failures: true) sleep 60 shell WGET_CMD, acceptable_exit_codes: [0, 8] diff --git a/spec/acceptance/mysql_spec.rb b/spec/acceptance/mysql_spec.rb index 88859118..cfe88118 100644 --- a/spec/acceptance/mysql_spec.rb +++ b/spec/acceptance/mysql_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper_acceptance' describe 'jira mysql' do @@ -60,7 +62,7 @@ class { 'jira': } EOS - WGET_CMD = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 --no-check-certificate localhost:8081'.freeze + WGET_CMD = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 --no-check-certificate localhost:8081' apply_manifest(pp, catch_failures: true) sleep 60 shell WGET_CMD, acceptable_exit_codes: [0, 8] diff --git a/spec/classes/jira_config_spec.rb b/spec/classes/jira_config_spec.rb index 3f909485..d7c1d000 100644 --- a/spec/classes/jira_config_spec.rb +++ b/spec/classes/jira_config_spec.rb @@ -1,11 +1,13 @@ -require 'spec_helper.rb' +# frozen_string_literal: true + +require 'spec_helper' # set some constants to keep it DRY -REGEXP_DISABLE_NOTIFICATIONS = %r{#DISABLE_NOTIFICATIONS=} -REGEXP_POSTGRESQL_URL = %r{jdbc:postgresql://localhost:5432/jira} -REGEXP_PUBLIC_SCHEMA = %r{public} -HTTP11 = 'HTTP/1.1'.freeze -PLUGIN_SOURCE_URL = 'https://www.example.com/fine-jira-plugin.tgz'.freeze +REGEXP_DISABLE_NOTIFICATIONS = %r{#DISABLE_NOTIFICATIONS=}.freeze +REGEXP_POSTGRESQL_URL = %r{jdbc:postgresql://localhost:5432/jira}.freeze +REGEXP_PUBLIC_SCHEMA = %r{public}.freeze +HTTP11 = 'HTTP/1.1' +PLUGIN_SOURCE_URL = 'https://www.example.com/fine-jira-plugin.tgz' describe 'jira' do describe 'jira::config' do let(:params) do @@ -24,13 +26,17 @@ context 'default params' do it { is_expected.to compile.with_all_deps } + it do is_expected.to contain_file(FILENAME_SETENV_SH). with_content(REGEXP_DISABLE_NOTIFICATIONS) end + it { is_expected.to contain_file(FILENAME_USER_SH) } it { is_expected.to contain_file(FILENAME_SERVER_XML) } + # Also ensure that we actually omit elements by default + it do is_expected.to contain_file(FILENAME_DBCONFIG_XML). with_content(REGEXP_POSTGRESQL_URL). @@ -48,6 +54,7 @@ with_content(%r{select version\(\);}). with_content(%r{tcpKeepAlive=true;socketTimeout=240}) end + it { is_expected.not_to contain_file(FILENAME_CLUSTER_PROPS) } it { is_expected.not_to contain_file(FILENAME_CHECK_JAVA_SH) } end @@ -75,6 +82,7 @@ it { is_expected.to compile.with_all_deps } it { is_expected.to contain_package('java-11-openjdk-headless') } + it do is_expected.to contain_file(FILENAME_DBCONFIG_XML). with_content(%r{select 1}). @@ -96,6 +104,7 @@ it { is_expected.to contain_file(FILENAME_SETENV_SH) } it { is_expected.to contain_file(FILENAME_USER_SH) } it { is_expected.to contain_file(FILENAME_SERVER_XML) } + it do is_expected.to contain_file(FILENAME_DBCONFIG_XML). with_content(%r{TEST-SETTING;}). @@ -115,6 +124,7 @@ it { is_expected.to contain_file(FILENAME_SETENV_SH) } it { is_expected.to contain_file(FILENAME_USER_SH) } it { is_expected.to contain_file(FILENAME_SERVER_XML) } + it do is_expected.to contain_file(FILENAME_DBCONFIG_XML). with_content(%r{jdbc:mysql://localhost:3306/jira}) @@ -273,6 +283,7 @@ it { is_expected.to contain_file(FILENAME_SETENV_SH) } it { is_expected.to contain_file(FILENAME_USER_SH) } it { is_expected.to contain_file(FILENAME_SERVER_XML) } + it do is_expected.to contain_file(FILENAME_DBCONFIG_XML). with_content(REGEXP_PUBLIC_SCHEMA) @@ -301,7 +312,7 @@ it do is_expected.to contain_file(FILENAME_SERVER_XML). - with_content(%r{ 'https', + 'scheme' => 'https', 'proxyName' => 'www.example.com', 'proxyPort' => '9999' } @@ -539,7 +550,7 @@ let(:params) do super().merge( proxy: { - 'scheme' => 'https', + 'scheme' => 'https', 'proxyName' => 'www.example.com', 'proxyPort' => '9999' }, @@ -561,7 +572,7 @@ let(:params) do super().merge( ajp: { - 'port' => '8009', + 'port' => '8009', 'protocol' => 'AJP/1.3' } ) @@ -572,11 +583,12 @@ with_content(%r{}) end end + context 'with valid config including protocol org.apache.coyote.ajp.AjpNioProtocol' do let(:params) do super().merge( ajp: { - 'port' => '8009', + 'port' => '8009', 'protocol' => 'org.apache.coyote.ajp.AjpNioProtocol' } ) @@ -837,21 +849,25 @@ end it { is_expected.to compile.with_all_deps } + it do is_expected.to contain_file(FILENAME_SETENV_SH). with_content(REGEXP_DISABLE_NOTIFICATIONS). with_content(%r{JVM_SUPPORT_RECOMMENDED_ARGS=''}). - with_content(%r{JVM_GC_ARGS='.+ \-XX:\+ExplicitGCInvokesConcurrent}). + with_content(%r{JVM_GC_ARGS='.+ -XX:\+ExplicitGCInvokesConcurrent}). with_content(%r{JVM_CODE_CACHE_ARGS='\S+InitialCodeCacheSize=32m \S+ReservedCodeCacheSize=512m}). with_content(%r{JVM_REQUIRED_ARGS='.+InterningDocumentFactory}) end + it { is_expected.to contain_file(FILENAME_USER_SH) } it { is_expected.to contain_file(FILENAME_SERVER_XML) } + it do is_expected.to contain_file(FILENAME_DBCONFIG_XML). with_content(REGEXP_POSTGRESQL_URL). with_content(REGEXP_PUBLIC_SCHEMA) end + it { is_expected.not_to contain_file(FILENAME_CLUSTER_PROPS) } it { is_expected.not_to contain_file(FILENAME_CHECK_JAVA_SH) } end @@ -867,6 +883,7 @@ end it { is_expected.to compile.with_all_deps } + it do is_expected.to contain_file(FILENAME_SETENV_SH). with_content(REGEXP_DISABLE_NOTIFICATIONS). @@ -875,13 +892,16 @@ with_content(%r{JVM_CODE_CACHE_ARGS=\S+TEST_CODECACHE}). with_content(%r{JVM_EXTRA_ARGS=\S+TEST_EXTRA}) end + it { is_expected.to contain_file(FILENAME_USER_SH) } it { is_expected.to contain_file(FILENAME_SERVER_XML) } + it do is_expected.to contain_file(FILENAME_DBCONFIG_XML). with_content(REGEXP_POSTGRESQL_URL). with_content(REGEXP_PUBLIC_SCHEMA) end + it { is_expected.not_to contain_file(FILENAME_CLUSTER_PROPS) } it { is_expected.not_to contain_file(FILENAME_CHECK_JAVA_SH) } end diff --git a/spec/classes/jira_init_spec.rb b/spec/classes/jira_init_spec.rb index 7abae5b2..6a7599de 100644 --- a/spec/classes/jira_init_spec.rb +++ b/spec/classes/jira_init_spec.rb @@ -1,4 +1,6 @@ -require 'spec_helper.rb' +# frozen_string_literal: true + +require 'spec_helper' describe 'jira' do describe 'jira::init' do diff --git a/spec/classes/jira_install_spec.rb b/spec/classes/jira_install_spec.rb index 2438bddd..aa6cb488 100644 --- a/spec/classes/jira_install_spec.rb +++ b/spec/classes/jira_install_spec.rb @@ -1,7 +1,9 @@ -require 'spec_helper.rb' +# frozen_string_literal: true + +require 'spec_helper' # set some constants to keep it DRY -DOWNLOAD_URL = 'https://product-downloads.atlassian.com/software/jira/downloads'.freeze +DOWNLOAD_URL = 'https://product-downloads.atlassian.com/software/jira/downloads' describe 'jira' do describe 'jira::install' do @@ -24,9 +26,9 @@ context 'default params' do let(:params) do super().merge( - user: 'jira', - group: 'jira', - homedir: '/home/jira', + user: 'jira', + group: 'jira', + homedir: '/home/jira', download_url: DOWNLOAD_URL ) end @@ -34,13 +36,14 @@ it { is_expected.to compile.with_all_deps } it { is_expected.to contain_group('jira') } it { is_expected.to contain_user('jira').with_shell('/bin/true') } + it "deploys jira #{DEFAULT_VERSION} from tar.gz" do is_expected.to contain_archive("/tmp/#{PRODUCT_VERSION_STRING}.tar.gz"). - with('extract_path' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone", - 'source' => "#{DOWNLOAD_URL}/#{PRODUCT_VERSION_STRING}.tar.gz", - 'creates' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone/conf", - 'user' => 'jira', - 'group' => 'jira', + with('extract_path' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone", + 'source' => "#{DOWNLOAD_URL}/#{PRODUCT_VERSION_STRING}.tar.gz", + 'creates' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone/conf", + 'user' => 'jira', + 'group' => 'jira', 'checksum_type' => 'md5') end @@ -61,11 +64,11 @@ it "deploys jira #{DEFAULT_VERSION} from tar.gz" do is_expected.to contain_archive("/tmp/#{PRODUCT_VERSION_STRING}.tar.gz"). - with('extract_path' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone", - 'source' => "#{DOWNLOAD_URL}/#{PRODUCT_VERSION_STRING}.tar.gz", - 'creates' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone/conf", - 'user' => 'jira', - 'group' => 'jira', + with('extract_path' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone", + 'source' => "#{DOWNLOAD_URL}/#{PRODUCT_VERSION_STRING}.tar.gz", + 'creates' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone/conf", + 'user' => 'jira', + 'group' => 'jira', 'checksum_type' => 'md5') end end @@ -73,18 +76,18 @@ context 'core product' do let(:params) do super().merge( - product: 'jira-core', + product: 'jira-core', download_url: DOWNLOAD_URL ) end it "deploys jira #{DEFAULT_VERSION} from tar.gz" do is_expected.to contain_archive("/tmp/#{PRODUCT_VERSION_STRING_CORE}.tar.gz"). - with('extract_path' => "/opt/jira/#{PRODUCT_VERSION_STRING_CORE}-standalone", - 'source' => "#{DOWNLOAD_URL}/#{PRODUCT_VERSION_STRING_CORE}.tar.gz", - 'creates' => "/opt/jira/#{PRODUCT_VERSION_STRING_CORE}-standalone/conf", - 'user' => 'jira', - 'group' => 'jira', + with('extract_path' => "/opt/jira/#{PRODUCT_VERSION_STRING_CORE}-standalone", + 'source' => "#{DOWNLOAD_URL}/#{PRODUCT_VERSION_STRING_CORE}.tar.gz", + 'creates' => "/opt/jira/#{PRODUCT_VERSION_STRING_CORE}-standalone/conf", + 'user' => 'jira', + 'group' => 'jira', 'checksum_type' => 'md5') end end @@ -97,11 +100,11 @@ ) end let(:pre_condition) do - <<-PRE -user {'jira': - comment => 'My Personal Managed Account', -} -group {'jira':} + <<~PRE + user {'jira': + comment => 'My Personal Managed Account', + } + group {'jira':} PRE end @@ -112,38 +115,39 @@ context 'overwriting params' do let(:params) do super().merge( - homedir: '/random/homedir', - user: 'foo', - group: 'bar', - uid: 333, - gid: 444, - shell: '/bin/bash', + homedir: '/random/homedir', + user: 'foo', + group: 'bar', + uid: 333, + gid: 444, + shell: '/bin/bash', download_url: DOWNLOAD_URL ) end it do - is_expected.to contain_user('foo').with('home' => '/random/homedir', + is_expected.to contain_user('foo').with('home' => '/random/homedir', 'shell' => '/bin/bash', - 'uid' => 333, - 'gid' => 444) + 'uid' => 333, + 'gid' => 444) end + it { is_expected.to contain_group('bar') } it "deploys jira #{DEFAULT_VERSION} from tar.gz" do is_expected.to contain_archive("/tmp/#{PRODUCT_VERSION_STRING}.tar.gz"). - with('extract_path' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone", - 'source' => "#{DOWNLOAD_URL}/#{PRODUCT_VERSION_STRING}.tar.gz", - 'creates' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone/conf", - 'user' => 'foo', - 'group' => 'bar', + with('extract_path' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone", + 'source' => "#{DOWNLOAD_URL}/#{PRODUCT_VERSION_STRING}.tar.gz", + 'creates' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone/conf", + 'user' => 'foo', + 'group' => 'bar', 'checksum_type' => 'md5') end it 'manages the jira home directory' do is_expected.to contain_file('/random/homedir').with('ensure' => 'directory', - 'owner' => 'foo', - 'group' => 'bar') + 'owner' => 'foo', + 'group' => 'bar') end end end diff --git a/spec/classes/jira_mysql_connector_spec.rb b/spec/classes/jira_mysql_connector_spec.rb index 048439cb..3a1b3abf 100644 --- a/spec/classes/jira_mysql_connector_spec.rb +++ b/spec/classes/jira_mysql_connector_spec.rb @@ -1,8 +1,10 @@ -require 'spec_helper.rb' +# frozen_string_literal: true + +require 'spec_helper' # set some constants to keep it DRY -PATH_MYSQL_CONNECTOR = '/opt/MySQL-connector'.freeze -PATH_MYSQL_CONNECTOR_LIB = "#{PATH_INSTALLATION_BASE}/lib/mysql-connector-java.jar".freeze +PATH_MYSQL_CONNECTOR = '/opt/MySQL-connector' +PATH_MYSQL_CONNECTOR_LIB = "#{PATH_INSTALLATION_BASE}/lib/mysql-connector-java.jar" describe 'jira' do describe 'jira::mysql_connector' do @@ -30,6 +32,7 @@ it { is_expected.to compile.with_all_deps } it { is_expected.to contain_file(PATH_MYSQL_CONNECTOR).with_ensure('directory') } + it do is_expected.to contain_file(PATH_MYSQL_CONNECTOR_LIB). with( @@ -37,13 +40,15 @@ 'target' => "#{PATH_MYSQL_CONNECTOR}/mysql-connector-java-5.1.34/mysql-connector-java-5.1.34-bin.jar" ) end + it 'deploys mysql connector 5.1.34 from tar.gz' do is_expected.to contain_archive("#{PATH_MYSQL_CONNECTOR}/mysql-connector-java-5.1.34.tar.gz"). - with('source' => 'https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.34.tar.gz', + with('source' => 'https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.34.tar.gz', 'extract_path' => PATH_MYSQL_CONNECTOR, - 'creates' => "#{PATH_MYSQL_CONNECTOR}/mysql-connector-java-5.1.34") + 'creates' => "#{PATH_MYSQL_CONNECTOR}/mysql-connector-java-5.1.34") end end + context 'mysql connector defaults Connector Version >8' do let(:params) do super().merge( @@ -53,6 +58,7 @@ it { is_expected.to compile.with_all_deps } it { is_expected.to contain_file(PATH_MYSQL_CONNECTOR).with_ensure('directory') } + it do is_expected.to contain_file(PATH_MYSQL_CONNECTOR_LIB). with( @@ -60,13 +66,15 @@ 'target' => "#{PATH_MYSQL_CONNECTOR}/mysql-connector-java-8.0.23/mysql-connector-java-8.0.23.jar" ) end + it 'deploys mysql connector 8.0.23 from tar.gz' do is_expected.to contain_archive('/opt/MySQL-connector/mysql-connector-java-8.0.23.tar.gz'). - with('source' => 'https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.23.tar.gz', + with('source' => 'https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.23.tar.gz', 'extract_path' => PATH_MYSQL_CONNECTOR, - 'creates' => "#{PATH_MYSQL_CONNECTOR}/mysql-connector-java-8.0.23") + 'creates' => "#{PATH_MYSQL_CONNECTOR}/mysql-connector-java-8.0.23") end end + context 'mysql connector overwrite params' do let(:params) do super().merge( @@ -78,6 +86,7 @@ end it { is_expected.to contain_file('/opt/foo').with_ensure('directory') } + it do is_expected.to contain_file(PATH_MYSQL_CONNECTOR_LIB). with( @@ -85,13 +94,15 @@ 'target' => '/opt/foo/mysql-connector-java-5.1.15/mysql-connector-java-5.1.15-bin.jar' ) end + it 'deploys mysql connector 5.1.15 from zip' do is_expected.to contain_archive('/opt/foo/mysql-connector-java-5.1.15.zip'). - with('source' => 'http://example.co.za/foo/mysql-connector-java-5.1.15.zip', + with('source' => 'http://example.co.za/foo/mysql-connector-java-5.1.15.zip', 'extract_path' => '/opt/foo', - 'creates' => '/opt/foo/mysql-connector-java-5.1.15') + 'creates' => '/opt/foo/mysql-connector-java-5.1.15') end end + context 'mysql_connector_mangage equals false' do let(:params) do super().merge( diff --git a/spec/classes/jira_service_spec.rb b/spec/classes/jira_service_spec.rb index 2507e02e..542a2e5c 100644 --- a/spec/classes/jira_service_spec.rb +++ b/spec/classes/jira_service_spec.rb @@ -1,4 +1,6 @@ -require 'spec_helper.rb' +# frozen_string_literal: true + +require 'spec_helper' describe 'jira' do describe 'jira::service' do @@ -22,6 +24,7 @@ is_expected.to contain_file('/etc/systemd/system/jira.service'). with_content(%r{Atlassian Systemd Jira Service}) end + it { is_expected.to contain_service('jira') } end @@ -32,6 +35,7 @@ it { is_expected.not_to contain_service('jira') } end + context 'with service_ensure set to stopped' do let(:params) do super().merge( diff --git a/spec/classes/jira_sso_spec.rb b/spec/classes/jira_sso_spec.rb index 8c6c1b8e..9f1eaaff 100644 --- a/spec/classes/jira_sso_spec.rb +++ b/spec/classes/jira_sso_spec.rb @@ -1,7 +1,9 @@ -require 'spec_helper.rb' +# frozen_string_literal: true + +require 'spec_helper' # set some constants to keep it DRY -PATH_CROWD_PROPS = "#{PATH_INSTALLATION_BASE}/atlassian-jira/WEB-INF/classes/crowd.properties".freeze +PATH_CROWD_PROPS = "#{PATH_INSTALLATION_BASE}/atlassian-jira/WEB-INF/classes/crowd.properties" describe 'jira' do describe 'jira::sso' do @@ -38,6 +40,7 @@ with_content(%r{application.name appname}) end end + context 'with non default params' do let(:params) do super().merge( @@ -50,6 +53,7 @@ end it { is_expected.to contain_file(PATH_CROWD_PROPS) } + it do is_expected.to contain_file(PATH_CROWD_PROPS). with_content(%r{application.name app}). diff --git a/spec/classes/jira_upgrade_spec.rb b/spec/classes/jira_upgrade_spec.rb index b08d7b01..d5685267 100644 --- a/spec/classes/jira_upgrade_spec.rb +++ b/spec/classes/jira_upgrade_spec.rb @@ -1,4 +1,6 @@ -require 'spec_helper.rb' +# frozen_string_literal: true + +require 'spec_helper' describe 'jira' do describe 'jira::install' do @@ -18,11 +20,13 @@ end it { is_expected.to compile.with_all_deps } + it do is_expected.to contain_exec('stop-jira-for-version-change'). with_command('systemctl stop jira.service && sleep 15') end end + context 'custom params' do let(:params) do { diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 8bbf1e62..96d6661c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -16,4 +16,4 @@ end end -require 'support/acceptance/constants.rb' +require 'support/acceptance/constants' diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 92d91305..a09491af 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This file is completely managed via modulesync require 'voxpupuli/acceptance/spec_helper_acceptance' diff --git a/spec/support/acceptance/constants.rb b/spec/support/acceptance/constants.rb index aeb8f814..880f217a 100644 --- a/spec/support/acceptance/constants.rb +++ b/spec/support/acceptance/constants.rb @@ -1,16 +1,18 @@ +# frozen_string_literal: true + # set some constants to keep it DRY -DEFAULT_VERSION = '8.13.5'.freeze -PRODUCT_VERSION_STRING = "atlassian-jira-software-#{DEFAULT_VERSION}".freeze -PRODUCT_VERSION_STRING_CORE = "atlassian-jira-core-#{DEFAULT_VERSION}".freeze +DEFAULT_VERSION = '8.13.5' +PRODUCT_VERSION_STRING = "atlassian-jira-software-#{DEFAULT_VERSION}" +PRODUCT_VERSION_STRING_CORE = "atlassian-jira-core-#{DEFAULT_VERSION}" -PATH_JAVA_HOME = '/opt/java'.freeze -PATH_JIRA_DIR = '/opt/jira'.freeze -PATH_INSTALLATION_BASE = "#{PATH_JIRA_DIR}/#{PRODUCT_VERSION_STRING}-standalone".freeze +PATH_JAVA_HOME = '/opt/java' +PATH_JIRA_DIR = '/opt/jira' +PATH_INSTALLATION_BASE = "#{PATH_JIRA_DIR}/#{PRODUCT_VERSION_STRING}-standalone" -FILENAME_SETENV_SH = "#{PATH_INSTALLATION_BASE}/bin/setenv.sh".freeze -FILENAME_USER_SH = "#{PATH_INSTALLATION_BASE}/bin/user.sh".freeze -FILENAME_CHECK_JAVA_SH = "#{PATH_INSTALLATION_BASE}/bin/check-java.sh".freeze -FILENAME_SERVER_XML = "#{PATH_INSTALLATION_BASE}/conf/server.xml".freeze -FILENAME_DBCONFIG_XML = '/home/jira/dbconfig.xml'.freeze -FILENAME_CLUSTER_PROPS = '/home/jira/cluster.properties'.freeze -FILENAME_JIRA_CONFIG_PROPS = '/home/jira/jira-config.properties'.freeze +FILENAME_SETENV_SH = "#{PATH_INSTALLATION_BASE}/bin/setenv.sh" +FILENAME_USER_SH = "#{PATH_INSTALLATION_BASE}/bin/user.sh" +FILENAME_CHECK_JAVA_SH = "#{PATH_INSTALLATION_BASE}/bin/check-java.sh" +FILENAME_SERVER_XML = "#{PATH_INSTALLATION_BASE}/conf/server.xml" +FILENAME_DBCONFIG_XML = '/home/jira/dbconfig.xml' +FILENAME_CLUSTER_PROPS = '/home/jira/cluster.properties' +FILENAME_JIRA_CONFIG_PROPS = '/home/jira/jira-config.properties' diff --git a/spec/type_aliases/jvm_types_spec.rb b/spec/type_aliases/jvm_types_spec.rb index b10fbf79..d821ef2d 100644 --- a/spec/type_aliases/jvm_types_spec.rb +++ b/spec/type_aliases/jvm_types_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'Jira::Jvm_types' do diff --git a/spec/type_aliases/tomcat_attributes_spec.rb b/spec/type_aliases/tomcat_attributes_spec.rb index f0968dd4..3e9c8e69 100644 --- a/spec/type_aliases/tomcat_attributes_spec.rb +++ b/spec/type_aliases/tomcat_attributes_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'Jira::Tomcat_attributes' do diff --git a/spec/type_aliases/tomcat_connectors_spec.rb b/spec/type_aliases/tomcat_connectors_spec.rb index 18c135ca..e15c9a4c 100644 --- a/spec/type_aliases/tomcat_connectors_spec.rb +++ b/spec/type_aliases/tomcat_connectors_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'Jira::Tomcat_connectors' do From 42ff9d3f078c7f88322ff902dcfa3100a9aa03d9 Mon Sep 17 00:00:00 2001 From: Christos Papageorgiou Date: Mon, 4 Apr 2022 18:16:28 +0300 Subject: [PATCH 07/36] Fix remaining rubocop offences --- spec/acceptance/default_parameters_spec.rb | 24 +++++++---------- spec/acceptance/mysql_spec.rb | 30 ++++++++++------------ spec/classes/jira_config_spec.rb | 13 ---------- 3 files changed, 22 insertions(+), 45 deletions(-) diff --git a/spec/acceptance/default_parameters_spec.rb b/spec/acceptance/default_parameters_spec.rb index 816d9bf7..1bbc0496 100644 --- a/spec/acceptance/default_parameters_spec.rb +++ b/spec/acceptance/default_parameters_spec.rb @@ -47,18 +47,18 @@ class { 'jira': EOS # jira just takes *ages* to start up :-( - WGET_CMD = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 localhost:8080' + wget_cmd = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 localhost:8080' apply_manifest(pp, catch_failures: true) sleep 60 - shell WGET_CMD, acceptable_exit_codes: [0, 8] + shell wget_cmd, acceptable_exit_codes: [0, 8] sleep 60 - shell WGET_CMD, acceptable_exit_codes: [0, 8] + shell wget_cmd, acceptable_exit_codes: [0, 8] sleep 60 apply_manifest(pp_upgrade, catch_failures: true) sleep 60 - shell WGET_CMD, acceptable_exit_codes: [0, 8] + shell wget_cmd, acceptable_exit_codes: [0, 8] sleep 60 - shell WGET_CMD, acceptable_exit_codes: [0, 8] + shell wget_cmd, acceptable_exit_codes: [0, 8] sleep 60 apply_manifest(pp_upgrade, catch_failures: true) end @@ -76,16 +76,10 @@ class { 'jira': it { is_expected.to be_running } end - describe user('jira') do - it { is_expected.to exist } - end - - describe user('jira') do - it { is_expected.to belong_to_group 'jira' } - end - - describe user('jira') do - it { is_expected.to have_login_shell '/bin/true' } + specify do + expect(user('jira')).to exist + expect(user('jira')).to belong_to_group 'jira' + expect(user('jira')).to have_login_shell '/bin/true' end describe command('wget -q --tries=24 --retry-connrefused --read-timeout=10 -O- localhost:8080') do diff --git a/spec/acceptance/mysql_spec.rb b/spec/acceptance/mysql_spec.rb index cfe88118..4128b086 100644 --- a/spec/acceptance/mysql_spec.rb +++ b/spec/acceptance/mysql_spec.rb @@ -62,12 +62,12 @@ class { 'jira': } EOS - WGET_CMD = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 --no-check-certificate localhost:8081' + wget_cmd = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 --no-check-certificate localhost:8081' apply_manifest(pp, catch_failures: true) sleep 60 - shell WGET_CMD, acceptable_exit_codes: [0, 8] + shell wget_cmd, acceptable_exit_codes: [0, 8] sleep 60 - shell WGET_CMD, acceptable_exit_codes: [0, 8] + shell wget_cmd, acceptable_exit_codes: [0, 8] sleep 60 apply_manifest(pp, catch_changes: true) end @@ -85,24 +85,20 @@ class { 'jira': it { is_expected.to be_running } end - describe user('jira') do - it { is_expected.to exist } + specify do + expect(user('jira')).to exist + expect(user('jira')).to belong_to_group 'jira' + expect(user('jira')).to have_login_shell '/bin/true' end - describe user('jira') do - it { is_expected.to belong_to_group 'jira' } + specify do + expect(command('wget -q --tries=24 --retry-connrefused --no-check-certificate --read-timeout=10 -O- localhost:8081')). + to have_attributes(stdout: %r{8.13.5}) end - describe user('jira') do - it { is_expected.to have_login_shell '/bin/true' } - end - - describe command('wget -q --tries=24 --retry-connrefused --no-check-certificate --read-timeout=10 -O- localhost:8081') do - its(:stdout) { is_expected.to include('8.13.5') } - end - - describe command('wget -q --tries=24 --retry-connrefused --no-check-certificate --read-timeout=10 -O- https://localhost:8443') do - its(:stdout) { is_expected.to include('8.13.5') } + specify do + expect(command('wget -q --tries=24 --retry-connrefused --no-check-certificate --read-timeout=10 -O- https://localhost:8443')). + to have_attributes(stdout: %r{8.13.5}) end describe 'shutdown' do diff --git a/spec/classes/jira_config_spec.rb b/spec/classes/jira_config_spec.rb index d7c1d000..a1311dc1 100644 --- a/spec/classes/jira_config_spec.rb +++ b/spec/classes/jira_config_spec.rb @@ -475,19 +475,6 @@ end end - context 'tomcat EnableLookups' do - let(:params) do - super().merge( - tomcat_enable_lookups: true - ) - end - - it do - is_expected.to contain_file(FILENAME_SERVER_XML). - with_content(%r{enableLookups="true"}) - end - end - context 'tomcat maxThreads' do let(:params) do super().merge( From 8d4902fc80e0c2dc669704a1b43b562fe7bf3ed9 Mon Sep 17 00:00:00 2001 From: Christos Papageorgiou Date: Mon, 4 Apr 2022 18:31:29 +0300 Subject: [PATCH 08/36] Fix linter errors --- manifests/init.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 20e84025..69da31d5 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -407,7 +407,7 @@ # Additional connectors in server.xml Jira::Tomcat_connectors $tomcat_additional_connectors = {}, # Context path (usualy used in combination with a reverse proxy) - String $contextpath = '', + Optional[String[1]] $contextpath = undef, # Resources for context.xml Hash $resources = {}, # Enable SingleSignOn via Crowd @@ -514,10 +514,10 @@ } $_password = !empty($plugin_data['password']) ? { default => {}, - true => { password => $plugin_data['password'] } + true => { password => $plugin_data['password'] }, } $_plugin_archive = { - $target => $_target_defaults + $_username + $_password + $target => $_target_defaults + $_username + $_password, } create_resources(archive, $_plugin_archive) } From 36b9d3a7acf85db4f04c545c53c7ee6ffa9ac848 Mon Sep 17 00:00:00 2001 From: Christos Papageorgiou Date: Mon, 4 Apr 2022 18:31:49 +0300 Subject: [PATCH 09/36] Remove unused parameter catalina_opts --- manifests/init.pp | 3 --- 1 file changed, 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 69da31d5..0761a0c6 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -144,8 +144,6 @@ # Configures JVM_EXTRA_ARGS in setenv.sh # @param jvm_nofiles_limit # Set the limit for open files -# @param catalina_opts -# Does nothing :-) # @param download_url # Base URL for downloading Atlassian software # @param checksum @@ -353,7 +351,6 @@ Optional[String] $jvm_code_cache_args = undef, Optional[String] $jvm_extra_args = undef, Integer $jvm_nofiles_limit = 16384, - String $catalina_opts = '', # Misc Settings Stdlib::HTTPUrl $download_url = 'https://product-downloads.atlassian.com/software/jira/downloads', Optional[String] $checksum = undef, From 6860ab1814bb47a2b2e19aefbb35714125980380 Mon Sep 17 00:00:00 2001 From: Christos Papageorgiou Date: Mon, 4 Apr 2022 19:24:13 +0300 Subject: [PATCH 10/36] fixup! Fix remaining rubocop offences --- spec/acceptance/default_parameters_spec.rb | 6 +++--- spec/acceptance/mysql_spec.rb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/acceptance/default_parameters_spec.rb b/spec/acceptance/default_parameters_spec.rb index 1bbc0496..f7f1376f 100644 --- a/spec/acceptance/default_parameters_spec.rb +++ b/spec/acceptance/default_parameters_spec.rb @@ -77,9 +77,9 @@ class { 'jira': end specify do - expect(user('jira')).to exist - expect(user('jira')).to belong_to_group 'jira' - expect(user('jira')).to have_login_shell '/bin/true' + expect(user('jira')).to exist. + and belong_to_group 'jira'. + and have_login_shell '/bin/true' end describe command('wget -q --tries=24 --retry-connrefused --read-timeout=10 -O- localhost:8080') do diff --git a/spec/acceptance/mysql_spec.rb b/spec/acceptance/mysql_spec.rb index 4128b086..169a2bfa 100644 --- a/spec/acceptance/mysql_spec.rb +++ b/spec/acceptance/mysql_spec.rb @@ -86,9 +86,9 @@ class { 'jira': end specify do - expect(user('jira')).to exist - expect(user('jira')).to belong_to_group 'jira' - expect(user('jira')).to have_login_shell '/bin/true' + expect(user('jira')).to exist. + and belong_to_group 'jira'. + and have_login_shell '/bin/true' end specify do From 2e4af16ea2494ec2eac2dbf6fea1dc9ca9309872 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sun, 2 Oct 2022 15:38:07 +0200 Subject: [PATCH 11/36] modulesync 5.3.0 --- .github/CONTRIBUTING.md | 2 +- .github/workflows/ci.yml | 85 +++------------------------------------- .msync.yml | 2 +- Gemfile | 4 +- Rakefile | 2 +- spec/spec_helper.rb | 4 +- 6 files changed, 13 insertions(+), 86 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 25743a13..8b466cfb 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -124,7 +124,7 @@ If you have Ruby 2.x or want a specific version of Puppet, you must set an environment variable such as: ```sh -export PUPPET_GEM_VERSION="~> 5.5.6" +export PUPPET_GEM_VERSION="~> 6.1.0" ``` You can install all needed gems for spec tests into the modules directory by diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fb5a04c..8a077911 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,83 +11,8 @@ concurrency: cancel-in-progress: true jobs: - setup_matrix: - name: 'Setup Test Matrix' - runs-on: ubuntu-latest - timeout-minutes: 40 - outputs: - puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }} - github_action_test_matrix: ${{ steps.get-outputs.outputs.github_action_test_matrix }} - env: - BUNDLE_WITHOUT: development:system_tests:release - steps: - - uses: actions/checkout@v2 - - name: Setup ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: '3.0' - bundler-cache: true - - name: Run static validations - run: bundle exec rake validate lint check - - name: Run rake rubocop - run: bundle exec rake rubocop - - name: Setup Test Matrix - id: get-outputs - run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false - - unit: - needs: setup_matrix - runs-on: ubuntu-latest - timeout-minutes: 40 - strategy: - fail-fast: false - matrix: - include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}} - env: - BUNDLE_WITHOUT: development:system_tests:release - PUPPET_VERSION: "~> ${{ matrix.puppet }}.0" - name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }}) - steps: - - uses: actions/checkout@v2 - - name: Setup ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - bundler-cache: true - - name: Run tests - run: bundle exec rake parallel_spec - - acceptance: - needs: setup_matrix - runs-on: ubuntu-latest - env: - LANG: en_US - LC_ALL: en_US.UTF-8 - BUNDLE_WITHOUT: development:test:release - strategy: - fail-fast: false - matrix: - include: ${{fromJson(needs.setup_matrix.outputs.github_action_test_matrix)}} - name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }} - steps: - - uses: actions/checkout@v2 - - name: Setup ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: '3.0' - bundler-cache: true - - name: Run tests - run: bundle exec rake beaker - env: - BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }} - BEAKER_setfile: ${{ matrix.setfile.value }} - - tests: - needs: - - unit - - acceptance - runs-on: ubuntu-latest - name: Test suite - steps: - - run: echo Test suite completed - + puppet: + name: Puppet + uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1 + with: + pidfile_workaround: 'false' diff --git a/.msync.yml b/.msync.yml index 968a9367..02353859 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '5.2.0' +modulesync_config_version: '5.3.0' diff --git a/Gemfile b/Gemfile index 4ae6fa14..e243353c 100644 --- a/Gemfile +++ b/Gemfile @@ -1,10 +1,10 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -source ENV['GEM_SOURCE'] || "https://rubygems.org" +source ENV['GEM_SOURCE'] || 'https://rubygems.org' group :test do - gem 'voxpupuli-test', '~> 5.0', :require => false + gem 'voxpupuli-test', '~> 5.4', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false gem 'puppet_metadata', '~> 1.0', :require => false diff --git a/Rakefile b/Rakefile index f92f0516..912eb5a3 100644 --- a/Rakefile +++ b/Rakefile @@ -52,7 +52,7 @@ begin config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not affect the functionality of the module." config.exclude_labels = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog} config.user = 'voxpupuli' - config.project = metadata.metadata['name'] + config.project = 'puppet-jira' end # Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 96d6661c..73c90c9d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -9,6 +9,8 @@ require 'voxpupuli/test/spec_helper' +add_mocked_facts! + if File.exist?(File.join(__dir__, 'default_module_facts.yml')) facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml'))) facts&.each do |name, value| @@ -16,4 +18,4 @@ end end -require 'support/acceptance/constants' +require 'support/acceptance/constants.rb' From 6f35474024ccb50e8ca3e352e68aff4939d4cf42 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Tue, 20 Dec 2022 16:05:13 +0100 Subject: [PATCH 12/36] modulesync 5.4.0 --- .msync.yml | 2 +- Gemfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.msync.yml b/.msync.yml index 02353859..f3156d15 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '5.3.0' +modulesync_config_version: '5.4.0' diff --git a/Gemfile b/Gemfile index e243353c..2125027b 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ group :test do gem 'voxpupuli-test', '~> 5.4', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false - gem 'puppet_metadata', '~> 1.0', :require => false + gem 'puppet_metadata', '~> 2.0', :require => false gem 'puppet-lint-param-docs', :require => false end From 11bebce9b39215e2a3e1e1cf692d8d249f874530 Mon Sep 17 00:00:00 2001 From: Massimiliano Adamo Date: Sat, 15 Apr 2023 09:58:36 +0200 Subject: [PATCH 13/36] modulesync 5.5.0 --- .github/SECURITY.md | 3 --- .gitignore | 36 ++++++++++++------------- .msync.yml | 2 +- .pmtignore | 64 ++++++++++++++++++++++----------------------- Gemfile | 3 +-- Rakefile | 36 +++---------------------- 6 files changed, 56 insertions(+), 88 deletions(-) delete mode 100644 .github/SECURITY.md diff --git a/.github/SECURITY.md b/.github/SECURITY.md deleted file mode 100644 index cacadf22..00000000 --- a/.github/SECURITY.md +++ /dev/null @@ -1,3 +0,0 @@ -# Vox Pupuli Security Policy - -Our vulnerabilities reporting process is at https://voxpupuli.org/security/ diff --git a/.gitignore b/.gitignore index 9b95224c..84fd904c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,23 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -pkg/ -Gemfile.lock -Gemfile.local -vendor/ -.vendor/ -spec/fixtures/manifests/ -spec/fixtures/modules/ -.vagrant/ -.bundle/ -.ruby-version -coverage/ -log/ -.idea/ -.dependencies/ -.librarian/ -Puppetfile.lock +/pkg/ +/Gemfile.lock +/Gemfile.local +/vendor/ +/.vendor/ +/spec/fixtures/manifests/ +/spec/fixtures/modules/ +/.vagrant/ +/.bundle/ +/.ruby-version +/coverage/ +/log/ +/.idea/ +/.dependencies/ +/.librarian/ +/Puppetfile.lock *.iml .*.sw? -.yardoc/ -Guardfile +/.yardoc/ +/Guardfile diff --git a/.msync.yml b/.msync.yml index f3156d15..a4b00691 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '5.4.0' +modulesync_config_version: '5.5.0' diff --git a/.pmtignore b/.pmtignore index 65f50514..58a04088 100644 --- a/.pmtignore +++ b/.pmtignore @@ -1,37 +1,37 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -docs/ -pkg/ -Gemfile -Gemfile.lock -Gemfile.local -vendor/ -.vendor/ -spec/ -Rakefile -.vagrant/ -.bundle/ -.ruby-version -coverage/ -log/ -.idea/ -.dependencies/ -.github/ -.librarian/ -Puppetfile.lock +/docs/ +/pkg/ +/Gemfile +/Gemfile.lock +/Gemfile.local +/vendor/ +/.vendor/ +/spec/ +/Rakefile +/.vagrant/ +/.bundle/ +/.ruby-version +/coverage/ +/log/ +/.idea/ +/.dependencies/ +/.github/ +/.librarian/ +/Puppetfile.lock *.iml -.editorconfig -.fixtures.yml -.gitignore -.msync.yml -.overcommit.yml -.pmtignore -.rspec -.rspec_parallel -.rubocop.yml -.sync.yml +/.editorconfig +/.fixtures.yml +/.gitignore +/.msync.yml +/.overcommit.yml +/.pmtignore +/.rspec +/.rspec_parallel +/.rubocop.yml +/.sync.yml .*.sw? -.yardoc/ -.yardopts -Dockerfile +/.yardoc/ +/.yardopts +/Dockerfile diff --git a/Gemfile b/Gemfile index 2125027b..08c32ff4 100644 --- a/Gemfile +++ b/Gemfile @@ -22,8 +22,7 @@ end group :release do gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5' - gem 'voxpupuli-release', '>= 1.2.0', :require => false - gem 'puppet-strings', '>= 2.2', :require => false + gem 'voxpupuli-release', '~> 2.0', :require => false end gem 'rake', :require => false diff --git a/Rakefile b/Rakefile index 912eb5a3..7109e7f8 100644 --- a/Rakefile +++ b/Rakefile @@ -24,6 +24,10 @@ end begin require 'voxpupuli/release/rake_tasks' rescue LoadError + # voxpupuli-release not present +else + GCGConfig.user = 'voxpupuli' + GCGConfig.project = 'puppet-jira' end desc "Run main 'test' task and report merged results to coveralls" @@ -37,36 +41,4 @@ task test_with_coveralls: [:test] do end end -desc 'Generate REFERENCE.md' -task :reference, [:debug, :backtrace] do |t, args| - patterns = '' - Rake::Task['strings:generate:reference'].invoke(patterns, args[:debug], args[:backtrace]) -end - -begin - require 'github_changelog_generator/task' - require 'puppet_blacksmith' - GitHubChangelogGenerator::RakeTask.new :changelog do |config| - metadata = Blacksmith::Modulefile.new - config.future_release = "v#{metadata.version}" if metadata.version =~ /^\d+\.\d+.\d+$/ - config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not affect the functionality of the module." - config.exclude_labels = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog} - config.user = 'voxpupuli' - config.project = 'puppet-jira' - end - - # Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715 - require 'rbconfig' - if RbConfig::CONFIG['host_os'] =~ /linux/ - task :changelog do - puts 'Fixing line endings...' - changelog_file = File.join(__dir__, 'CHANGELOG.md') - changelog_txt = File.read(changelog_file) - new_contents = changelog_txt.gsub(%r{\r\n}, "\n") - File.open(changelog_file, "w") {|file| file.puts new_contents } - end - end - -rescue LoadError -end # vim: syntax=ruby From 5a6271636918de2403092a333fa414be295015f7 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 12 May 2023 12:24:32 +0200 Subject: [PATCH 14/36] modulesync 6.0.0 --- .msync.yml | 2 +- Gemfile | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.msync.yml b/.msync.yml index a4b00691..b929160c 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '5.5.0' +modulesync_config_version: '6.0.0' diff --git a/Gemfile b/Gemfile index 08c32ff4..488e1f83 100644 --- a/Gemfile +++ b/Gemfile @@ -4,10 +4,10 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org' group :test do - gem 'voxpupuli-test', '~> 5.4', :require => false + gem 'voxpupuli-test', '~> 6.0', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false - gem 'puppet_metadata', '~> 2.0', :require => false + gem 'puppet_metadata', '~> 3.0', :require => false gem 'puppet-lint-param-docs', :require => false end @@ -17,18 +17,19 @@ group :development do end group :system_tests do - gem 'voxpupuli-acceptance', '~> 1.0', :require => false + gem 'voxpupuli-acceptance', '~> 2.0', :require => false end group :release do - gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5' - gem 'voxpupuli-release', '~> 2.0', :require => false + gem 'github_changelog_generator', '>= 1.16.1', :require => false + gem 'voxpupuli-release', '~> 3.0', :require => false + gem 'faraday-retry', '~> 2.1', :require => false end gem 'rake', :require => false gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test] -puppetversion = ENV['PUPPET_GEM_VERSION'] || '>= 6.0' +puppetversion = ENV['PUPPET_GEM_VERSION'] || '~> 7.24' gem 'puppet', puppetversion, :require => false, :groups => [:test] # vim: syntax=ruby From b30c3972dd0972f0c457f7d2c316853fc449aea9 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 17 Aug 2023 15:58:44 +0200 Subject: [PATCH 15/36] modulesync 7.0.0 --- .github/CONTRIBUTING.md | 11 +++++++---- .msync.yml | 2 +- Gemfile | 2 +- spec/spec_helper.rb | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 8b466cfb..6aaa603f 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -232,18 +232,21 @@ simple tests against it after applying the module. You can run this with: ```sh -BEAKER_setfile=debian11-64 bundle exec rake beaker +BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker ``` -You can replace the string `debian10` with any common operating system. +You can replace the string `debian11` with any common operating system. The following strings are known to work: -* ubuntu1804 * ubuntu2004 -* debian10 +* ubuntu2204 * debian11 * centos7 * centos8 +* centos9 +* almalinux8 +* almalinux9 +* fedora36 For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests). diff --git a/.msync.yml b/.msync.yml index b929160c..dd3e9572 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '6.0.0' +modulesync_config_version: '7.0.0' diff --git a/Gemfile b/Gemfile index 488e1f83..89f86dc1 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org' group :test do - gem 'voxpupuli-test', '~> 6.0', :require => false + gem 'voxpupuli-test', '~> 7.0', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false gem 'puppet_metadata', '~> 3.0', :require => false diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 73c90c9d..6382b3f6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -19,3 +19,4 @@ end require 'support/acceptance/constants.rb' +Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f } From 80817c2b53910c7c56d6db744436b6aee4853b0e Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 18 Aug 2023 00:23:48 +0200 Subject: [PATCH 16/36] rubocop: autofix --- spec/spec_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6382b3f6..4cc55f2a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -18,5 +18,5 @@ end end -require 'support/acceptance/constants.rb' +require 'support/acceptance/constants' Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f } From 127e3390370713663b54be3ba8b877c1ab4e9b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Fern=C3=A1ndez?= Date: Mon, 6 Nov 2023 14:54:57 +0100 Subject: [PATCH 17/36] modulesync 7.1.0 --- .msync.yml | 2 +- Gemfile | 4 +--- spec/spec_helper.rb | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.msync.yml b/.msync.yml index dd3e9572..76cd4646 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '7.0.0' +modulesync_config_version: '7.1.0' diff --git a/Gemfile b/Gemfile index 89f86dc1..416aa113 100644 --- a/Gemfile +++ b/Gemfile @@ -21,9 +21,7 @@ group :system_tests do end group :release do - gem 'github_changelog_generator', '>= 1.16.1', :require => false - gem 'voxpupuli-release', '~> 3.0', :require => false - gem 'faraday-retry', '~> 2.1', :require => false + gem 'voxpupuli-release', '~> 3.0', :require => false end gem 'rake', :require => false diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4cc55f2a..6382b3f6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -18,5 +18,5 @@ end end -require 'support/acceptance/constants' +require 'support/acceptance/constants.rb' Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f } From cea100538cdddfbb7aa656934089cd343a48fd79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Fern=C3=A1ndez?= Date: Mon, 6 Nov 2023 15:06:19 +0100 Subject: [PATCH 18/36] Update REFERENCE.md CI complained about REFERENCE.md being outdated Auto-generated with `bundle exec rake release:prepare` --- REFERENCE.md | 660 ++++++++++++++++++++++++++------------------------- 1 file changed, 334 insertions(+), 326 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 43d7f705..1e468dd4 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -20,18 +20,15 @@ ### Functions -#### Public Functions - - #### Private Functions * `jira::sort_hash`: Sort a hash ### Data types -* [`Jira::Jvm_types`](#jirajvm_types): Java Virtual Machine (JVM) types -* [`Jira::Tomcat_attributes`](#jiratomcat_attributes): A hash of string keys to arbitrary values that will be rendered as XML attributes -* [`Jira::Tomcat_connectors`](#jiratomcat_connectors): A set of attribute hashes keyed by connector port number +* [`Jira::Jvm_types`](#Jira--Jvm_types): Java Virtual Machine (JVM) types +* [`Jira::Tomcat_attributes`](#Jira--Tomcat_attributes): A hash of string keys to arbitrary values that will be rendered as XML attributes +* [`Jira::Tomcat_connectors`](#Jira--Tomcat_connectors): A set of attribute hashes keyed by connector port number ## Classes @@ -57,124 +54,126 @@ The following parameters are available in the `jira` class: -* [`version`](#version) -* [`product`](#product) -* [`installdir`](#installdir) -* [`homedir`](#homedir) -* [`manage_user`](#manage_user) -* [`user`](#user) -* [`group`](#group) -* [`installdir_owner`](#installdir_owner) -* [`installdir_group`](#installdir_group) -* [`installdir_mode`](#installdir_mode) -* [`homedir_mode`](#homedir_mode) -* [`uid`](#uid) -* [`gid`](#gid) -* [`shell`](#shell) -* [`enable_secure_admin_sessions`](#enable_secure_admin_sessions) -* [`jira_config_properties`](#jira_config_properties) -* [`datacenter`](#datacenter) -* [`shared_homedir`](#shared_homedir) -* [`ehcache_listener_host`](#ehcache_listener_host) -* [`ehcache_listener_port`](#ehcache_listener_port) -* [`ehcache_object_port`](#ehcache_object_port) -* [`db`](#db) -* [`dbname`](#dbname) -* [`dbuser`](#dbuser) -* [`dbpassword`](#dbpassword) -* [`dbserver`](#dbserver) -* [`dbport`](#dbport) -* [`dbtype`](#dbtype) -* [`dbdriver`](#dbdriver) -* [`dbschema`](#dbschema) -* [`dburl`](#dburl) -* [`connection_settings`](#connection_settings) -* [`oracle_use_sid`](#oracle_use_sid) -* [`mysql_connector_manage`](#mysql_connector_manage) -* [`mysql_connector_version`](#mysql_connector_version) -* [`mysql_connector_product`](#mysql_connector_product) -* [`mysql_connector_install`](#mysql_connector_install) -* [`mysql_connector_format`](#mysql_connector_format) -* [`mysql_connector_url`](#mysql_connector_url) -* [`pool_min_size`](#pool_min_size) -* [`pool_max_size`](#pool_max_size) -* [`pool_max_wait`](#pool_max_wait) -* [`validation_query`](#validation_query) -* [`validation_query_timeout`](#validation_query_timeout) -* [`min_evictable_idle_time`](#min_evictable_idle_time) -* [`time_between_eviction_runs`](#time_between_eviction_runs) -* [`pool_max_idle`](#pool_max_idle) -* [`pool_remove_abandoned`](#pool_remove_abandoned) -* [`pool_remove_abandoned_timeout`](#pool_remove_abandoned_timeout) -* [`pool_test_while_idle`](#pool_test_while_idle) -* [`pool_test_on_borrow`](#pool_test_on_borrow) -* [`java_package`](#java_package) -* [`javahome`](#javahome) -* [`jvm_type`](#jvm_type) -* [`jvm_xms`](#jvm_xms) -* [`jvm_xmx`](#jvm_xmx) -* [`java_opts`](#java_opts) -* [`jvm_gc_args`](#jvm_gc_args) -* [`jvm_code_cache_args`](#jvm_code_cache_args) -* [`jvm_extra_args`](#jvm_extra_args) -* [`jvm_nofiles_limit`](#jvm_nofiles_limit) -* [`catalina_opts`](#catalina_opts) -* [`download_url`](#download_url) -* [`checksum`](#checksum) -* [`disable_notifications`](#disable_notifications) -* [`proxy_server`](#proxy_server) -* [`proxy_type`](#proxy_type) -* [`service_manage`](#service_manage) -* [`service_ensure`](#service_ensure) -* [`service_enable`](#service_enable) -* [`service_notify`](#service_notify) -* [`service_subscribe`](#service_subscribe) -* [`stop_jira`](#stop_jira) -* [`script_check_java_manage`](#script_check_java_manage) -* [`script_check_java_template`](#script_check_java_template) -* [`tomcat_address`](#tomcat_address) -* [`tomcat_port`](#tomcat_port) -* [`tomcat_shutdown_port`](#tomcat_shutdown_port) -* [`tomcat_max_http_header_size`](#tomcat_max_http_header_size) -* [`tomcat_min_spare_threads`](#tomcat_min_spare_threads) -* [`tomcat_connection_timeout`](#tomcat_connection_timeout) -* [`tomcat_enable_lookups`](#tomcat_enable_lookups) -* [`tomcat_native_ssl`](#tomcat_native_ssl) -* [`tomcat_https_port`](#tomcat_https_port) -* [`tomcat_redirect_https_port`](#tomcat_redirect_https_port) -* [`tomcat_protocol`](#tomcat_protocol) -* [`tomcat_protocol_ssl`](#tomcat_protocol_ssl) -* [`tomcat_use_body_encoding_for_uri`](#tomcat_use_body_encoding_for_uri) -* [`tomcat_disable_upload_timeout`](#tomcat_disable_upload_timeout) -* [`tomcat_key_alias`](#tomcat_key_alias) -* [`tomcat_keystore_file`](#tomcat_keystore_file) -* [`tomcat_keystore_pass`](#tomcat_keystore_pass) -* [`tomcat_keystore_type`](#tomcat_keystore_type) -* [`tomcat_accesslog_format`](#tomcat_accesslog_format) -* [`tomcat_accesslog_enable_xforwarded_for`](#tomcat_accesslog_enable_xforwarded_for) -* [`tomcat_max_threads`](#tomcat_max_threads) -* [`tomcat_accept_count`](#tomcat_accept_count) -* [`proxy`](#proxy) -* [`ajp`](#ajp) -* [`tomcat_default_connector`](#tomcat_default_connector) -* [`tomcat_additional_connectors`](#tomcat_additional_connectors) -* [`contextpath`](#contextpath) -* [`resources`](#resources) -* [`enable_sso`](#enable_sso) -* [`application_name`](#application_name) -* [`application_password`](#application_password) -* [`application_login_url`](#application_login_url) -* [`crowd_server_url`](#crowd_server_url) -* [`crowd_base_url`](#crowd_base_url) -* [`session_isauthenticated`](#session_isauthenticated) -* [`session_tokenkey`](#session_tokenkey) -* [`session_validationinterval`](#session_validationinterval) -* [`session_lastvalidation`](#session_lastvalidation) -* [`jvm_permgen`](#jvm_permgen) -* [`poolsize`](#poolsize) -* [`enable_connection_pooling`](#enable_connection_pooling) - -##### `version` +* [`version`](#-jira--version) +* [`product`](#-jira--product) +* [`installdir`](#-jira--installdir) +* [`homedir`](#-jira--homedir) +* [`manage_user`](#-jira--manage_user) +* [`user`](#-jira--user) +* [`group`](#-jira--group) +* [`installdir_owner`](#-jira--installdir_owner) +* [`installdir_group`](#-jira--installdir_group) +* [`installdir_mode`](#-jira--installdir_mode) +* [`homedir_mode`](#-jira--homedir_mode) +* [`uid`](#-jira--uid) +* [`gid`](#-jira--gid) +* [`shell`](#-jira--shell) +* [`enable_secure_admin_sessions`](#-jira--enable_secure_admin_sessions) +* [`jira_config_properties`](#-jira--jira_config_properties) +* [`datacenter`](#-jira--datacenter) +* [`shared_homedir`](#-jira--shared_homedir) +* [`ehcache_listener_host`](#-jira--ehcache_listener_host) +* [`ehcache_listener_port`](#-jira--ehcache_listener_port) +* [`ehcache_object_port`](#-jira--ehcache_object_port) +* [`use_jndi_ds`](#-jira--use_jndi_ds) +* [`jndi_ds_name`](#-jira--jndi_ds_name) +* [`db`](#-jira--db) +* [`dbname`](#-jira--dbname) +* [`dbuser`](#-jira--dbuser) +* [`dbpassword`](#-jira--dbpassword) +* [`dbserver`](#-jira--dbserver) +* [`dbport`](#-jira--dbport) +* [`dbtype`](#-jira--dbtype) +* [`dbdriver`](#-jira--dbdriver) +* [`dbschema`](#-jira--dbschema) +* [`dburl`](#-jira--dburl) +* [`connection_settings`](#-jira--connection_settings) +* [`oracle_use_sid`](#-jira--oracle_use_sid) +* [`mysql_connector_manage`](#-jira--mysql_connector_manage) +* [`mysql_connector_version`](#-jira--mysql_connector_version) +* [`mysql_connector_product`](#-jira--mysql_connector_product) +* [`mysql_connector_install`](#-jira--mysql_connector_install) +* [`mysql_connector_format`](#-jira--mysql_connector_format) +* [`mysql_connector_url`](#-jira--mysql_connector_url) +* [`pool_min_size`](#-jira--pool_min_size) +* [`pool_max_size`](#-jira--pool_max_size) +* [`pool_max_wait`](#-jira--pool_max_wait) +* [`validation_query`](#-jira--validation_query) +* [`validation_query_timeout`](#-jira--validation_query_timeout) +* [`min_evictable_idle_time`](#-jira--min_evictable_idle_time) +* [`time_between_eviction_runs`](#-jira--time_between_eviction_runs) +* [`pool_max_idle`](#-jira--pool_max_idle) +* [`pool_remove_abandoned`](#-jira--pool_remove_abandoned) +* [`pool_remove_abandoned_timeout`](#-jira--pool_remove_abandoned_timeout) +* [`pool_test_while_idle`](#-jira--pool_test_while_idle) +* [`pool_test_on_borrow`](#-jira--pool_test_on_borrow) +* [`java_package`](#-jira--java_package) +* [`javahome`](#-jira--javahome) +* [`jvm_type`](#-jira--jvm_type) +* [`jvm_xms`](#-jira--jvm_xms) +* [`jvm_xmx`](#-jira--jvm_xmx) +* [`java_opts`](#-jira--java_opts) +* [`jvm_gc_args`](#-jira--jvm_gc_args) +* [`jvm_code_cache_args`](#-jira--jvm_code_cache_args) +* [`jvm_extra_args`](#-jira--jvm_extra_args) +* [`jvm_nofiles_limit`](#-jira--jvm_nofiles_limit) +* [`download_url`](#-jira--download_url) +* [`checksum`](#-jira--checksum) +* [`disable_notifications`](#-jira--disable_notifications) +* [`proxy_server`](#-jira--proxy_server) +* [`proxy_type`](#-jira--proxy_type) +* [`service_manage`](#-jira--service_manage) +* [`service_ensure`](#-jira--service_ensure) +* [`service_enable`](#-jira--service_enable) +* [`service_notify`](#-jira--service_notify) +* [`service_subscribe`](#-jira--service_subscribe) +* [`stop_jira`](#-jira--stop_jira) +* [`script_check_java_manage`](#-jira--script_check_java_manage) +* [`script_check_java_template`](#-jira--script_check_java_template) +* [`tomcat_address`](#-jira--tomcat_address) +* [`tomcat_port`](#-jira--tomcat_port) +* [`tomcat_shutdown_port`](#-jira--tomcat_shutdown_port) +* [`tomcat_max_http_header_size`](#-jira--tomcat_max_http_header_size) +* [`tomcat_min_spare_threads`](#-jira--tomcat_min_spare_threads) +* [`tomcat_connection_timeout`](#-jira--tomcat_connection_timeout) +* [`tomcat_enable_lookups`](#-jira--tomcat_enable_lookups) +* [`tomcat_native_ssl`](#-jira--tomcat_native_ssl) +* [`tomcat_https_port`](#-jira--tomcat_https_port) +* [`tomcat_redirect_https_port`](#-jira--tomcat_redirect_https_port) +* [`tomcat_protocol`](#-jira--tomcat_protocol) +* [`tomcat_protocol_ssl`](#-jira--tomcat_protocol_ssl) +* [`tomcat_use_body_encoding_for_uri`](#-jira--tomcat_use_body_encoding_for_uri) +* [`tomcat_disable_upload_timeout`](#-jira--tomcat_disable_upload_timeout) +* [`tomcat_key_alias`](#-jira--tomcat_key_alias) +* [`tomcat_keystore_file`](#-jira--tomcat_keystore_file) +* [`tomcat_keystore_pass`](#-jira--tomcat_keystore_pass) +* [`tomcat_keystore_type`](#-jira--tomcat_keystore_type) +* [`tomcat_accesslog_format`](#-jira--tomcat_accesslog_format) +* [`tomcat_accesslog_enable_xforwarded_for`](#-jira--tomcat_accesslog_enable_xforwarded_for) +* [`tomcat_max_threads`](#-jira--tomcat_max_threads) +* [`tomcat_accept_count`](#-jira--tomcat_accept_count) +* [`proxy`](#-jira--proxy) +* [`ajp`](#-jira--ajp) +* [`tomcat_default_connector`](#-jira--tomcat_default_connector) +* [`tomcat_additional_connectors`](#-jira--tomcat_additional_connectors) +* [`contextpath`](#-jira--contextpath) +* [`resources`](#-jira--resources) +* [`enable_sso`](#-jira--enable_sso) +* [`application_name`](#-jira--application_name) +* [`application_password`](#-jira--application_password) +* [`application_login_url`](#-jira--application_login_url) +* [`crowd_server_url`](#-jira--crowd_server_url) +* [`crowd_base_url`](#-jira--crowd_base_url) +* [`session_isauthenticated`](#-jira--session_isauthenticated) +* [`session_tokenkey`](#-jira--session_tokenkey) +* [`session_validationinterval`](#-jira--session_validationinterval) +* [`session_lastvalidation`](#-jira--session_lastvalidation) +* [`plugins`](#-jira--plugins) +* [`jvm_permgen`](#-jira--jvm_permgen) +* [`poolsize`](#-jira--poolsize) +* [`enable_connection_pooling`](#-jira--enable_connection_pooling) + +##### `version` Data type: `String` @@ -182,7 +181,7 @@ The JIRA version to install or upgrade to. Changing this will trigger a restart Default value: `'8.13.5'` -##### `product` +##### `product` Data type: `String[1]` @@ -190,7 +189,7 @@ Atlassian product to install. Default value: `'jira'` -##### `installdir` +##### `installdir` Data type: `Stdlib::Absolutepath` @@ -198,7 +197,7 @@ The directory in which JIRA software packages will be extracted Default value: `'/opt/jira'` -##### `homedir` +##### `homedir` Data type: `Stdlib::Absolutepath` @@ -206,15 +205,15 @@ The directory for JIRA's runtime data that persists between versions. Default value: `'/home/jira'` -##### `manage_user` +##### `manage_user` Data type: `Boolean` Whether to manage the service user -Default value: ``true`` +Default value: `true` -##### `user` +##### `user` Data type: `String` @@ -222,7 +221,7 @@ User that the service will run as Default value: `'jira'` -##### `group` +##### `group` Data type: `String` @@ -230,7 +229,7 @@ Group that the service will run as Default value: `'jira'` -##### `installdir_owner` +##### `installdir_owner` Data type: `String[1]` @@ -238,7 +237,7 @@ The owner of the installation directory. Default value: `'root'` -##### `installdir_group` +##### `installdir_group` Data type: `String[1]` @@ -246,7 +245,7 @@ The group of the installation directory. Default value: `'root'` -##### `installdir_mode` +##### `installdir_mode` Data type: `Stdlib::Filemode` @@ -254,31 +253,31 @@ The permissions of the installation directory. Note that the JIRA service user m Default value: `'0755'` -##### `homedir_mode` +##### `homedir_mode` Data type: `Optional[Stdlib::Filemode]` The permissions of the service user's home directory, where JIRA's data will reside -Default value: ``undef`` +Default value: `undef` -##### `uid` +##### `uid` Data type: `Optional[Integer[0]]` The desired UID for the service user -Default value: ``undef`` +Default value: `undef` -##### `gid` +##### `gid` Data type: `Optional[Integer[0]]` The desired GID for the service group -Default value: ``undef`` +Default value: `undef` -##### `shell` +##### `shell` Data type: `Stdlib::Absolutepath` @@ -286,15 +285,15 @@ The shell of the service user Default value: `'/bin/true'` -##### `enable_secure_admin_sessions` +##### `enable_secure_admin_sessions` Data type: `Boolean` Enables secure administrator sessions -Default value: ``true`` +Default value: `true` -##### `jira_config_properties` +##### `jira_config_properties` Data type: `Hash` @@ -303,47 +302,63 @@ See https://confluence.atlassian.com/adminjiraserver0813/advanced-jira-applicati Default value: `{}` -##### `datacenter` +##### `datacenter` Data type: `Boolean` Set to true to enable clustered mode (JIRA Datacenter) -Default value: ``false`` +Default value: `false` -##### `shared_homedir` +##### `shared_homedir` Data type: `Optional[Stdlib::AbsolutePath]` Shared data directory for all JIRA instances in a cluster -Default value: ``undef`` +Default value: `undef` -##### `ehcache_listener_host` +##### `ehcache_listener_host` Data type: `Optional[Stdlib::Host]` EHCache configuration for clustered mode -Default value: ``undef`` +Default value: `undef` -##### `ehcache_listener_port` +##### `ehcache_listener_port` Data type: `Optional[Stdlib::Port]` EHCache configuration for clustered mode -Default value: ``undef`` +Default value: `undef` -##### `ehcache_object_port` +##### `ehcache_object_port` Data type: `Optional[Stdlib::Port]` EHCache configuration for clustered mode -Default value: ``undef`` +Default value: `undef` + +##### `use_jndi_ds` + +Data type: `Boolean` + +If true, the database will be configured as JNDI datasource in server.xml and then referenced in dbconfig.xml + +Default value: `false` -##### `db` +##### `jndi_ds_name` + +Data type: `String[1]` + +Configures the JNDI datasource name + +Default value: `'JiraDS'` + +##### `db` Data type: `Enum['postgresql','mysql','sqlserver','oracle','h2']` @@ -351,7 +366,7 @@ The kind of database to use. Default value: `'postgresql'` -##### `dbname` +##### `dbname` Data type: `String` @@ -359,7 +374,7 @@ The database name to connect to Default value: `'jira'` -##### `dbuser` +##### `dbuser` Data type: `String` @@ -367,7 +382,7 @@ Database username Default value: `'jiraadm'` -##### `dbpassword` +##### `dbpassword` Data type: `String` @@ -375,7 +390,7 @@ Database password Default value: `'mypassword'` -##### `dbserver` +##### `dbserver` Data type: `String` @@ -383,47 +398,47 @@ Database host DNS name or IP address Default value: `'localhost'` -##### `dbport` +##### `dbport` Data type: `Optional[Variant[Integer,String]]` The database port. Default depends on `$db` -Default value: ``undef`` +Default value: `undef` -##### `dbtype` +##### `dbtype` Data type: `Optional[String]` The database type. Default depends on `$db` -Default value: ``undef`` +Default value: `undef` -##### `dbdriver` +##### `dbdriver` Data type: `Optional[String]` The database driver class. Default depends on `$db` -Default value: ``undef`` +Default value: `undef` -##### `dbschema` +##### `dbschema` Data type: `Optional[String[1]]` The database schema, if applicable. Defaults to 'public' with PostgreSQL -Default value: ``undef`` +Default value: `undef` -##### `dburl` +##### `dburl` Data type: `Optional[String]` Set this if you wish to use a custom database URL -Default value: ``undef`` +Default value: `undef` -##### `connection_settings` +##### `connection_settings` Data type: `Optional[String]` @@ -431,25 +446,25 @@ Configures additional JDBC connection properties in dbconfig.xml For PostgreSQL, a default value of "tcpKeepAlive=true;socketTimeout=240" will be used See https://confluence.atlassian.com/jirakb/connection-problems-to-postgresql-result-in-stuck-threads-in-jira-1047534091.html -Default value: ``undef`` +Default value: `undef` -##### `oracle_use_sid` +##### `oracle_use_sid` Data type: `Boolean` Affects the database URL format for Oracle depending on whether you connect via a SID or a service name -Default value: ``true`` +Default value: `true` -##### `mysql_connector_manage` +##### `mysql_connector_manage` Data type: `Boolean` If true, the module will download and install the MySQL connector for JDBC -Default value: ``true`` +Default value: `true` -##### `mysql_connector_version` +##### `mysql_connector_version` Data type: `String` @@ -457,7 +472,7 @@ Version of the connector to install Default value: `'8.0.23'` -##### `mysql_connector_product` +##### `mysql_connector_product` Data type: `String` @@ -465,7 +480,7 @@ Determines the filename for the download Default value: `'mysql-connector-java'` -##### `mysql_connector_install` +##### `mysql_connector_install` Data type: `Stdlib::Absolutepath` @@ -473,7 +488,7 @@ Directory in which the connector will be installed Default value: `'/opt/MySQL-connector'` -##### `mysql_connector_format` +##### `mysql_connector_format` Data type: `String` @@ -481,7 +496,7 @@ Format of the downloaded package Default value: `'tar.gz'` -##### `mysql_connector_url` +##### `mysql_connector_url` Data type: `Stdlib::HTTPUrl` @@ -489,119 +504,119 @@ Source for the connector Default value: `'https://dev.mysql.com/get/Downloads/Connector-J'` -##### `pool_min_size` +##### `pool_min_size` Data type: `Optional[Integer[0]]` Configures pool-min-size in dbconfig.xml -Default value: ``undef`` +Default value: `undef` -##### `pool_max_size` +##### `pool_max_size` Data type: `Optional[Integer[0]]` Configures pool-max-size in dbconfig.xml -Default value: ``undef`` +Default value: `undef` -##### `pool_max_wait` +##### `pool_max_wait` Data type: `Optional[Integer[-1]]` Configures pool-max-wait in dbconfig.xml -Default value: ``undef`` +Default value: `undef` -##### `validation_query` +##### `validation_query` Data type: `Optional[String]` Configures validation_query in dbconfig.xml -Default value: ``undef`` +Default value: `undef` -##### `validation_query_timeout` +##### `validation_query_timeout` Data type: `Optional[Integer[0]]` Configures validation_query_timeout in dbconfig.xml -Default value: ``undef`` +Default value: `undef` -##### `min_evictable_idle_time` +##### `min_evictable_idle_time` Data type: `Optional[Integer[0]]` Configures min-evictable-idle-time-millis in dbconfig.xml -Default value: ``undef`` +Default value: `undef` -##### `time_between_eviction_runs` +##### `time_between_eviction_runs` Data type: `Optional[Integer[0]]` Configures time-between-eviction-runs-millis in dbconfig.xml -Default value: ``undef`` +Default value: `undef` -##### `pool_max_idle` +##### `pool_max_idle` Data type: `Optional[Integer[0]]` Configures pool-max-idle in dbconfig.xml -Default value: ``undef`` +Default value: `undef` -##### `pool_remove_abandoned` +##### `pool_remove_abandoned` Data type: `Optional[Boolean]` Configures pool-remove-abandoned in dbconfig.xml -Default value: ``undef`` +Default value: `undef` -##### `pool_remove_abandoned_timeout` +##### `pool_remove_abandoned_timeout` Data type: `Optional[Integer[0]]` Configures pool-remove-abandoned-timeout in dbconfig.xml -Default value: ``undef`` +Default value: `undef` -##### `pool_test_while_idle` +##### `pool_test_while_idle` Data type: `Optional[Boolean]` Configures pool-test-while-idle in dbconfig.xml -Default value: ``undef`` +Default value: `undef` -##### `pool_test_on_borrow` +##### `pool_test_on_borrow` Data type: `Optional[Boolean]` Configures pool-test-on-borrow in dbconfig.xml -Default value: ``undef`` +Default value: `undef` -##### `java_package` +##### `java_package` Data type: `Optional[String[1]]` If defined, the module will install this package before installing JIRA. -Default value: ``undef`` +Default value: `undef` -##### `javahome` +##### `javahome` Data type: `Optional[Stdlib::AbsolutePath]` The location of an installed JVM. Must be set even if you specify java_package -Default value: ``undef`` +Default value: `undef` -##### `jvm_type` +##### `jvm_type` Data type: `Jira::Jvm_types` @@ -609,7 +624,7 @@ The type of JVM to use. Affects some defaults for the arguments below Default value: `'openjdk-11'` -##### `jvm_xms` +##### `jvm_xms` Data type: `String` @@ -617,7 +632,7 @@ Java -Xms parameter Default value: `'256m'` -##### `jvm_xmx` +##### `jvm_xmx` Data type: `String` @@ -625,39 +640,39 @@ Java -Xmx parameter Default value: `'1024m'` -##### `java_opts` +##### `java_opts` Data type: `Optional[String]` Configures JVM_SUPPORT_RECOMMENDED_ARGS in setenv.sh. This is the preferred option to override. -Default value: ``undef`` +Default value: `undef` -##### `jvm_gc_args` +##### `jvm_gc_args` Data type: `Optional[String]` Configures JVM_GC_ARGS in setenv.sh -Default value: ``undef`` +Default value: `undef` -##### `jvm_code_cache_args` +##### `jvm_code_cache_args` Data type: `Optional[String]` Configures JVM_CODE_CACHE_ARGS in setenv.sh -Default value: ``undef`` +Default value: `undef` -##### `jvm_extra_args` +##### `jvm_extra_args` Data type: `Optional[String]` Configures JVM_EXTRA_ARGS in setenv.sh -Default value: ``undef`` +Default value: `undef` -##### `jvm_nofiles_limit` +##### `jvm_nofiles_limit` Data type: `Integer` @@ -665,15 +680,7 @@ Set the limit for open files Default value: `16384` -##### `catalina_opts` - -Data type: `String` - -Does nothing :-) - -Default value: `''` - -##### `download_url` +##### `download_url` Data type: `Stdlib::HTTPUrl` @@ -681,47 +688,47 @@ Base URL for downloading Atlassian software Default value: `'https://product-downloads.atlassian.com/software/jira/downloads'` -##### `checksum` +##### `checksum` Data type: `Optional[String]` Optional checksum to verify the downloaded package -Default value: ``undef`` +Default value: `undef` -##### `disable_notifications` +##### `disable_notifications` Data type: `Boolean` Configures JIRA to disable e-mail handlers -Default value: ``false`` +Default value: `false` -##### `proxy_server` +##### `proxy_server` Data type: `Optional[String]` Configures the proxy server to use for downloads -Default value: ``undef`` +Default value: `undef` -##### `proxy_type` +##### `proxy_type` Data type: `Optional[Enum['none','http','https','ftp']]` Configures the proxy type -Default value: ``undef`` +Default value: `undef` -##### `service_manage` +##### `service_manage` Data type: `Boolean` Whether to manage the jira service -Default value: ``true`` +Default value: `true` -##### `service_ensure` +##### `service_ensure` Data type: `Stdlib::Ensure::Service` @@ -729,31 +736,31 @@ Service state to ensure Default value: `'running'` -##### `service_enable` +##### `service_enable` Data type: `Boolean` Whether to enable the service on boot -Default value: ``true`` +Default value: `true` -##### `service_notify` +##### `service_notify` Data type: `Any` Service notify parameter -Default value: ``undef`` +Default value: `undef` -##### `service_subscribe` +##### `service_subscribe` Data type: `Any` Service subscribe parameter -Default value: ``undef`` +Default value: `undef` -##### `stop_jira` +##### `stop_jira` Data type: `String` @@ -761,15 +768,15 @@ The command used to stop jira prior to upgrades. You can override this if you us Default value: `'systemctl stop jira.service && sleep 15'` -##### `script_check_java_manage` +##### `script_check_java_manage` Data type: `Boolean` undocumented -Default value: ``false`` +Default value: `false` -##### `script_check_java_template` +##### `script_check_java_template` Data type: `String` @@ -777,15 +784,15 @@ undocumented Default value: `'jira/check-java.sh.erb'` -##### `tomcat_address` +##### `tomcat_address` Data type: `Optional[String]` Tomcat bind address -Default value: ``undef`` +Default value: `undef` -##### `tomcat_port` +##### `tomcat_port` Data type: `Stdlib::Port` @@ -793,7 +800,7 @@ Tomcat bind port Default value: `8080` -##### `tomcat_shutdown_port` +##### `tomcat_shutdown_port` Data type: `Stdlib::Port` @@ -801,7 +808,7 @@ Tomcat shutdown command port Default value: `8005` -##### `tomcat_max_http_header_size` +##### `tomcat_max_http_header_size` Data type: `Integer` @@ -809,7 +816,7 @@ Tomcat connector setting Default value: `8192` -##### `tomcat_min_spare_threads` +##### `tomcat_min_spare_threads` Data type: `Integer[0]` @@ -817,7 +824,7 @@ Tomcat connector setting Default value: `25` -##### `tomcat_connection_timeout` +##### `tomcat_connection_timeout` Data type: `Integer[0]` @@ -825,23 +832,23 @@ Tomcat connector setting Default value: `20000` -##### `tomcat_enable_lookups` +##### `tomcat_enable_lookups` Data type: `Boolean` Tomcat connector setting -Default value: ``false`` +Default value: `false` -##### `tomcat_native_ssl` +##### `tomcat_native_ssl` Data type: `Boolean` Enables a native SSL connector -Default value: ``false`` +Default value: `false` -##### `tomcat_https_port` +##### `tomcat_https_port` Data type: `Stdlib::Port` @@ -849,7 +856,7 @@ Tomcat port for the native SSL connector Default value: `8443` -##### `tomcat_redirect_https_port` +##### `tomcat_redirect_https_port` Data type: `Optional[Stdlib::Port]` @@ -857,9 +864,9 @@ Specify which port to redirect internally when using port redirection from 80 to from 443 to 8443 or with proxy server in front, defaults to $tomcat_https_port. To be used with tomcat_native_ssl. -Default value: ``undef`` +Default value: `undef` -##### `tomcat_protocol` +##### `tomcat_protocol` Data type: `String` @@ -867,31 +874,31 @@ Tomcat connector setting Default value: `'HTTP/1.1'` -##### `tomcat_protocol_ssl` +##### `tomcat_protocol_ssl` Data type: `Optional[String]` Tomcat connector setting -Default value: ``undef`` +Default value: `undef` -##### `tomcat_use_body_encoding_for_uri` +##### `tomcat_use_body_encoding_for_uri` Data type: `Boolean` Tomcat connector setting -Default value: ``true`` +Default value: `true` -##### `tomcat_disable_upload_timeout` +##### `tomcat_disable_upload_timeout` Data type: `Boolean` Tomcat connector setting -Default value: ``true`` +Default value: `true` -##### `tomcat_key_alias` +##### `tomcat_key_alias` Data type: `String` @@ -899,7 +906,7 @@ Key alias in the keystore for the SSL connector Default value: `'jira'` -##### `tomcat_keystore_file` +##### `tomcat_keystore_file` Data type: `Stdlib::Absolutepath` @@ -907,7 +914,7 @@ Path to a Java keystore for the SSL connector Default value: `'/home/jira/jira.jks'` -##### `tomcat_keystore_pass` +##### `tomcat_keystore_pass` Data type: `String` @@ -915,7 +922,7 @@ Keystore passphrase Default value: `'changeit'` -##### `tomcat_keystore_type` +##### `tomcat_keystore_type` Data type: `Enum['JKS', 'JCEKS', 'PKCS12']` @@ -923,7 +930,7 @@ Keystore type Default value: `'JKS'` -##### `tomcat_accesslog_format` +##### `tomcat_accesslog_format` Data type: `String` @@ -931,7 +938,7 @@ Format string for Tomcat access log Default value: `'%a %{jira.request.id}r %{jira.request.username}r %t "%m %U%q %H" %s %b %D "%{Referer}i" "%{User-Agent}i" "%{jira.request.assession.id}r"'` -##### `tomcat_accesslog_enable_xforwarded_for` +##### `tomcat_accesslog_enable_xforwarded_for` Data type: `Boolean` @@ -940,9 +947,9 @@ If a proxy operates before JIRA, the access logs will only contain the IP addres instead of the address of the user. With `X-Forwarded-For` the proxy can forward the users IP address to the JIRA application server so that it can be logged correctly. -Default value: ``false`` +Default value: `false` -##### `tomcat_max_threads` +##### `tomcat_max_threads` Data type: `Integer` @@ -950,7 +957,7 @@ Tomcat connector setting Default value: `150` -##### `tomcat_accept_count` +##### `tomcat_accept_count` Data type: `Integer` @@ -958,7 +965,7 @@ Tomcat connector setting Default value: `100` -##### `proxy` +##### `proxy` Data type: `Hash` @@ -967,7 +974,7 @@ The confusing naming is retained for backwards compatibility Default value: `{}` -##### `ajp` +##### `ajp` Data type: `Hash` @@ -975,15 +982,15 @@ Properties for an AJP connector Default value: `{}` -##### `tomcat_default_connector` +##### `tomcat_default_connector` Data type: `Boolean` If set to false, the default connector will be omitted -Default value: ``true`` +Default value: `true` -##### `tomcat_additional_connectors` +##### `tomcat_additional_connectors` Data type: `Jira::Tomcat_connectors` @@ -1004,15 +1011,15 @@ https://confluence.atlassian.com/kb/how-to-bypass-a-reverse-proxy-or-ssl-in-appl Default value: `{}` -##### `contextpath` +##### `contextpath` -Data type: `String` +Data type: `Optional[String[1]]` Tomcat context path for the web service -Default value: `''` +Default value: `undef` -##### `resources` +##### `resources` Data type: `Hash` @@ -1020,15 +1027,15 @@ undocumented Default value: `{}` -##### `enable_sso` +##### `enable_sso` Data type: `Boolean` Enable single sign-on via Crowd -Default value: ``false`` +Default value: `false` -##### `application_name` +##### `application_name` Data type: `String` @@ -1036,7 +1043,7 @@ Crowd application name Default value: `'crowd'` -##### `application_password` +##### `application_password` Data type: `String` @@ -1044,7 +1051,7 @@ Crowd application password Default value: `'1234'` -##### `application_login_url` +##### `application_login_url` Data type: `Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]` @@ -1052,7 +1059,7 @@ Crowd application login URL Default value: `'https://crowd.example.com/console/'` -##### `crowd_server_url` +##### `crowd_server_url` Data type: `Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]` @@ -1060,7 +1067,7 @@ Crowd server URL Default value: `'https://crowd.example.com/services/'` -##### `crowd_base_url` +##### `crowd_base_url` Data type: `Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]` @@ -1068,7 +1075,7 @@ Crowd base URL Default value: `'https://crowd.example.com/'` -##### `session_isauthenticated` +##### `session_isauthenticated` Data type: `String` @@ -1076,7 +1083,7 @@ undocumented SSO parameter Default value: `'session.isauthenticated'` -##### `session_tokenkey` +##### `session_tokenkey` Data type: `String` @@ -1084,7 +1091,7 @@ undocumented SSO parameter Default value: `'session.tokenkey'` -##### `session_validationinterval` +##### `session_validationinterval` Data type: `Integer` @@ -1092,7 +1099,7 @@ undocumented SSO parameter Default value: `5` -##### `session_lastvalidation` +##### `session_lastvalidation` Data type: `String` @@ -1100,61 +1107,62 @@ undocumented SSO parameter Default value: `'session.lastvalidation'` -##### `jvm_permgen` +##### `plugins` + +Data type: `Array[Hash]` + +an array of hashes defining custom plugins to install +a single plugin configuration will has the following form + installation_name: this name wil be used to install the plugin within jira + source: url of plugin to be fetched + username: the username for authentification, if necessary + password: the password for authentification, if necessary + checksum: the checksum of the plugin, to determine the need for an upgrade + checksumtype: the type of checksum used (none|md5|sha1|sha2|sha256|sha384|sha512). (default: none) + +Default value: `[]` + +##### `jvm_permgen` Data type: `Optional[String]` Deprecated. Exists to notify users that they're trying to configure a parameter that has no effect -Default value: ``undef`` +Default value: `undef` -##### `poolsize` +##### `poolsize` Data type: `Optional[Integer[0]]` Deprecated alias for `$pool_max_size`. -Default value: ``undef`` +Default value: `undef` -##### `enable_connection_pooling` +##### `enable_connection_pooling` Data type: `Optional[Boolean]` Deprecated. Has no effect. -Default value: ``undef`` - -## Functions +Default value: `undef` ## Data types -### `Jira::Jvm_types` +### `Jira::Jvm_types` Java Virtual Machine (JVM) types -Alias of +Alias of `Enum['openjdk-11', 'oracle-jdk-1.8']` -```puppet -Enum['openjdk-11', 'oracle-jdk-1.8'] -``` - -### `Jira::Tomcat_attributes` +### `Jira::Tomcat_attributes` A hash of string keys to arbitrary values that will be rendered as XML attributes -Alias of - -```puppet -Hash[String[1], Scalar] -``` +Alias of `Hash[String[1], Scalar]` -### `Jira::Tomcat_connectors` +### `Jira::Tomcat_connectors` A set of attribute hashes keyed by connector port number -Alias of - -```puppet -Hash[Stdlib::Port::Unprivileged, Jira::Tomcat_attributes] -``` +Alias of `Hash[Stdlib::Port::Unprivileged, Jira::Tomcat_attributes]` From e665bd5ba39e816706e54685d034e7212262d40f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Fern=C3=A1ndez?= Date: Mon, 6 Nov 2023 15:11:24 +0100 Subject: [PATCH 19/36] Fix RuboCop RedundantFileExtensionInRequire exception --- spec/spec_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6382b3f6..4cc55f2a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -18,5 +18,5 @@ end end -require 'support/acceptance/constants.rb' +require 'support/acceptance/constants' Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f } From 43bb4d1866587fbf5e54e0fc18211976831652c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Fern=C3=A1ndez?= Date: Mon, 6 Nov 2023 15:43:56 +0100 Subject: [PATCH 20/36] Replace install_module_from_forge_on by install_puppet_module_via_pmt_on --- spec/spec_helper_acceptance.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index a09491af..6113d619 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -4,11 +4,11 @@ require 'voxpupuli/acceptance/spec_helper_acceptance' configure_beaker do |host| - install_module_from_forge_on(host, 'puppetlabs-apt', '>= 4.1.0 < 9.0.0') if fact_on(host, 'os.family') == 'Debian' - install_module_from_forge_on(host, 'puppetlabs-java', '>= 2.1.0 < 8.0.0') - install_module_from_forge_on(host, 'puppetlabs-java_ks', '>= 1.6.0 < 4.0.0') - install_module_from_forge_on(host, 'puppetlabs-mysql', '>= 4.0.1 < 13.0.0') - install_module_from_forge_on(host, 'puppetlabs-postgresql', '>= 5.1.0 < 8.0.0') + install_puppet_module_via_pmt_on(host, 'puppetlabs-apt') if fact_on(host, 'os.family') == 'Debian' + install_puppet_module_via_pmt_on(host, 'puppetlabs-java') + install_puppet_module_via_pmt_on(host, 'puppetlabs-java_ks') + install_puppet_module_via_pmt_on(host, 'puppetlabs-mysql') + install_puppet_module_via_pmt_on(host, 'puppetlabs-postgresql') end Dir['./spec/support/acceptance/**/*.rb'].sort.each { |f| require f } From e1ac1628bb17f46e19bec6c857388a6f5dca525e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Fern=C3=A1ndez?= Date: Mon, 6 Nov 2023 17:02:25 +0100 Subject: [PATCH 21/36] Wait for 120s before checking jira is up and running --- spec/acceptance/default_parameters_spec.rb | 12 ++++++------ spec/acceptance/mysql_spec.rb | 6 +++--- spec/support/acceptance/constants.rb | 2 ++ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/spec/acceptance/default_parameters_spec.rb b/spec/acceptance/default_parameters_spec.rb index f7f1376f..f03a4e04 100644 --- a/spec/acceptance/default_parameters_spec.rb +++ b/spec/acceptance/default_parameters_spec.rb @@ -49,17 +49,17 @@ class { 'jira': # jira just takes *ages* to start up :-( wget_cmd = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 localhost:8080' apply_manifest(pp, catch_failures: true) - sleep 60 + sleep SLEEP_SECONDS shell wget_cmd, acceptable_exit_codes: [0, 8] - sleep 60 + sleep SLEEP_SECONDS shell wget_cmd, acceptable_exit_codes: [0, 8] - sleep 60 + sleep SLEEP_SECONDS apply_manifest(pp_upgrade, catch_failures: true) - sleep 60 + sleep SLEEP_SECONDS shell wget_cmd, acceptable_exit_codes: [0, 8] - sleep 60 + sleep SLEEP_SECONDS shell wget_cmd, acceptable_exit_codes: [0, 8] - sleep 60 + sleep SLEEP_SECONDS apply_manifest(pp_upgrade, catch_failures: true) end diff --git a/spec/acceptance/mysql_spec.rb b/spec/acceptance/mysql_spec.rb index 169a2bfa..b286e299 100644 --- a/spec/acceptance/mysql_spec.rb +++ b/spec/acceptance/mysql_spec.rb @@ -64,11 +64,11 @@ class { 'jira': wget_cmd = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 --no-check-certificate localhost:8081' apply_manifest(pp, catch_failures: true) - sleep 60 + sleep SLEEP_SECONDS shell wget_cmd, acceptable_exit_codes: [0, 8] - sleep 60 + sleep SLEEP_SECONDS shell wget_cmd, acceptable_exit_codes: [0, 8] - sleep 60 + sleep SLEEP_SECONDS apply_manifest(pp, catch_changes: true) end diff --git a/spec/support/acceptance/constants.rb b/spec/support/acceptance/constants.rb index 880f217a..429eec66 100644 --- a/spec/support/acceptance/constants.rb +++ b/spec/support/acceptance/constants.rb @@ -16,3 +16,5 @@ FILENAME_DBCONFIG_XML = '/home/jira/dbconfig.xml' FILENAME_CLUSTER_PROPS = '/home/jira/cluster.properties' FILENAME_JIRA_CONFIG_PROPS = '/home/jira/jira-config.properties' + +SLEEP_SECONDS = 120 From 684313d800e4558b5c801fcea21ddd9306256e10 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 15 Dec 2023 13:20:03 +0100 Subject: [PATCH 22/36] modulesync 7.2.0 --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- .msync.yml | 2 +- .pmtignore | 1 + Gemfile | 4 ++-- spec/spec_helper.rb | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a077911..b66d8ca7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,6 @@ concurrency: jobs: puppet: name: Puppet - uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1 + uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v2 with: pidfile_workaround: 'false' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 15f17213..55324aa6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ on: jobs: release: name: Release - uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v1 + uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v2 with: allowed_owner: 'voxpupuli' secrets: diff --git a/.msync.yml b/.msync.yml index 76cd4646..f8183449 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '7.1.0' +modulesync_config_version: '7.2.0' diff --git a/.pmtignore b/.pmtignore index 58a04088..10b98306 100644 --- a/.pmtignore +++ b/.pmtignore @@ -35,3 +35,4 @@ /.yardoc/ /.yardopts /Dockerfile +/HISTORY.md diff --git a/Gemfile b/Gemfile index 416aa113..c03b7520 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ group :test do gem 'voxpupuli-test', '~> 7.0', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false - gem 'puppet_metadata', '~> 3.0', :require => false + gem 'puppet_metadata', '~> 3.5', :require => false gem 'puppet-lint-param-docs', :require => false end @@ -17,7 +17,7 @@ group :development do end group :system_tests do - gem 'voxpupuli-acceptance', '~> 2.0', :require => false + gem 'voxpupuli-acceptance', '~> 3.0', :require => false end group :release do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4cc55f2a..6382b3f6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -18,5 +18,5 @@ end end -require 'support/acceptance/constants' +require 'support/acceptance/constants.rb' Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f } From 0cd431d9dc305d4af92b34c75174e62489000b93 Mon Sep 17 00:00:00 2001 From: markuszilch Date: Tue, 6 Feb 2024 12:33:42 +0100 Subject: [PATCH 23/36] modulesync 7.3.0 --- .github/workflows/ci.yml | 7 ++++++- .msync.yml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b66d8ca7..7216724f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,12 @@ name: CI -on: pull_request +on: + pull_request: {} + push: + branches: + - main + - master concurrency: group: ${{ github.ref_name }} diff --git a/.msync.yml b/.msync.yml index f8183449..f46ee025 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '7.2.0' +modulesync_config_version: '7.3.0' From d076f72a08e4d9c5d48424dba9de4d206208d68e Mon Sep 17 00:00:00 2001 From: Hugo Haakseth Date: Thu, 18 Jan 2024 00:06:22 +0100 Subject: [PATCH 24/36] support java version reported by openjdk 11 on centos-stream8 --- templates/check-java.sh.erb | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/templates/check-java.sh.erb b/templates/check-java.sh.erb index 9af7e3e3..9153fc8d 100644 --- a/templates/check-java.sh.erb +++ b/templates/check-java.sh.erb @@ -4,7 +4,7 @@ # This file is nearly identical to 'check-java.sh' in the Jira 8.15.0 standalone tarball. Shebang was changed to bash # (does not need to stay /bin/sh, since it is called by catalina.sh, which itself has /bin/bash as shebang) to allow # bashisms. Also errors detected by shellcheck were fixed . - +# The file also fixes https://jira.atlassian.com/browse/JRASERVER-77097 # # check for correct java version by parsing out put of java -version # we expect first line to be in format 'java version "1.8.0_161"' or 'java version "10.0.1" 2018-04-17' @@ -17,20 +17,18 @@ java_version=0 if [[ $java_raw_version = *-ea* ]] then - # early access format e.g 11-ea - IFS='-' read -ra values <<< "$java_raw_version" - java_version=${values[0]} + # early access format e.g 11-ea or 11.0.18-ea + IFS='-' read -ra java_raw_version <<< "$java_raw_version" +fi +if [[ $java_raw_version = 1.* ]] +then + # old format e.g. 1.8.0_161 + IFS='.' read -ra values <<< "$java_raw_version" + java_version=${values[1]} else - if [[ $java_raw_version = 1.* ]] - then - # old format e.g. 1.8.0_161 - IFS='.' read -ra values <<< "$java_raw_version" - java_version=${values[1]} - else - # new format e.g. 10.0.1 - IFS='.' read -ra values <<< "$java_raw_version" - java_version=${values[0]} - fi + # new format e.g. 10.0.1 + IFS='.' read -ra values <<< "$java_raw_version" + java_version=${values[0]} fi if [ "$java_version" -ne 8 ] && [ "$java_version" -ne 11 ] From 468caae9fc2a262740aa32a8de3e6aec5430de41 Mon Sep 17 00:00:00 2001 From: Hugo Haakseth Date: Thu, 18 Jan 2024 00:09:02 +0100 Subject: [PATCH 25/36] fix rubocop error --- spec/spec_helper.rb | 1 - spec/support/acceptance/constants.rb | 16 ---------------- spec/support/spec/constants.rb | 18 ++++++++++++++++++ 3 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 spec/support/spec/constants.rb diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6382b3f6..1cc84c92 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -18,5 +18,4 @@ end end -require 'support/acceptance/constants.rb' Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f } diff --git a/spec/support/acceptance/constants.rb b/spec/support/acceptance/constants.rb index 429eec66..c10eb90b 100644 --- a/spec/support/acceptance/constants.rb +++ b/spec/support/acceptance/constants.rb @@ -1,20 +1,4 @@ # frozen_string_literal: true # set some constants to keep it DRY -DEFAULT_VERSION = '8.13.5' -PRODUCT_VERSION_STRING = "atlassian-jira-software-#{DEFAULT_VERSION}" -PRODUCT_VERSION_STRING_CORE = "atlassian-jira-core-#{DEFAULT_VERSION}" - -PATH_JAVA_HOME = '/opt/java' -PATH_JIRA_DIR = '/opt/jira' -PATH_INSTALLATION_BASE = "#{PATH_JIRA_DIR}/#{PRODUCT_VERSION_STRING}-standalone" - -FILENAME_SETENV_SH = "#{PATH_INSTALLATION_BASE}/bin/setenv.sh" -FILENAME_USER_SH = "#{PATH_INSTALLATION_BASE}/bin/user.sh" -FILENAME_CHECK_JAVA_SH = "#{PATH_INSTALLATION_BASE}/bin/check-java.sh" -FILENAME_SERVER_XML = "#{PATH_INSTALLATION_BASE}/conf/server.xml" -FILENAME_DBCONFIG_XML = '/home/jira/dbconfig.xml' -FILENAME_CLUSTER_PROPS = '/home/jira/cluster.properties' -FILENAME_JIRA_CONFIG_PROPS = '/home/jira/jira-config.properties' - SLEEP_SECONDS = 120 diff --git a/spec/support/spec/constants.rb b/spec/support/spec/constants.rb new file mode 100644 index 00000000..880f217a --- /dev/null +++ b/spec/support/spec/constants.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +# set some constants to keep it DRY +DEFAULT_VERSION = '8.13.5' +PRODUCT_VERSION_STRING = "atlassian-jira-software-#{DEFAULT_VERSION}" +PRODUCT_VERSION_STRING_CORE = "atlassian-jira-core-#{DEFAULT_VERSION}" + +PATH_JAVA_HOME = '/opt/java' +PATH_JIRA_DIR = '/opt/jira' +PATH_INSTALLATION_BASE = "#{PATH_JIRA_DIR}/#{PRODUCT_VERSION_STRING}-standalone" + +FILENAME_SETENV_SH = "#{PATH_INSTALLATION_BASE}/bin/setenv.sh" +FILENAME_USER_SH = "#{PATH_INSTALLATION_BASE}/bin/user.sh" +FILENAME_CHECK_JAVA_SH = "#{PATH_INSTALLATION_BASE}/bin/check-java.sh" +FILENAME_SERVER_XML = "#{PATH_INSTALLATION_BASE}/conf/server.xml" +FILENAME_DBCONFIG_XML = '/home/jira/dbconfig.xml' +FILENAME_CLUSTER_PROPS = '/home/jira/cluster.properties' +FILENAME_JIRA_CONFIG_PROPS = '/home/jira/jira-config.properties' From 561e833d489713f3c62cd0b406aa9bb2b3bcbed1 Mon Sep 17 00:00:00 2001 From: Hugo Haakseth Date: Thu, 18 Jan 2024 00:09:35 +0100 Subject: [PATCH 26/36] fix acceptance tests --- spec/acceptance/default_parameters_spec.rb | 40 ++++++++++------ spec/acceptance/mysql_spec.rb | 56 +++++++++++++++------- 2 files changed, 65 insertions(+), 31 deletions(-) diff --git a/spec/acceptance/default_parameters_spec.rb b/spec/acceptance/default_parameters_spec.rb index f03a4e04..e46486a8 100644 --- a/spec/acceptance/default_parameters_spec.rb +++ b/spec/acceptance/default_parameters_spec.rb @@ -15,17 +15,27 @@ 'Debian' => '/usr/lib/jvm/java-1.11.0-openjdk-amd64', } - class { 'postgresql::server': } + # The output of `systemctl status postgresql` is non ascii which + # breaks the Exec in Postgresql::Server::Instance::Reload + # on rhel based docker containers + # We don't need the output. + class { 'postgresql::server': + service_status => 'systemctl status postgresql > /dev/null' + } postgresql::server::db { 'jira': user => 'jiraadm', password => postgresql::postgresql_password('jiraadm', 'mypassword'), } + # There is a bug in the check-java.sh that prevents jira from starting on Centos Stream 8 + # https://jira.atlassian.com/browse/JRASERVER-77097 + # Running with script_check_java_manage => true to solve this class { 'jira': - java_package => $java_package, - javahome => $java_home, - require => Postgresql::Server::Db['jira'], + java_package => $java_package, + javahome => $java_home, + script_check_java_manage => true, + require => Postgresql::Server::Db['jira'], } EOS pp_upgrade = <<-EOS @@ -40,9 +50,10 @@ class { 'jira': } class { 'jira': - version => '8.16.0', - java_package => $java_package, - javahome => $java_home, + version => '8.16.0', + java_package => $java_package, + javahome => $java_home, + script_check_java_manage => true, } EOS @@ -53,14 +64,16 @@ class { 'jira': shell wget_cmd, acceptable_exit_codes: [0, 8] sleep SLEEP_SECONDS shell wget_cmd, acceptable_exit_codes: [0, 8] - sleep SLEEP_SECONDS + + apply_manifest(pp, catch_changes: true) + apply_manifest(pp_upgrade, catch_failures: true) sleep SLEEP_SECONDS shell wget_cmd, acceptable_exit_codes: [0, 8] sleep SLEEP_SECONDS shell wget_cmd, acceptable_exit_codes: [0, 8] - sleep SLEEP_SECONDS - apply_manifest(pp_upgrade, catch_failures: true) + + apply_manifest(pp_upgrade, catch_changes: true) end describe process('java') do @@ -76,10 +89,9 @@ class { 'jira': it { is_expected.to be_running } end - specify do - expect(user('jira')).to exist. - and belong_to_group 'jira'. - and have_login_shell '/bin/true' + describe user('jira') do + it { is_expected.to belong_to_group 'jira' } + it { is_expected.to have_login_shell '/bin/true' } end describe command('wget -q --tries=24 --retry-connrefused --read-timeout=10 -O- localhost:8080') do diff --git a/spec/acceptance/mysql_spec.rb b/spec/acceptance/mysql_spec.rb index b286e299..8bfb3777 100644 --- a/spec/acceptance/mysql_spec.rb +++ b/spec/acceptance/mysql_spec.rb @@ -5,8 +5,27 @@ describe 'jira mysql' do it 'installs with defaults' do pp = <<-EOS + # On ubuntu 20.04 and 22.04 the default is to install mariadb + # As the ubuntu 20.04 runner we use in github actions allready has mysql installed + # a apparmor error is triggerd when using mariadb in this test.. + # Forcing the use of mysql + if $facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'], '20.04') >= 0 { + $mysql_service_name = 'mysql' + $mysql_server_package = 'mysql-server' + $mysql_client_package = 'mysql-client' + } else { + $mysql_service_name = undef + $mysql_server_package = undef + $mysql_client_package = undef + } + class { 'mysql::server': root_password => 'strongpassword', + package_name => $mysql_server_package, + service_name => $mysql_service_name, + } + class { 'mysql::client': + package_name => $mysql_client_package, } # Default MySQL is too old for utf8mb4 on CentOS 7, or something. Also Ubuntu 20.04 @@ -46,19 +65,23 @@ class { 'java': require => Exec['tmpkey'], } + # There is a bug in the check-java.sh that prevents jira from starting on Centos Stream 8 + # https://jira.atlassian.com/browse/JRASERVER-77097 + # Running with script_check_java_manage => true to solve this class { 'jira': - installdir => '/opt/atlassian-jira', - homedir => '/opt/jira-home', - javahome => '/usr', - jvm_type => 'oracle-jdk-1.8', - db => 'mysql', - dbport => 3306, - dbdriver => 'com.mysql.jdbc.Driver', - dbtype => 'mysql', - tomcat_port => 8081, - tomcat_native_ssl => true, - tomcat_keystore_file => '/tmp/jira.ks', - require => [Mysql::Db['jira'], Java_ks['jira']], + installdir => '/opt/atlassian-jira', + homedir => '/opt/jira-home', + javahome => '/usr', + jvm_type => 'oracle-jdk-1.8', + db => 'mysql', + dbport => 3306, + dbdriver => 'com.mysql.jdbc.Driver', + dbtype => 'mysql', + tomcat_port => 8081, + tomcat_native_ssl => true, + tomcat_keystore_file => '/tmp/jira.ks', + script_check_java_manage => true, + require => [Mysql::Db['jira'], Java_ks['jira']], } EOS @@ -68,7 +91,7 @@ class { 'jira': shell wget_cmd, acceptable_exit_codes: [0, 8] sleep SLEEP_SECONDS shell wget_cmd, acceptable_exit_codes: [0, 8] - sleep SLEEP_SECONDS + apply_manifest(pp, catch_changes: true) end @@ -85,10 +108,9 @@ class { 'jira': it { is_expected.to be_running } end - specify do - expect(user('jira')).to exist. - and belong_to_group 'jira'. - and have_login_shell '/bin/true' + describe user('jira') do + it { is_expected.to belong_to_group 'jira' } + it { is_expected.to have_login_shell '/bin/true' } end specify do From 6ec9337798880a8f48d1a9c850933947a2f48f36 Mon Sep 17 00:00:00 2001 From: Hugo Haakseth Date: Thu, 18 Jan 2024 14:23:05 +0100 Subject: [PATCH 27/36] allow latest dependency versions --- metadata.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/metadata.json b/metadata.json index 7f7e60f2..a1ae0c2e 100644 --- a/metadata.json +++ b/metadata.json @@ -14,15 +14,15 @@ "dependencies": [ { "name": "puppet/systemd", - "version_requirement": ">= 3.0.0 < 4.0.0" + "version_requirement": ">= 3.0.0 < 7.0.0" }, { "name": "puppetlabs/stdlib", - "version_requirement": ">= 4.25.0 < 9.0.0" + "version_requirement": ">= 4.25.0 < 10.0.0" }, { "name": "puppet/archive", - "version_requirement": ">= 1.0.0 < 7.0.0" + "version_requirement": ">= 1.0.0 < 8.0.0" } ], "requirements": [ From 35fb35794ed5d71c3d251b7a67e2fc86a6e4c8dd Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sun, 2 Jul 2023 23:55:12 +0200 Subject: [PATCH 28/36] Add Puppet 8 support --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index a1ae0c2e..20a08b65 100644 --- a/metadata.json +++ b/metadata.json @@ -28,7 +28,7 @@ "requirements": [ { "name": "puppet", - "version_requirement": ">= 7.0.0 < 8.0.0" + "version_requirement": ">= 7.0.0 < 9.0.0" } ], "operatingsystem_support": [ From f72cf081e4e6cbc6d1baa70ce05f5d75f0fe2770 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 12 Feb 2024 10:34:18 +0100 Subject: [PATCH 29/36] replace topscope facts --- spec/acceptance/mysql_spec.rb | 2 +- templates/cluster.properties.epp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/acceptance/mysql_spec.rb b/spec/acceptance/mysql_spec.rb index 8bfb3777..9c18e857 100644 --- a/spec/acceptance/mysql_spec.rb +++ b/spec/acceptance/mysql_spec.rb @@ -50,7 +50,7 @@ class { 'java': } exec { 'tmpkey': - command => "openssl req -x509 -nodes -days 1 -subj '/C=CA/ST=QC/L=Montreal/O=FOO/CN=${fqdn}' -newkey rsa:1024 -keyout /tmp/key.pem -out /tmp/cert.pem", + command => "openssl req -x509 -nodes -days 1 -subj '/C=CA/ST=QC/L=Montreal/O=FOO/CN=${facts['networking']['fqdn']}' -newkey rsa:1024 -keyout /tmp/key.pem -out /tmp/cert.pem", path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ], creates => '/tmp/cert.pem', } diff --git a/templates/cluster.properties.epp b/templates/cluster.properties.epp index 38c50cdc..d66586c8 100644 --- a/templates/cluster.properties.epp +++ b/templates/cluster.properties.epp @@ -1,5 +1,5 @@ # This ID must be unique across the cluster -jira.node.id = <%= $facts['fqdn'] %> +jira.node.id = <%= $facts['networking']['fqdn'] %> # The location of the shared home directory for all JIRA nodes jira.shared.home = <%= $jira::shared_homedir %> <% if $jira::ehcache_listener_host { -%> From 0a4d22f28df92b701bd872e9884887ea158e2880 Mon Sep 17 00:00:00 2001 From: valentino-aguiar-gsa <138504252+valentino-aguiar-gsa@users.noreply.github.com> Date: Fri, 12 Jan 2024 12:31:59 +0000 Subject: [PATCH 30/36] Bugfix java 17 support per atlassian upstream See https://jira.atlassian.com/browse/JRASERVER-76224 for details on this. This snippet was taken directly from the setenv.sh script from JIRA 9.11.1. --- templates/setenv.sh.epp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/setenv.sh.epp b/templates/setenv.sh.epp index 271be6c2..c212c01a 100755 --- a/templates/setenv.sh.epp +++ b/templates/setenv.sh.epp @@ -89,6 +89,14 @@ fi JAVA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} ${JVM_CODE_CACHE_ARGS} ${JAVA_OPTS} ${JVM_REQUIRED_ARGS} ${DISABLE_NOTIFICATIONS} ${JVM_SUPPORT_RECOMMENDED_ARGS} ${JVM_EXTRA_ARGS} ${JIRA_HOME_MINUSD} ${START_JIRA_JAVA_OPTS}" +j_ver=`echo "$($JAVA_HOME/bin/java -version 2>&1)" | grep "version" | awk '{ print substr($3, 2, length($3)-2); }'` +IFS='.' read -a j_ver_parts <<< "$j_ver" + +if [[ ${j_ver_parts[0]} = 17 ]]; then + JVM_OPENS=$(cat $PRGDIR/java-opens.txt) + JAVA_OPTS="$JVM_OPENS $JAVA_OPTS" +fi + export JAVA_OPTS # DO NOT remove the following line From 0f42b7f81c9161898d85d3fea1f3d942ec6e2714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Tarti=C3=A8re?= Date: Wed, 22 Nov 2023 16:35:16 -1000 Subject: [PATCH 31/36] Remove legacy top-scope syntax --- CHANGELOG.md | 2 +- HISTORY.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a33668e7..29a5b14a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -379,7 +379,7 @@ This is the last release with Puppet 3 support! - We added JIRA 7 Support ### Improvements -- Use defined function to test for the existence of the fact ::jira_ver +- Use defined function to test for the existence of the fact jira_ver - Added hieradata examples for Oracle DB backend - Added containment for mysql_connector class - Support STRICT_VARIABLES=yes diff --git a/HISTORY.md b/HISTORY.md index d4186305..75d94d73 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -59,7 +59,7 @@ This is the last release with Puppet 3 support! - We added JIRA 7 Support ### Improvements -- Use defined function to test for the existence of the fact ::jira_ver +- Use defined function to test for the existence of the fact jira_ver - Added hieradata examples for Oracle DB backend - Added containment for mysql_connector class - Support STRICT_VARIABLES=yes From e033f2dd9dfce6f59e9af12dd5ffcd7b50bb2e73 Mon Sep 17 00:00:00 2001 From: Hugo Haakseth Date: Tue, 13 Feb 2024 13:59:12 +0100 Subject: [PATCH 32/36] Release 6.0.0 --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ metadata.json | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29a5b14a..d573221f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,36 @@ All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module. +## [v6.0.0](https://github.com/voxpupuli/puppet-jira/tree/v6.0.0) (2024-02-13) + +[Full Changelog](https://github.com/voxpupuli/puppet-jira/compare/v5.1.0...v6.0.0) + +**Breaking changes:** + +- Drop Puppet 6 support [\#404](https://github.com/voxpupuli/puppet-jira/pull/404) ([bastelfreak](https://github.com/bastelfreak)) + +**Implemented enhancements:** + +- Fix tests with modulesync 7.3.0; allow latest dependency versions [\#414](https://github.com/voxpupuli/puppet-jira/pull/414) ([h-haaks](https://github.com/h-haaks)) +- Add Puppet 8 support [\#408](https://github.com/voxpupuli/puppet-jira/pull/408) ([bastelfreak](https://github.com/bastelfreak)) +- Allow custom plugin installation and usage of JNDI database connections [\#389](https://github.com/voxpupuli/puppet-jira/pull/389) ([ThomasMinor](https://github.com/ThomasMinor)) + +**Fixed bugs:** + +- Update setenv.sh.epp if statement to work with service desk [\#400](https://github.com/voxpupuli/puppet-jira/pull/400) ([techtino](https://github.com/techtino)) +- Avoid duplicate scheme declaration when using proxy with SSL [\#396](https://github.com/voxpupuli/puppet-jira/pull/396) ([jmcnatt](https://github.com/jmcnatt)) + +**Closed issues:** + +- JVM\_OPENS not set for JIRA Java 17 support [\#412](https://github.com/voxpupuli/puppet-jira/issues/412) +- cluster.properties.epp - soon to be deprecated code by Puppet 8 [\#411](https://github.com/voxpupuli/puppet-jira/issues/411) + +**Merged pull requests:** + +- Bugfix java 17 support per atlassian upstream [\#413](https://github.com/voxpupuli/puppet-jira/pull/413) ([valentino-aguiar-gsa](https://github.com/valentino-aguiar-gsa)) +- Remove legacy top-scope syntax [\#410](https://github.com/voxpupuli/puppet-jira/pull/410) ([smortex](https://github.com/smortex)) +- Allow up-to-date dependencies [\#393](https://github.com/voxpupuli/puppet-jira/pull/393) ([smortex](https://github.com/smortex)) + ## [v5.1.0](https://github.com/voxpupuli/puppet-jira/tree/v5.1.0) (2021-08-20) [Full Changelog](https://github.com/voxpupuli/puppet-jira/compare/v5.0.1...v5.1.0) diff --git a/metadata.json b/metadata.json index 20a08b65..c1504d7f 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "puppet-jira", - "version": "5.1.1-rc0", + "version": "6.0.0", "author": "Vox Pupuli", "summary": "Module to install, configure and manage Atlassian Jira", "license": "Apache-2.0", From 8603b5ad87eb1e93b5c8191f395d55baecab20f4 Mon Sep 17 00:00:00 2001 From: Hugo Haakseth Date: Tue, 13 Feb 2024 14:10:31 +0000 Subject: [PATCH 33/36] [blacksmith] Bump version to 6.0.1-rc0 --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index c1504d7f..5d247ce1 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "puppet-jira", - "version": "6.0.0", + "version": "6.0.1-rc0", "author": "Vox Pupuli", "summary": "Module to install, configure and manage Atlassian Jira", "license": "Apache-2.0", From 01ce03c16b10581d743597bc214ddde30b610e2f Mon Sep 17 00:00:00 2001 From: Christos Papageorgiou Date: Thu, 25 Nov 2021 12:44:26 +0200 Subject: [PATCH 34/36] Add Debian support --- metadata.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/metadata.json b/metadata.json index 5d247ce1..38ac590f 100644 --- a/metadata.json +++ b/metadata.json @@ -59,6 +59,12 @@ "7" ] }, + { + "operatingsystem": "Debian", + "operatingsystemrelease": [ + "11" + ] + }, { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ From 1b312bbb60c4197d224b4039eb18cd2b583c4d78 Mon Sep 17 00:00:00 2001 From: Robert Waffen Date: Fri, 1 Mar 2024 10:38:46 +0100 Subject: [PATCH 35/36] Update Readme, fix CI Badge, Links, Code Block formats, add Reference again --- README.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c01cd312..5be5471a 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ # JIRA module for Puppet -[![Build Status](https://travis-ci.org/voxpupuli/puppet-jira.png?branch=master)](https://travis-ci.org/voxpupuli/puppet-jira) +[![CI](https://github.com/voxpupuli/puppet-jira/actions/workflows/ci.yml/badge.svg)](https://github.com/voxpupuli/puppet-jira/actions/workflows/ci.yml) [![Code Coverage](https://coveralls.io/repos/github/voxpupuli/puppet-jira/badge.svg?branch=master)](https://coveralls.io/github/voxpupuli/puppet-jira) [![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/jira.svg)](https://forge.puppetlabs.com/puppet/jira) [![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/jira.svg)](https://forge.puppetlabs.com/puppet/jira) [![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/jira.svg)](https://forge.puppetlabs.com/puppet/jira) [![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/jira.svg)](https://forge.puppetlabs.com/puppet/jira) -#### Table of Contents +## Table of Contents 1. [Overview](#overview) 2. [Module Description - What the module does and why it is useful](#module-description) 3. [Setup - The basics of getting started with JIRA](#setup) - * [JIRA Prerequisites](#JIRA-prerequisites) - * [What JIRA affects](#what-JIRA-affects) - * [Beginning with JIRA](#beginning-with-JIRA) + * [JIRA Prerequisites](#jira-prerequisites) + * [What JIRA affects](#what-jira-affects) + * [Beginning with JIRA](#beginning-with-jira) * [Upgrades](#upgrades) 4. [Usage - Configuration options and additional functionality](#usage) 5. [Reference - An under-the-hood peek at what the module is doing and how](#reference) @@ -247,6 +247,10 @@ Reverse proxy can be configured as a hash as part of the JIRA resource }, ``` +## Reference + +see [REFERENCE.md](REFERENCE.md) + ## Limitations * Puppet 6.1.0 @@ -274,18 +278,20 @@ Please feel free to raise any issues here for bug fixes. We also welcome feature requests. Feel free to make a pull request for anything and we make the effort to review and merge. We prefer with tests if possible. -## Testing - How to test the JIRA module +## Testing + +### How to test the JIRA module Using [puppetlabs_spec_helper](https://github.com/puppetlabs/puppetlabs_spec_helper). Simply run: -``` +```shell bundle install && bundle exec rake spec ``` to get results. -``` +```shell ruby -S rspec spec/classes/jira_install_spec.rb --color . @@ -298,7 +304,7 @@ Using [Beaker - Puppet Labs cloud enabled acceptance testing tool.](https://gith The beaker tests will install oracle Java to /opt/java. When running the beaker tests you agree that you accept the [oracle java license](http://www.oracle.com/technetwork/java/javase/terms/license/index.html). -``` +```shell bundle install BEAKER_set=ubuntu-server-12042-x64 bundle exec rake beaker BEAKER_set=ubuntu-server-1404-x64 bundle exec rake beaker @@ -311,7 +317,7 @@ BEAKER_set=centos-64-x64-pe bundle exec rake beaker To save build time it is useful to host the installation files locally on a web server. You can use the download_url environment variable to overwrite the default. -```bash +```shell export download_url="'http://my.local.server/'" ``` From 2ec4fb8b2beb61c8faebf8872207355c0cdd59b3 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 12 Apr 2024 13:26:51 +0200 Subject: [PATCH 36/36] modulesync 7.4.0 --- .github/CONTRIBUTING.md | 16 +++++++++++++--- .gitignore | 2 ++ .msync.yml | 2 +- Dockerfile | 24 ------------------------ 4 files changed, 16 insertions(+), 28 deletions(-) delete mode 100644 Dockerfile diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6aaa603f..88093274 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -131,19 +131,29 @@ You can install all needed gems for spec tests into the modules directory by running: ```sh -bundle install --path .vendor/ --without development system_tests release --jobs "$(nproc)" +bundle config set --local path '.vendor/' +bundle config set --local without 'development system_tests release' +bundle install --jobs "$(nproc)" ``` If you also want to run acceptance tests: ```sh -bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)" +bundle config set --local path '.vendor/' +bundle config set --local without 'development release' +bundle config set --local with 'system_tests' +bundle install --jobs "$(nproc)" ``` Our all in one solution if you don't know if you need to install or update gems: ```sh -bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"; bundle update; bundle clean +bundle config set --local path '.vendor/' +bundle config set --local without 'development release' +bundle config set --local with 'system_tests' +bundle install --jobs "$(nproc)" +bundle update +bundle clean ``` As an alternative to the `--jobs "$(nproc)` parameter, you can set an diff --git a/.gitignore b/.gitignore index 84fd904c..adea1b01 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ .*.sw? /.yardoc/ /Guardfile +bolt-debug.log +.rerun.json diff --git a/.msync.yml b/.msync.yml index f46ee025..28b61dcf 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '7.3.0' +modulesync_config_version: '7.4.0' diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 8dd82d63..00000000 --- a/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# MANAGED BY MODULESYNC -# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ - -FROM ruby:2.7 - -WORKDIR /opt/puppet - -# https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39 -RUN mkdir -p /etc/sv - -ARG PUPPET_GEM_VERSION="~> 6.0" -ARG PARALLEL_TEST_PROCESSORS=4 - -# Cache gems -COPY Gemfile . -RUN bundle install --without system_tests development release --path=${BUNDLE_PATH:-vendor/bundle} - -COPY . . - -RUN bundle install -RUN bundle exec rake release_checks - -# Container should not saved -RUN exit 1