Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

Added support for new commercial edition download. #95

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ before_install:
- rm -f Gemfile.lock

rvm:
- "2.0.0"
- "2.1.8"

env:
- PUPPET_VERSION="~> 3.7.0"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ or
class { 'sonarqube':
arch => 'linux-x86-64',
version => '5.1,
edition => 'community',
user => 'sonar',
group => 'sonar',
service => 'sonar',
Expand Down
9 changes: 8 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.
class sonarqube (
$version = '4.5.5',
$edition = 'community',
$user = 'sonar',
$group = 'sonar',
$user_system = true,
Expand Down Expand Up @@ -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,
Expand All @@ -102,7 +109,7 @@
}
->
wget::fetch { 'download-sonar':
source => "${download_url}/${package_name}-${version}.zip",
source => "${source_url}",
destination => $tmpzip,
}
->
Expand Down