Skip to content

Commit

Permalink
Merge branch 'master' of github.com:travis-ci/travis-cookbooks
Browse files Browse the repository at this point in the history
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
  • Loading branch information
Michael Klishin committed Nov 30, 2012
2 parents c112c93 + 695415b commit a063b67
Show file tree
Hide file tree
Showing 88 changed files with 711 additions and 1,569 deletions.
24 changes: 24 additions & 0 deletions ci_environment/doxygen/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Cookbook Name:: doxygen
# Recipe:: default
# Copyright 2012, Travis CI Development Team <contact@travis-ci.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

package "doxygen"
2 changes: 1 addition & 1 deletion ci_environment/gradle/attributes/tarball.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
gradle_version = "1.2"
gradle_version = "1.3"

default[:gradle] = {
:version => gradle_version,
Expand Down
2 changes: 1 addition & 1 deletion ci_environment/java/recipes/oraclejdk7.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# limitations under the License.
#

node['java']['java_home'] = node.java.oraclejdk7.java_home
node.set[:java][:java_home] = node.java.oraclejdk7.java_home

# This recipe relies on a PPA package and is Ubuntu/Debian specific. Please
# keep this in mind.
Expand Down
5 changes: 4 additions & 1 deletion ci_environment/maven3/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@

per_user_settings = File.join(node.travis_build_environment.home, ".m2", "settings.xml")
cookbook_file(per_user_settings) do
mode 0644
owner node.travis_build_environment.user
group node.travis_build_environment.group

mode 0644

action :nothing
end
Expand Down
2 changes: 1 addition & 1 deletion ci_environment/memcached/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
default[:memcached][:port] = 11211
default[:memcached][:user] = "nobody"
default[:memcached][:listen] = "0.0.0.0"
default[:memcached][:sasl] = true
default[:memcached][:sasl] = false
2 changes: 1 addition & 1 deletion ci_environment/memcached/attributes/ppa.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include_attribute "memcached::default"

default[:memcached][:sasl] = true
default[:memcached][:sasl] = false
36 changes: 36 additions & 0 deletions ci_environment/mercurial/recipes/ppa.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#
# Cookbook Name:: mercurial
# Recipe:: default
# Copyright 2012, Travis CI Development Team <contact@travis-ci.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

include_recipe "python::package"

apt_repository "mercurial-ppa" do
uri "http://ppa.launchpad.net/mercurial-ppa/releases/ubuntu"
distribution node['lsb']['codename']
components ["main"]
key "323293EE"
keyserver "keyserver.ubuntu.com"

action :add
end

package "mercurial"
10 changes: 5 additions & 5 deletions ci_environment/mongodb/recipes/apt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
# limitations under the License.
#

node[:mongodb][:installed_from] = "apt"
node.set[:mongodb][:installed_from] = "apt"
# default settings from apt repo
node[:mongodb][:datadir] = "/var/lib/mongodb"
node[:mongodb][:config] = "/etc/mongodb.conf"
node[:mongodb][:logfile] = "/var/log/mongodb/mongodb.log"
node[:mongodb][:pidfile] = "/var/run/mongodb.pid"
node.set[:mongodb][:datadir] = "/var/lib/mongodb"
node.set[:mongodb][:config] = "/etc/mongodb.conf"
node.set[:mongodb][:logfile] = "/var/log/mongodb/mongodb.log"
node.set[:mongodb][:pidfile] = "/var/run/mongodb.pid"


execute "apt-get update" do
Expand Down
2 changes: 0 additions & 2 deletions ci_environment/mysql/templates/default/my.cnf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ bind-address = <%= node['mysql']['bind_address'] %>
collation_server = utf8_unicode_ci
character_set_server = utf8

sql-mode = STRICT_ALL_TABLES


#
# * Fine Tuning
Expand Down
2 changes: 0 additions & 2 deletions ci_environment/mysql/templates/default/ramfs/my.cnf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ bind-address = <%= node['mysql']['bind_address'] %>
collation_server = utf8_unicode_ci
character_set_server = utf8

sql-mode = STRICT_ALL_TABLES

#
# * Fine Tuning
#
Expand Down
3 changes: 3 additions & 0 deletions ci_environment/networking_basic/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
'curl',
'wget',
'rsync',
# libldap resolves dependency hell around libcurl4-openssl-dev. MK.
"libldap-2.4.2",
"libldap2-dev",
"libcurl4-openssl-dev"
]

