Module: SshHelper
Instance Method Summary
collapse
Methods included from Paths
#path_to_backup, #path_to_environment, #path_to_provisioning_updater, #root_jenkins_path
Instance Method Details
#copy_jenkins_ssh ⇒ Object
28
29
30
31
32
33
|
# File 'lib/nixenvironment/jenkins/Modules/ssh_helper.rb', line 28
def copy_jenkins_ssh
FileUtils::cp_r("#{path_to_jenkins_ssh}/.", path_to_ssh)
FileUtils::chmod(0700, "#{path_to_ssh}/id_rsa_git")
FileUtils::chmod(0700, "#{path_to_ssh}/id_rsa_git_write")
FileUtils::chmod(0700, "#{path_to_ssh}/id_rsa_mds")
end
|
#move_ssh_to_backup ⇒ Object
20
21
22
|
# File 'lib/nixenvironment/jenkins/Modules/ssh_helper.rb', line 20
def move_ssh_to_backup
FileUtils::mv(path_to_ssh, path_to_backup_ssh, :force => true)
end
|
#remove_local_ssh ⇒ Object
35
36
37
|
# File 'lib/nixenvironment/jenkins/Modules/ssh_helper.rb', line 35
def remove_local_ssh
FileUtils::rm_r(path_to_ssh)
end
|
#restore_backup_ssh ⇒ Object
24
25
26
|
# File 'lib/nixenvironment/jenkins/Modules/ssh_helper.rb', line 24
def restore_backup_ssh
FileUtils::mv(path_to_backup_ssh, path_to_ssh, :force => true)
end
|