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