From 6c3ce54c50c960fa12420b700f88973ad38430c9 Mon Sep 17 00:00:00 2001 From: Tim Chen Date: Tue, 14 Aug 2018 16:27:30 +1000 Subject: [PATCH 1/2] Added support for new commercial edition download. --- README.md | 1 + manifests/init.pp | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index edf55aaa..ce514ba1 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ or class { 'sonarqube': arch => 'linux-x86-64', version => '5.1, + edition => 'community', user => 'sonar', group => 'sonar', service => 'sonar', diff --git a/manifests/init.pp b/manifests/init.pp index 3a96b781..35949415 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -13,6 +13,7 @@ # limitations under the License. class sonarqube ( $version = '4.5.5', + $edition = 'community', $user = 'sonar', $group = 'sonar', $user_system = true, @@ -82,6 +83,12 @@ $tmpzip = "${download_dir}/${package_name}-${version}.zip" $script = "${installdir}/bin/${arch}/sonar.sh" + if $edition == 'community' { + $source_url = "${download_url}/${package_name}-${version}.zip" + } else { + $source_url = "${download_url}/${package_name}-${edition}-${version}.zip" + } + if ! defined(Package[unzip]) { package { 'unzip': ensure => present, @@ -102,7 +109,7 @@ } -> wget::fetch { 'download-sonar': - source => "${download_url}/${package_name}-${version}.zip", + source => "${source_url}", destination => $tmpzip, } -> From 150ea393f007d81ef63eae281085a6f2e2ad7b70 Mon Sep 17 00:00:00 2001 From: Tim Chen Date: Fri, 5 Oct 2018 11:52:25 +1000 Subject: [PATCH 2/2] Fixed travis CI build failure due to Ruby version requirement. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 06f587eb..b75c2bc7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ before_install: - rm -f Gemfile.lock rvm: - - "2.0.0" + - "2.1.8" env: - PUPPET_VERSION="~> 3.7.0"