Sha256: a0aa13caf141d9f78a30c5409ff8870f0c635d788975b6742ba1be5058ea7798
Contents?: true
Size: 1.76 KB
Versions: 17
Compression:
Stored size: 1.76 KB
Contents
module Deployment module Methods module DWEB def send_dweb_command(command, options={}) Helper.validates_presence_of @cdb['staging_host'], "Staging Host not set" Helper.validates_presence_of @cdb['ssh_key_file_command'], "SSH keyfile not set" Helper.validates_presence_of @cdb['siteid'], "Siteid not set" publisher = ::Publisher::Dweb.new publisher.staging_host = @cdb['staging_host'] publisher.ssh_key_file = @cdb['ssh_key_file_command'] publisher.siteid = @cdb['siteid'] publisher.send_command(command, options) end def dweb_upload(source, target, options={}) Helper.validates_presence_of @cdb['staging_host'], "Staging Host not set" Helper.validates_presence_of @cdb['ssh_key_file'], "SSH keyfile not set" Helper.validates_presence_of @cdb['siteid'], "Siteid not set" Helper.validates_presence_of source Helper.validates_presence_of target publisher = ::Publisher::Dweb.new publisher.staging_host = @cdb['staging_host'] publisher.ssh_key_file = @cdb['ssh_key_file'] publisher.siteid = @cdb['siteid'] vhost = options[:siteid] || @cdb['siteid'] options[:excludes] = options[:excludes] || ['.svn'] publisher.upload(File.join($recipe_config[:deploy_home], source), \ File.join('/vhosts/', vhost, target), options) end def dweb_link(source, symlink, options={}) publisher = ::Publisher::Dweb.new publisher.staging_host = @cdb['staging_host'] publisher.ssh_key_file = @cdb['ssh_key_file'] publisher.siteid = @cdb['siteid'] publisher.remote_symlink(source, symlink, options) end end end end
Version data entries
17 entries across 17 versions & 1 rubygems