Sha256: bf1873458d386c47ddab073ad586f47422b37056991c8ba6d84764d53fe948ec

Contents?: true

Size: 977 Bytes

Versions: 24

Compression:

Stored size: 977 Bytes

Contents

require 'fileutils'
require File.expand_path(File.dirname(__FILE__) + '/../utilities')

Capistrano::Configuration.instance(true).load do
  # HUDSON SERVERS
  _cset :hudson_home, "/opt/hudson"
  _cset :hudson_ctrl, "/etc/init.d/hudson"

  #
  # simple interactions with the hudson server
  #
  namespace :hudson do

    desc "install hudson"
    task :install do
      dir = File.dirname(hudson_home)
      basename = File.basename(hudson_file)
      basectl = File.basename(hudson_ctrl)
      puts "#{hudson_file} ,,,, #{dir}  /#{basename}"
      utilities.sudo_upload "#{hudson_file}", "#{dir}/#{basename}"
      sudo "tar -zvxf #{dir}/#{basename} -C #{dir}"
      sudo "chown #{user}:root #{hudson_home} -R"

      put utilities.render("hudson", binding), "hudson.tmp"
      sudo "cp hudson.tmp #{hudson_ctrl}"
      sudo "chmod a+x #{hudson_ctrl}"
      sudo "/sbin/chkconfig --add #{basectl}"
      run "rm hudson.tmp"
      sudo "rm #{dir}/#{basename}"
    end

  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
crazycode-cap-recipes-0.5.3 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.5.2 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.5.1 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.5.0 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.4.14 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.4.13 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.4.12 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.4.11 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.4.10 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.4.9 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.4.8 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.4.6 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.4.5 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.4.4 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.4.3 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.4.2 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.4.1 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.4.0 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.3.39.3 lib/cap_recipes/tasks/hudson/manage.rb
crazycode-cap-recipes-0.3.39.2 lib/cap_recipes/tasks/hudson/manage.rb