Expand Down
6 changes: 3 additions & 3 deletions ci_environment/nodejs/attributes/multi.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
default[:nodejs][:versions] = ["0.6.21"]
default[:nodejs][:aliases] = { "0.6.21" => "0.6" }
default[:nodejs][:default] = "0.6.21"
default[:nodejs][:versions] = ["0.8.14"]
default[:nodejs][:aliases] = { "0.8.14" => "0.8" }
default[:nodejs][:default] = "0.8.14"
2 changes: 1 addition & 1 deletion ci_environment/perlbrew/attributes/multi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
{ :name => "5.14", :version => "perl-5.14.2" },
{ :name => "5.12", :version => "perl-5.12.4" },
{ :name => "5.10", :version => "perl-5.10.1" }],
:modules => %w(Dist::Zilla Moose Test::Pod Test::Pod::Coverage Test::Exception Test::Kwalitee Dist::Zilla::Plugin::Bootstrap::lib Catalyst LWP Module::Install Test::Most)
:modules => %w(Dist::Zilla Moose Test::Pod Test::Pod::Coverage Test::Exception Test::Kwalitee Dist::Zilla::Plugin::Bootstrap::lib LWP Module::Install Test::Most)
}
3 changes: 3 additions & 0 deletions ci_environment/phantomjs/metadata.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
maintainer "Travis CI Development Team"
license "Apache v2.0'"
description "Installs/Configures phantomjs"
4 changes: 2 additions & 2 deletions ci_environment/php/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
default[:php][:multi][:versions] = ["5.2.17", "5.3.3", "5.3.17", "5.4.7"]
default[:php][:multi][:aliases] = {"5.2" => "5.2.17", "5.3" => "5.3.17", "5.4" => "5.4.7"}
default[:php][:multi][:versions] = ["5.2.17", "5.3.3", "5.3.19", "5.4.9", "5.5.0alpha1"]
default[:php][:multi][:aliases] = {"5.2" => "5.2.17", "5.3" => "5.3.19", "5.4" => "5.4.9", "5.5" => "5.5.0alpha1"}
7 changes: 4 additions & 3 deletions ci_environment/php/recipes/multi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@

node.php.multi.versions.each do |php_version|
phpbuild_build "#{phpenv_path}/versions" do
version php_version
owner node.travis_build_environment.user
group node.travis_build_environment.group
version php_version
with_pear !php_version.start_with?('5.5')
owner node.travis_build_environment.user
group node.travis_build_environment.group

