dapp 0.5.13 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/bin/dapp +3 -0
  3. data/config/en/common.yml +35 -6
  4. data/config/en/net_status.yml +20 -6
  5. data/lib/dapp.rb +53 -27
  6. data/lib/dapp/application.rb +48 -27
  7. data/lib/dapp/application/git_artifact.rb +1 -1
  8. data/lib/dapp/application/path.rb +2 -18
  9. data/lib/dapp/application/tags.rb +5 -5
  10. data/lib/dapp/build/stage/artifact.rb +8 -3
  11. data/lib/dapp/build/stage/base.rb +43 -30
  12. data/lib/dapp/build/stage/{infra_install.rb → before_install.rb} +6 -6
  13. data/lib/dapp/build/stage/before_setup.rb +27 -0
  14. data/lib/dapp/build/stage/docker_instructions.rb +12 -1
  15. data/lib/dapp/build/stage/from.rb +4 -3
  16. data/lib/dapp/build/stage/{source_1_archive.rb → ga_archive.rb} +7 -7
  17. data/lib/dapp/build/stage/{source_1_archive_dependencies.rb → ga_archive_dependencies.rb} +4 -4
  18. data/lib/dapp/build/stage/{source_base.rb → ga_base.rb} +31 -7
  19. data/lib/dapp/build/stage/{source_dependencies_base.rb → ga_dependencies_base.rb} +5 -6
  20. data/lib/dapp/build/stage/{source_5.rb → ga_latest_patch.rb} +6 -6
  21. data/lib/dapp/build/stage/install/ga_post_install_patch.rb +21 -0
  22. data/lib/dapp/build/stage/install/ga_post_install_patch_dependencies.rb +21 -0
  23. data/lib/dapp/build/stage/install/ga_pre_install_patch.rb +21 -0
  24. data/lib/dapp/build/stage/install/ga_pre_install_patch_dependencies.rb +31 -0
  25. data/lib/dapp/build/stage/install/install.rb +31 -0
  26. data/lib/dapp/build/stage/mod/artifact.rb +9 -19
  27. data/lib/dapp/build/stage/mod/group.rb +42 -0
  28. data/lib/dapp/build/stage/mod/logging.rb +62 -26
  29. data/lib/dapp/build/stage/setup/chef_cookbooks.rb +37 -0
  30. data/lib/dapp/build/stage/setup/ga_post_setup_patch.rb +25 -0
  31. data/lib/dapp/build/stage/setup/ga_post_setup_patch_dependencies.rb +31 -0
  32. data/lib/dapp/build/stage/setup/ga_pre_setup_patch.rb +25 -0
  33. data/lib/dapp/build/stage/setup/ga_pre_setup_patch_dependencies.rb +27 -0
  34. data/lib/dapp/build/stage/setup/setup.rb +31 -0
  35. data/lib/dapp/builder/base.rb +9 -6
  36. data/lib/dapp/builder/chef.rb +128 -107
  37. data/lib/dapp/builder/chef/berksfile.rb +3 -0
  38. data/lib/dapp/builder/shell.rb +4 -3
  39. data/lib/dapp/cli.rb +8 -6
  40. data/lib/dapp/cli/base.rb +6 -1
  41. data/lib/dapp/cli/bp.rb +41 -0
  42. data/lib/dapp/cli/build.rb +17 -4
  43. data/lib/dapp/cli/cleanup.rb +24 -0
  44. data/lib/dapp/cli/list.rb +2 -2
  45. data/lib/dapp/cli/push.rb +8 -9
  46. data/lib/dapp/cli/run.rb +3 -4
  47. data/lib/dapp/cli/spush.rb +20 -0
  48. data/lib/dapp/cli/stages.rb +2 -0
  49. data/lib/dapp/cli/stages/cleanup.rb +7 -3
  50. data/lib/dapp/cli/stages/flush.rb +6 -3
  51. data/lib/dapp/config/application.rb +17 -11
  52. data/lib/dapp/config/chef.rb +4 -0
  53. data/lib/dapp/config/docker.rb +3 -2
  54. data/lib/dapp/config/git_artifact.rb +1 -2
  55. data/lib/dapp/config/main.rb +5 -2
  56. data/lib/dapp/config/shell.rb +20 -16
  57. data/lib/dapp/docker_registry.rb +32 -0
  58. data/lib/dapp/docker_registry/base.rb +47 -0
  59. data/lib/dapp/docker_registry/default.rb +18 -0
  60. data/lib/dapp/docker_registry/mod/authorization.rb +62 -0
  61. data/lib/dapp/docker_registry/mod/request.rb +44 -0
  62. data/lib/dapp/error/image.rb +6 -0
  63. data/lib/dapp/error/project.rb +6 -0
  64. data/lib/dapp/error/registry.rb +6 -0
  65. data/lib/dapp/exception/registry.rb +6 -0
  66. data/lib/dapp/git_artifact.rb +6 -7
  67. data/lib/dapp/git_repo/base.rb +1 -1
  68. data/lib/dapp/git_repo/remote.rb +6 -38
  69. data/lib/dapp/helper/sha256.rb +3 -3
  70. data/lib/dapp/helper/shellout.rb +25 -7
  71. data/lib/dapp/helper/streaming.rb +1 -3
  72. data/lib/dapp/image/argument.rb +31 -18
  73. data/lib/dapp/image/docker.rb +15 -8
  74. data/lib/dapp/image/stage.rb +10 -12
  75. data/lib/dapp/lock/base.rb +44 -0
  76. data/lib/dapp/lock/error.rb +14 -0
  77. data/lib/dapp/lock/file.rb +33 -0
  78. data/lib/dapp/prctl.rb +22 -0
  79. data/lib/dapp/project.rb +75 -0
  80. data/lib/dapp/project/command/bp.rb +24 -0
  81. data/lib/dapp/project/command/build.rb +21 -0
  82. data/lib/dapp/project/command/cleanup.rb +24 -0
  83. data/lib/dapp/project/command/common.rb +51 -0
  84. data/lib/dapp/project/command/list.rb +14 -0
  85. data/lib/dapp/project/command/push.rb +21 -0
  86. data/lib/dapp/project/command/run.rb +15 -0
  87. data/lib/dapp/project/command/spush.rb +17 -0
  88. data/lib/dapp/project/command/stages_cleanup.rb +70 -0
  89. data/lib/dapp/project/command/stages_flush.rb +18 -0
  90. data/lib/dapp/project/dappfile.rb +70 -0
  91. data/lib/dapp/project/lock.rb +27 -0
  92. data/lib/dapp/project/logging/base.rb +107 -0
  93. data/lib/dapp/project/logging/process.rb +104 -0
  94. data/lib/dapp/project/paint.rb +16 -0
  95. data/lib/dapp/project/ssh_agent.rb +77 -0
  96. data/lib/dapp/version.rb +1 -1
  97. metadata +74 -27
  98. data/lib/dapp/application/deps/gitartifact.rb +0 -39
  99. data/lib/dapp/application/logging.rb +0 -120
  100. data/lib/dapp/application/system_shellout.rb +0 -63
  101. data/lib/dapp/build/stage/chef_cookbooks.rb +0 -33
  102. data/lib/dapp/build/stage/infra_setup.rb +0 -27
  103. data/lib/dapp/build/stage/install.rb +0 -27
  104. data/lib/dapp/build/stage/setup.rb +0 -27
  105. data/lib/dapp/build/stage/source_1.rb +0 -21
  106. data/lib/dapp/build/stage/source_1_dependencies.rb +0 -27
  107. data/lib/dapp/build/stage/source_2.rb +0 -17
  108. data/lib/dapp/build/stage/source_2_dependencies.rb +0 -17
  109. data/lib/dapp/build/stage/source_3.rb +0 -17
  110. data/lib/dapp/build/stage/source_3_dependencies.rb +0 -23
  111. data/lib/dapp/build/stage/source_4.rb +0 -21
  112. data/lib/dapp/build/stage/source_4_dependencies.rb +0 -27
  113. data/lib/dapp/cli/smartpush.rb +0 -19
  114. data/lib/dapp/controller.rb +0 -119
  115. data/lib/dapp/error/controller.rb +0 -6
  116. data/lib/dapp/helper/log.rb +0 -73
