Update jenkins repo URL + option to select version

Jenkins repo moved to 'pkg.jenkins.io'. Since that, Jenkins packages were being
get from the default mirror on Ubuntu distros. This patch fixes that and also
adds a parameter to request an specific Jenkins version to be installed.

Change-Id: I43ea562028da8385c9d3bc74794f62d1aa1b9bf8
This commit is contained in:
Thiago Paiva 2016-08-11 10:49:05 -03:00
parent b489487781
commit d72bb2caeb
1 changed files with 4 additions and 3 deletions

View File

@ -13,6 +13,7 @@ class jenkins::master(
$jenkins_ssh_private_key = '',
$jenkins_ssh_public_key = '',
$jenkins_default = 'puppet:///modules/jenkins/jenkins.default',
$jenkins_version = present,
) {
include ::pip
include ::apt
@ -28,12 +29,12 @@ class jenkins::master(
}
apt::source { 'jenkins':
location => 'http://pkg.jenkins-ci.org/debian-stable',
location => 'http://pkg.jenkins.io/debian-stable',
release => 'binary/',
repos => '',
key => {
'id' => 'D50582E6',
'source' => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key',
'source' => 'http://pkg.jenkins.io/debian-stable/jenkins.io.key',
},
require => [
Package['openjdk-7-jre-headless'],
@ -112,7 +113,7 @@ class jenkins::master(
}
package { 'jenkins':
ensure => present,
ensure => $jenkins_version,
require => Apt::Source['jenkins'],
}