action :create
end
Expand Down
4 changes: 2 additions & 2 deletions ci_environment/phpbuild/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
default[:phpbuild] = {
:git => {
:repository => "git://github.com/CHH/php-build.git",
:revision => "30c5486d1a33bec9b104c93504888e78c27753b2"
:revision => "7e3a66df91b0879b7289ad519b28fd09b8eabb6f"
},
:phpunit_plugin => {
:git => {
:repository => "git://github.com/CHH/php-build-plugin-phpunit.git",
:revision => "a6a5ce4a5126b90a02dd473b63f660515de7d183"
:revision => "2ee717c0e783809458f3073258c63f42500d1298"
}
},
:custom => {
Expand Down
2 changes: 1 addition & 1 deletion ci_environment/postgresql/recipes/server_on_ramfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

include_recipe "ramfs"

node[:postgresql][:data_dir] = "#{node[:ramfs][:dir]}/postgresql"
node.set[:postgresql][:data_dir] = "#{node[:ramfs][:dir]}/postgresql"

include_recipe "postgresql::server"

Expand Down
4 changes: 2 additions & 2 deletions ci_environment/python/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
# limitations under the License.
#

default['python']['multi']['pythons'] = %w(python2.5 python2.6 python2.7 python3.1 python3.2 pypy)
default['python']['pip']['packages'] = %w(nose pytest mock)
default['python']['multi']['pythons'] = %w(python2.5 python2.6 python2.7 python3.2 python3.3 pypy)
default['python']['pip']['packages'] = %w(nose pytest mock numpy)
11 changes: 9 additions & 2 deletions ci_environment/python/recipes/multi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,21 @@
end
end

packages = if ["python3.3", "3.3", "python3.2", "3.2", "pypy"].include?(py.to_s.downcase)
# some versions fail to install NumPy. MK.
node.python.pip.packages.reject { |p| p =~ /numpy/ }
else
node.python.pip.packages
end

script "preinstall pip packages for virtualenv set 1 (#{py})" do
interpreter "bash"
user node.travis_build_environment.user
group node.travis_build_environment.group

cwd node.travis_build_environment.home
code <<-EOH
#{installation_root}/#{py}/bin/pip install --quiet #{node.python.pip.packages.join(' ')} --use-mirrors
#{installation_root}/#{py}/bin/pip install --quiet #{packages.join(' ')} --use-mirrors
EOH

environment({ "VIRTUAL_ENV_DISABLE_PROMPT" => "true" })
Expand All @@ -114,7 +121,7 @@

cwd node.travis_build_environment.home
code <<-EOH
#{installation_root}/#{py}_with_system_site_packages/bin/pip install --quiet #{node.python.pip.packages.join(' ')} --use-mirrors
#{installation_root}/#{py}_with_system_site_packages/bin/pip install --quiet #{packages.join(' ')} --use-mirrors
EOH

environment({ "VIRTUAL_ENV_DISABLE_PROMPT" => "true" })
Expand Down
6 changes: 3 additions & 3 deletions ci_environment/riak/attributes/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
default.riak.package.type = "binary"
if !(node.kernel.machine == "x86_64")
# the only 32 bit package of 1.2.0. MK.
default.riak.package.url = "http://downloads.basho.com.s3-website-us-east-1.amazonaws.com/riak/CURRENT/ubuntu/lucid/riak_1.2.0-1_i386.deb"
default.riak.package.url = "http://downloads.basho.com.s3-website-us-east-1.amazonaws.com/riak/CURRENT/ubuntu/lucid/riak_1.2.1-1_i386.deb"
end
default.riak.package.version.major = "1"
default.riak.package.version.minor = "2"
default.riak.package.version.incremental = "0"
default.riak.package.version.incremental = "1"
default.riak.package.version.build = "1"
default.riak.package.source_checksum = 'e4ca096e5bd8813872dbb182678e91953ec8a5f110030b86a2821496217346a1'
default.riak.package.source_checksum = '009e9ceb83f7653dfc26ce71220b183e61d8b3e3'
default.riak.package.config_dir = "/etc/riak"
4 changes: 2 additions & 2 deletions ci_environment/riak/recipes/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@


# kv.rb
node.riak.kv.storage_backend = (node.riak.kv.storage_backend).to_s.to_sym
node.set.riak.kv.storage_backend = (node.riak.kv.storage_backend).to_s.to_sym

# sasl.rb
node.riak.sasl.errlog_type = (node.riak.sasl.errlog_type).to_s.to_sym
node.set.riak.sasl.errlog_type = (node.riak.sasl.errlog_type).to_s.to_sym


case node.riak.kv.storage_backend
Expand Down
10 changes: 7 additions & 3 deletions ci_environment/riak/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@

include_recipe "riak::config"

case node.platform
when "ubuntu" then
include_recipe "libssl::098"
end

if node[:riak][:package][:url]
package_uri = node[:riak][:package][:url]
package_file = package_uri.split("/").last
Expand All @@ -31,7 +36,7 @@
case node[:platform]
when "debian","ubuntu"
machines = {"x86_64" => "amd64", "i386" => "i386", "i686" => "i386"}
base_uri = "#{base_uri}/#{node[:platform]}/#{node[:lsb][:codename]}/"
base_uri = "#{base_uri}/#{node[:platform]}/#{node[:lsb][:codename]}/"
when "redhat","centos","scientific","fedora","suse"
machines = {"x86_64" => "x86_64", "i386" => "i386", "i686" => "i686"}
base_uri = "#{base_uri}/rhel/#{node[:platform_version].to_i}/"
Expand All @@ -43,7 +48,6 @@
when "binary"
case node[:platform]
when "debian","ubuntu"
package "libssl0.9.8" if node[:platform_version] >= "11.10"
"#{base_filename.gsub(/\-/, '_')}-#{node[:riak][:package][:version][:build]}_#{machines[node[:kernel][:machine]]}.deb"
when "centos","redhat","suse"
if node[:platform_version].to_i == 6
Expand Down Expand Up @@ -97,7 +101,7 @@
options case node[:platform]
when "debian","ubuntu"
"--force-confnew"
end
end
provider value_for_platform(
[ "ubuntu", "debian" ] => {"default" => Chef::Provider::Package::Dpkg},
[ "redhat", "centos", "fedora", "suse" ] => {"default" => Chef::Provider::Package::Rpm}
Expand Down
2 changes: 1 addition & 1 deletion ci_environment/rvm/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
default[:rvm][:version] = "1.15.13"
default[:rvm][:version] = "latest-1.17"
22 changes: 22 additions & 0 deletions ci_environment/rvm/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,25 @@

source "dot_rvmrc.sh.erb"
end


bundler_settings = File.join(node.travis_build_environment.home, ".bundle", "config")
template bundler_settings do
owner node.travis_build_environment.user
group node.travis_build_environment.group

mode 0644

source "bundler_config.yml.erb"
variables Hash[:suffix => node.travis_build_environment.installation_suffix]
action :nothing
end


directory(File.join(node.travis_build_environment.home, ".bundle")) do
owner node.travis_build_environment.user
group node.travis_build_environment.group

action :create
notifies :create, resources(:template => bundler_settings)
end
2 changes: 1 addition & 1 deletion ci_environment/rvm/recipes/multi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
bash "installing #{rb[:name]} with RVM arguments #{rb[:arguments]}" do
setup.call(self)
# another work around for https://github.com/rubinius/rubinius/pull/1759. MK.
code "#{rvm} #{rb.fetch(:using, default_ruby)} do #{bin_rvm} install #{rb[:name]} -j 3 #{rb[:arguments]} && #{rvm} all do rvm --force gemset empty"
code "#{rvm} #{rb.fetch(:using, default_ruby)} do #{bin_rvm} install #{rb[:name]} -j 3 #{rb[:arguments]} && #{rvm} all do rvm --force gemset empty && find ~/.rvm/rubies/ -type d -name .git -print | xargs /bin/rm -rf"
# with all the Rubies we provide, checking for various directories under .rvm/rubies/* is pretty much impossible without
# depending on the exact versions provided. So we use this neat technique suggested by mpapis. MK.
not_if "#{rvm} #{rb[:name]} do echo 'Found'"
Expand Down
2 changes: 2 additions & 0 deletions ci_environment/rvm/templates/default/bundler_config.yml.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
api:
user_agent_extra: "travis-ci.<%= @suffix %>/1.0.0"
20 changes: 20 additions & 0 deletions ci_environment/sbt/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# CHANGELOG for sbt-extras cookbook

## 0.2.2

* #4: default recipe is now 100% idempotent
* #5: User/SBT pre-installation is now coherent and support 0.12 and 0.11 generations.

## 0.2.1

* *administrative* release that only re-packaged 0.2.0, but without unwanted files ('~' backups, .gitignore,...)

## 0.2.0

* #3: *Optional* templates for global config files (/etc/sbt/sbtopts and /etc/sbt/jvmopts)
* Attributes modified (not backward compatible with 0.1.0)
* Added timeout on 'execute' resources (sbt/scala downloads)

## 0.1.0

* Initial release
Loading

0 comments on commit a063b67

Please sign in to comment.