@@ -2,8 +2,10 @@ module Dapp
2
2
  module Config
3
3
  # Main
4
4
  class Main < Application
5
- def initialize(**options)
6
- @_home_path = Pathname.new(options[:dappfile_path]).parent.expand_path.to_s
5
+ def initialize(dappfile_path:, project:)
6
+ @project = project
7
+
8
+ @_home_path = Pathname.new(dappfile_path).parent.expand_path.to_s
7
9
  @_basename = Pathname.new(@_home_path).basename.to_s
8
10
  @_builder = Pathname.new(@_home_path).join('Berksfile').exist? ? :chef : :shell
9
11
 
@@ -16,6 +18,7 @@ module Dapp
16
18
  end
17
19
 
18
20
  def name(value)
21
+ project.log_warning(desc: { code: 'excess_name_instruction', context: 'warning' }) if @_basename == value.to_s
19
22
  @_basename = value
20
23
  end
21
24
  end
@@ -2,24 +2,24 @@ module Dapp
2
2
  module Config
3
3
  # Shell
4
4
  class Shell
5
- attr_reader :_infra_install, :_infra_setup, :_install, :_setup
6
- attr_reader :_infra_install_cache_version, :_infra_setup_cache_version, :_install_cache_version, :_setup_cache_version
5
+ attr_reader :_before_install, :_before_setup, :_install, :_setup
6
+ attr_reader :_before_install_cache_version, :_before_setup_cache_version, :_install_cache_version, :_setup_cache_version
7
7
 
