Sha256: 52b90fd885c1f2b77f548407cc43b4a9c8e79edc95d74c1d026a328efeccb785
Contents?: true
Size: 930 Bytes
Versions: 8
Compression:
Stored size: 930 Bytes
Contents
require 'shipitron' require 'shipitron/consul_keys' module Shipitron module Server module Git class Configure include Metaractor include ConsulKeys required :application required :repository_url required :s3_cache_bucket before do configure_consul_client! end def call host_key = fetch_key!(key: "shipitron/#{application}/git_host_key") Pathname.new('/home/shipitron/.ssh/known_hosts').open('a') do |file| file.puts(host_key.to_s) end deploy_key = fetch_key!(key: "shipitron/#{application}/git_deploy_key") Pathname.new('/home/shipitron/.ssh/id_rsa').open('w') do |file| file.puts(deploy_key.to_s) file.chmod(0600) end end private def application context.application end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems