Sha256: 697a81227896482ff35d6eae5044bff99de9fc0ababab307731c6a817279b15e
Contents?: true
Size: 880 Bytes
Versions: 36
Compression:
Stored size: 880 Bytes
Contents
require_relative 'paths' module SshHelper include Paths private def path_to_ssh "#{Dir.home}/.ssh" end def path_to_jenkins_ssh "#{path_to_environment}/ssh" end def path_to_backup_ssh "#{path_to_backup}/ssh" end public def move_ssh_to_backup FileUtils::mv(path_to_ssh, path_to_backup_ssh, :force => true) end def restore_backup_ssh FileUtils::mv(path_to_backup_ssh, path_to_ssh, :force => true) end 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 def remove_local_ssh FileUtils::rm_r(path_to_ssh) end end
Version data entries
36 entries across 36 versions & 1 rubygems