Skip to content

Commit

Permalink
Merge pull request heavywater#17 from winhamwr/issue_15
Browse files Browse the repository at this point in the history
Issue 15: Compatibility with new version of apt cookbook
  • Loading branch information
fnichol committed Dec 5, 2011
2 parents 071d97a + 229e29f commit 317ab19
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 @@ -105,23 +105,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 "binary/"
components [""]
key "http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key"
action :add
end
end

Expand Down Expand Up @@ -194,7 +186,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 317ab19

Please sign in to comment.