8
8
  def initialize
9
- @_infra_install = []
10
- @_infra_setup = []
11
- @_install = []
12
- @_setup = []
9
+ @_before_install = []
10
+ @_before_setup = []
11
+ @_install = []
12
+ @_setup = []
13
13
  end
14
14
 
15
- def infra_install(*args, cache_version: nil)
16
- @_infra_install.concat(args)
17
- @_infra_install_cache_version = cache_version
15
+ def before_install(*args, cache_version: nil)
16
+ @_before_install.concat(args)
17
+ @_before_install_cache_version = cache_version
18
18
  end
19
19
 
20
- def infra_setup(*args, cache_version: nil)
21
- @_infra_setup.concat(args)
22
- @_infra_setup_cache_version = cache_version
20
+ def before_setup(*args, cache_version: nil)
21
+ @_before_setup.concat(args)
22
+ @_before_setup_cache_version = cache_version
23
23
  end
24
24
 
25
25
  def install(*args, cache_version: nil)
@@ -32,12 +32,12 @@ module Dapp
32
32
  @_setup_cache_version = cache_version
33
33
  end
34
34
 
35
- def reset_infra_install
36
- @_infra_install = []
35
+ def reset_before_install
36
+ @_before_install = []
37
37
  end
38
38
 
39
- def reset_infra_setup
40
- @_infra_setup = []
39
+ def reset_before_setup
40
+ @_before_setup = []
41
41
  end
42
42
 
43
43
  def reset_install
@@ -52,6 +52,10 @@ module Dapp
52
52
  methods.tap { |arr| arr.delete(__method__) }.grep(/^reset_/).each(&method(:send))
53
53
  end
54
54
 
55
+ def empty?
56
+ @_before_install.empty? && @_before_setup.empty? && @_install.empty? && @_setup.empty?
57
+ end
58
+
55
59
  def clone
56
60
  Marshal.load(Marshal.dump(self))
57
61
  end
