Skip to content

Commit

Permalink
Add stable source support for package installation
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-slynko authored and schisamo committed May 12, 2015
1 parent a52f9ee commit cd4ecaa
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
16 changes: 16 additions & 0 deletions attributes/master.rb
Expand Up @@ -191,4 +191,20 @@
# node.set['jenkins']['master']['runit']['sv_timeout'] = 60
#
master['runit']['sv_timeout'] = 7

#
# Repository URL. Default is latest
#
master['repository'] = case node['platform_family']
when 'debian' then 'http://pkg.jenkins-ci.org/debian'
when 'rhel' then 'http://pkg.jenkins-ci.org/redhat'
end

#
# Repository key. Default is latest
#
master['repository_key'] = case node['platform_family']
when 'debian' then 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key'
when 'rhel' then 'http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key'
end
end
8 changes: 4 additions & 4 deletions recipes/_master_package.rb
Expand Up @@ -26,9 +26,9 @@
include_recipe 'apt::default'

apt_repository 'jenkins' do
uri 'http://pkg.jenkins-ci.org/debian'
uri node['jenkins']['master']['repository']
distribution 'binary/'
key 'https://jenkins-ci.org/debian/jenkins-ci.org.key'
key node['jenkins']['master']['repository_key']
end

package 'jenkins' do
Expand All @@ -44,8 +44,8 @@
include_recipe 'yum::default'

yum_repository 'jenkins-ci' do
baseurl 'http://pkg.jenkins-ci.org/redhat'
gpgkey 'https://jenkins-ci.org/redhat/jenkins-ci.org.key'
baseurl node['jenkins']['master']['repository']
gpgkey node['jenkins']['master']['repository_key']
end

package 'jenkins' do
Expand Down

0 comments on commit cd4ecaa

Please sign in to comment.