Skip to content

Commit

Permalink
Refs heavywater#15. Used the fancy new apt_repository LWRP to add the…
Browse files Browse the repository at this point in the history
… jenkins repo under ubuntu
  • Loading branch information
winhamwr committed Oct 26, 2011
1 parent 24a8048 commit a30859b
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,15 @@
end

when "ubuntu"
package_provider = Chef::Provider::Package::Apt
package "curl"
key_url = "http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key"

include_recipe "apt"
include_recipe "java"

cookbook_file "/etc/apt/sources.list.d/jenkins.list" do
owner "root"
group "root"
mode "0644"
end

execute "add-jenkins-key" do
command "curl #{key_url} | apt-key add -"
action :nothing
notifies :run, "execute[apt-get update]", :immediately
apt_repository "jenkins" do
uri "http://pkg.jenkins-ci.org/debian"
distribution node['lsb']['codename']
components ["binary"]
key = "http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key"
action :add
end
end

Expand Down Expand Up @@ -183,7 +175,6 @@
command "echo w00t"
notifies :stop, "service[jenkins]", :immediately
notifies :create, "ruby_block[netstat]", :immediately #wait a moment for the port to be released
notifies :run, "execute[add-jenkins-key]", :immediately
notifies :install, "package[jenkins]", :immediately
unless install_starts_service
notifies :start, "service[jenkins]", :immediately
Expand Down

0 comments on commit a30859b

Please sign in to comment.