@@ -0,0 +1,32 @@
1
+ module Dapp
2
+ # DockerRegistry
3
+ module DockerRegistry
4
+ def self.new(repo)
5
+ repo_regex =~ repo
6
+ expected_hostname = Regexp.last_match(1)
7
+ expected_repo_suffix = Regexp.last_match(2)
8
+ expected_hostname_url = expected_hostname ? "http://#{expected_hostname}" : nil
9
+
10
+ if hostname_exist?(expected_hostname_url)
11
+ Base.new(repo, expected_hostname_url, expected_repo_suffix)
12
+ else
13
+ Default.new(repo, File.join(*[expected_hostname, expected_repo_suffix].compact))
14
+ end
15
+ end
16
+
17
+ def self.repo_regex
18
+ separator = /[_.]|__|[-]*/
19
+ alpha_numeric = /[[:alnum:]]*/
20
+ component = /#{alpha_numeric}[#{separator}#{alpha_numeric}]*/
21
+ port_number = /[0-9]+/
22
+ hostcomponent = /[[:alnum:]-]*[[:alnum:]]/
23
+ hostname = /#{hostcomponent}[\.#{hostcomponent}]*[:#{port_number}]?/
24
+ %r{^(#{hostname}/)?(#{component}[/#{component}]*)$}
25
+ end
26
+
27
+ def self.hostname_exist?(url)
28
+ return false unless url
29
+ Mod::Request.url_available?(url)
30
+ end
31
+ end # DockerRegistry
32
+ end # Dapp
@@ -0,0 +1,47 @@
1
+ module Dapp
2
+ # DockerRegistry
3
+ module DockerRegistry
4
+ # Base
5
+ class Base
6
+ include Mod::Request
7
+ include Mod::Authorization
8
+
9
+ API_VERSION = 'v2'.freeze
10
+
11
+ attr_accessor :repo
12
+ attr_accessor :hostname_url
13
+ attr_accessor :repo_suffix
14
+
15
+ def initialize(repo, hostname_url, repo_suffix)
16
+ self.repo = repo
17
+ self.hostname_url = hostname_url
18
+ self.repo_suffix = repo_suffix
19
+ end
20
+
21
+ def repo_exist?
22
+ tags.any?
23
+ end
24
+
25
+ def tags
26
+ @tags ||= api_request(repo_suffix, 'tags/list')['tags']
27
+ end
28
+
29
+ def image_id_by_tag(tag)
30
+ response = api_request(repo_suffix, "/manifests/#{tag}", headers: { Accept: 'application/vnd.docker.distribution.manifest.v2+json' })
31
+ response['config']['digest'] if response['schemaVersion'] == 2
32
+ end
33
+
34
+ protected
35
+
36
+ def api_request(*uri, **options)
37
+ JSON.load(request(api_url(*uri), expects: [200], **options).body)
38
+ rescue Excon::Error::NotFound
39
+ raise Error::Registry, code: :not_found
40
+ end
41
+
42
+ def api_url(*uri)
43
+ File.join(hostname_url, API_VERSION, '/', *uri)
44
+ end
45
+ end
46
+ end # DockerRegistry
47
+ end # Dapp
@@ -0,0 +1,18 @@
1
+ module Dapp
2
+ # DockerRegistry
3
+ module DockerRegistry
4
+ # Default
5
+ class Default < Base
6
+ DEFAULT_HOSTNAME_URL = 'https://registry.hub.docker.com'.freeze
7
+
8
+ def initialize(repo, repo_suffix)
9
+ super(repo, DEFAULT_HOSTNAME_URL, repo_suffix)
10
+ end
11
+
12
+ def repo_suffix=(val)
13
+ val = "library/#{val}" if val.split('/').one?
14
+ super(val)
15
+ end
16
+ end
17
+ end
18
+ end # Dapp
@@ -0,0 +1,62 @@
1
+ module Dapp
2
+ # DockerRegistry
3
+ module DockerRegistry
4
+ module Mod
5
+ # Authorization
6
+ module Authorization
7
+ def authorization_options(url)
8
+ @authorization_options ||= begin
9
+ case authenticate_header = raw_request(url).headers['Www-Authenticate']
10
+ when /Bearer/ then { headers: { Authorization: "Bearer #{authorization_token(authenticate_header)}" } }
11
+ when /Basic/ then { headers: { Authorization: "Basic #{authorization_auth}" } }
12
+ else raise Error::Registry, code: :authenticate_type_not_supported
13
+ end
14
+ end
15
+ end
16
+
17
+ def authorization_token(authenticate_header)
18
+ options = parse_authenticate_header(authenticate_header)
19
+ realm = options.delete(:realm)
20
+ begin
21
+ response = raw_request(realm, headers: { Authorization: "Basic #{authorization_auth}" }, query: options, expects: [200])
22
+ rescue Error::Registry
23
+ raise unless (response = raw_request(realm, query: options)).status == 200
24
+ end
25
+ JSON.load(response.body)['token']
26
+ end
27
+
28
+ def parse_authenticate_header(header)
29
+ [:realm, :service, :scope].map do |option|
30
+ /#{option}="([[^"].]*)/ =~ header
31
+ next unless Regexp.last_match(1)
32
+ [option, Regexp.last_match(1)]
33
+ end.compact.to_h
34
+ end
35
+
36
+ def authorization_auth
37
+ auths = auths_section_from_docker_config
38
+ r = repo
39
+ loop do
40
+ break unless r.include?('/') && !auths.keys.any? { |auth| auth.start_with?(r) }
41
+ r = chomp_name(r)
42
+ end
43
+ credential = (auths[r] || auths.find { |repo, _| repo == r })
44
+ raise Error::Registry, code: :user_not_authorized if credential.nil?
45
+ credential['auth']
46
+ end
47
+
48
+ def auths_section_from_docker_config
49
+ file = Pathname(File.join(Dir.home, '.docker', 'config.json'))
50
+ raise Error::Registry, code: :user_not_authorized unless file.exist?
51
+ JSON.load(file.read)['auths'].tap { |auths| raise Error::Registry, code: :user_not_authorized if auths.nil? }
52
+ end
53
+
54
+ private
55
+
56
+ def chomp_name(r)
57
+ r.split('/')[0..-2].join('/')
58
+ end
59
+ end
60
+ end # Mod
61
+ end # DockerRegistry
62
+ end # Dapp
@@ -0,0 +1,44 @@
1
+ module Dapp
2
+ # DockerRegistry
3
+ module DockerRegistry
4
+ module Mod
5
+ # Request
6
+ module Request
7
+ def request(url, **options)
8
+ raw_request(url, deep_merge(options, authorization_options(url)))
9
+ end
10
+
11
+ def raw_request(url, **options)
12
+ Excon.new(url).request(deep_merge(default_request_options, options))
13
+ end
14
+
15
+ def url_available?(url)
16
+ raw_request(url, expects: [200])
17
+ true
18
+ rescue Excon::Error
19
+ false
20
+ end
21
+
22
+ protected
23
+
24
+ def default_request_options
25
+ { method: :get, omit_default_port: true }
26
+ end
27
+
28
+ private
29
+
30
+ def deep_merge(hash1, hash2)
31
+ hash1.merge(hash2) do |_, v1, v2|
32
+ if v1.is_a?(Hash) && v2.is_a?(Hash)
33
+ v1.merge(v2)
34
+ else
35
+ [v1, v2].flatten
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end # Mod
41
+ end # DockerRegistry
42
+ end # Dapp
43
+
44
+ Dapp::DockerRegistry::Mod::Request.extend Dapp::DockerRegistry::Mod::Request
@@ -0,0 +1,6 @@
1
+ module Dapp
2
+ module Error
3
+ # Image
4
+ class Image < Base; end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Dapp
2
+ module Error
3
+ # Project
4
+ class Project < Base; end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Dapp
2
+ module Error
3
+ # Registry
4
+ class Registry < Base; end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Dapp
2
+ module Exception
3
+ # Registry
4
+ class Registry < Base; end
5
+ end
6
+ end
@@ -12,10 +12,9 @@ module Dapp
12
12
 
13
13
  @where_to_add = where_to_add
14
14
 
15
- @branch = branch || repo.application.cli_options[:git_artifact_branch] || repo.branch
15
+ @branch = branch || repo.application.project.cli_options[:git_artifact_branch] || repo.branch
16
16
  @commit = commit
17
17
 
18
- cwd = File.expand_path(File.join('/', cwd))[1..-1] unless cwd.nil? || cwd.empty?
19
18
  @cwd = cwd
20
19
  @paths = paths
21
20
  @owner = owner
@@ -27,17 +26,17 @@ module Dapp
27
26
  credentials = [:owner, :group].map { |attr| "--#{attr}=#{send(attr)}" unless send(attr).nil? }.compact
28
27
 
29
28
  ["install #{credentials.join(' ')} -d #{where_to_add}",
30
- ["#{repo.application.git_path} --git-dir=#{repo.container_path} archive #{stage.layer_commit(self)}:#{cwd} #{paths}",
29
+ ["git --git-dir=#{repo.container_path} archive #{stage.layer_commit(self)}:#{cwd} #{paths}",
31
30
  "#{sudo}tar -x -C #{where_to_add}"].join(' | ')]
32
31
  end
33
32
 
34
33
  def apply_patch_command(stage)
35
34
  current_commit = stage.layer_commit(self)
36
- prev_commit = stage.prev_source_stage.layer_commit(self)
35
+ prev_commit = stage.prev_g_a_stage.layer_commit(self)
37
36
 
38
37
  if prev_commit != current_commit || any_changes?(prev_commit, current_commit)
39
- [["#{repo.application.git_path} --git-dir=#{repo.container_path} #{diff_command(prev_commit, current_commit)}",
40
- "#{sudo}#{repo.application.git_path} apply --whitespace=nowarn --directory=#{where_to_add} --unsafe-paths"].join(' | ')]
38
+ [["git --git-dir=#{repo.container_path} #{diff_command(prev_commit, current_commit)}",
39
+ "#{sudo}git apply --whitespace=nowarn --directory=#{where_to_add} --unsafe-paths"].join(' | ')]
41
40
  else
42
41
  []
43
42
  end
@@ -84,7 +83,7 @@ module Dapp
84
83
  sudo = ''
85
84
 
86
85
  if owner || group
87
- sudo = "#{repo.application.sudo_path} -E "
86
+ sudo = 'sudo -E '
88
87
  sudo += "-u #{sudo_format_user(owner)} " if owner
89
88
  sudo += "-g #{sudo_format_user(group)} " if group
90
89
  end
@@ -44,7 +44,7 @@ module Dapp
44
44
  protected
45
45
 
46
46
  def git(command, **kwargs)
47
- application.system_shellout! "#{application.git_path} #{command}", **kwargs
47
+ application.project.shellout!("git #{command}", **kwargs)
48
48
  end
49
49
  end
50
50
  end
@@ -2,28 +2,20 @@ module Dapp
2
2
  module GitRepo
3
3
  # Normal Git repo
4
4
  class Remote < Base
5
- def initialize(application, name, url:, ssh_key_path: nil)
5
+ def initialize(application, name, url:)
6
6
  super(application, name)
7
7
 
8
8
  @url = url
9
- @ssh_key_path = File.expand_path(ssh_key_path, application.home_path) if ssh_key_path
10
9
 
11
- @use_ssh_key = false
12
- File.chmod(0o600, @ssh_key_path) if @ssh_key_path
13
-
14
- with_ssh_key do
15
- application.log_secondary_process(application.t(code: 'process.git_artifact_clone', data: { name: name }), short: true) do
16
- git "clone --bare --depth 1 #{url} #{path}"
17
- end
10
+ application.project.log_secondary_process(application.project.t(code: 'process.git_artifact_clone', data: { name: name }), short: true) do
11
+ git "clone --bare --depth 1 #{url} #{path}"
18
12
  end unless File.directory?(path)
19
13
  end
20
14
 
21
15
  def fetch!(branch = 'master')
22
- with_ssh_key do
23
- application.log_secondary_process(application.t(code: 'process.git_artifact_fetch', data: { name: name }), short: true) do
24
- git_bare "fetch origin #{branch}:#{branch}"
25
- end
26
- end unless application.ignore_git_fetch || application.dry_run?
16
+ application.project.log_secondary_process(application.project.t(code: 'process.git_artifact_fetch', data: { name: name }), short: true) do
17
+ git_bare "fetch origin #{branch}:#{branch}"
18
+ end unless application.ignore_git_fetch || application.project.dry_run?
27
19
  end
28
20
 
29
21
  def cleanup!
@@ -34,30 +26,6 @@ module Dapp
34
26
  protected
35
27
 
36
28
  attr_reader :url
37
- attr_reader :ssh_key_path
38
-
39
- attr_accessor :use_ssh_key
40
- def use_ssh_key
41
- @use_ssh_key ||= false
42
- end
43
-
44
- def with_ssh_key
45
- original = use_ssh_key
46
- self.use_ssh_key = true
47
-
48
- yield
49
- ensure
50
- self.use_ssh_key = original
51
- end
52
-
53
- def git(command, **kwargs)
54
- if use_ssh_key && ssh_key_path
55
- cmd = application.shellout_pack("/tmp/dapp_system_shellout/usr/bin/ssh-agent bash -ec '/tmp/dapp_system_shellout/usr/bin/ssh-add #{ssh_key_path}; #{application.git_path} #{command}'")
56
- application.system_shellout!("bash -ec '#{cmd}'")
57
- else
58
- super
59
- end
60
- end
61
29
  end
62
30
  end
63
31
  end
@@ -8,9 +8,9 @@ module Dapp
8
8
 
9
9
  def paths_content_hashsum(paths)
10
10
  paths.map(&:to_s)
11
- .reject { |path| File.directory?(path) }
12
- .sort
13
- .reduce(nil) { |hash, path| hashsum [hash, File.read(path)].compact }
11
+ .reject { |path| File.directory?(path) }
12
+ .sort
13
+ .reduce(nil) { |hash, path| hashsum [hash, File.read(path)].compact }
14
14
  end
15
15
 
16
16
  def sha256(arg)