dapp 0.0.24 → 0.1.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.
- checksums.yaml +13 -5
- data/bin/dapp +17 -1
- data/config/en/common.yml +23 -0
- data/config/en/net_status.yml +24 -0
- data/lib/dapp.rb +68 -12
- data/lib/dapp/application.rb +57 -0
- data/lib/dapp/application/git_artifact.rb +26 -0
- data/lib/dapp/application/logging.rb +120 -0
- data/lib/dapp/application/path.rb +31 -0
- data/lib/dapp/application/tags.rb +65 -0
- data/lib/dapp/build/stage/app_install.rb +19 -0
- data/lib/dapp/build/stage/app_setup.rb +19 -0
- data/lib/dapp/build/stage/base.rb +106 -0
- data/lib/dapp/build/stage/from.rb +40 -0
- data/lib/dapp/build/stage/infra_install.rb +23 -0
- data/lib/dapp/build/stage/infra_setup.rb +19 -0
- data/lib/dapp/build/stage/source_1.rb +31 -0
- data/lib/dapp/build/stage/source_1_archive.rb +31 -0
- data/lib/dapp/build/stage/source_2.rb +20 -0
- data/lib/dapp/build/stage/source_3.rb +27 -0
- data/lib/dapp/build/stage/source_4.rb +31 -0
- data/lib/dapp/build/stage/source_5.rb +51 -0
- data/lib/dapp/build/stage/source_base.rb +109 -0
- data/lib/dapp/builder/base.rb +44 -0
- data/lib/dapp/builder/chef.rb +242 -0
- data/lib/dapp/builder/chef/berksfile.rb +54 -0
- data/lib/dapp/builder/shell.rb +16 -0
- data/lib/dapp/cli.rb +10 -44
- data/lib/dapp/cli/base.rb +55 -0
- data/lib/dapp/cli/build.rb +6 -140
- data/lib/dapp/cli/flush.rb +19 -0
- data/lib/dapp/cli/flush/build_cache.rb +26 -0
- data/lib/dapp/cli/flush/stage_cache.rb +23 -0
- data/lib/dapp/cli/list.rb +19 -0
- data/lib/dapp/cli/push.rb +59 -0
- data/lib/dapp/cli/smartpush.rb +19 -0
- data/lib/dapp/config/application.rb +98 -0
- data/lib/dapp/config/chef.rb +20 -0
- data/lib/dapp/config/docker.rb +39 -0
- data/lib/dapp/config/git_artifact.rb +78 -0
- data/lib/dapp/config/main.rb +23 -0
- data/lib/dapp/config/shell.rb +40 -0
- data/lib/dapp/controller.rb +103 -0
- data/lib/dapp/docker_image.rb +51 -0
- data/lib/dapp/error/application.rb +6 -0
- data/lib/dapp/error/base.rb +10 -0
- data/lib/dapp/error/build.rb +6 -0
- data/lib/dapp/error/config.rb +6 -0
- data/lib/dapp/error/controller.rb +6 -0
- data/lib/dapp/error/shellout.rb +6 -0
- data/lib/dapp/filelock.rb +1 -1
- data/lib/dapp/git_artifact.rb +43 -272
- data/lib/dapp/git_repo/base.rb +10 -12
- data/lib/dapp/git_repo/own.rb +7 -3
- data/lib/dapp/git_repo/remote.rb +14 -20
- data/lib/dapp/helper/cli.rb +66 -0
- data/lib/dapp/helper/i18n.rb +20 -0
- data/lib/dapp/helper/log.rb +72 -0
- data/lib/dapp/helper/paint.rb +27 -0
- data/lib/dapp/helper/sha256.rb +14 -0
- data/lib/dapp/helper/shellout.rb +41 -0
- data/lib/dapp/helper/streaming.rb +49 -0
- data/lib/dapp/helper/trivia.rb +27 -0
- data/lib/dapp/stage_image.rb +98 -0
- data/lib/dapp/version.rb +3 -1
- metadata +207 -51
- data/lib/dapp/atomizer.rb +0 -56
- data/lib/dapp/builder.rb +0 -230
- data/lib/dapp/builder/cascade_tagging.rb +0 -48
- data/lib/dapp/builder/centos7.rb +0 -47
- data/lib/dapp/builder/chefify.rb +0 -107
- data/lib/dapp/builder/ci_tagging.rb +0 -53
- data/lib/dapp/builder/git_tagging.rb +0 -21
- data/lib/dapp/builder/manual_tagging.rb +0 -22
- data/lib/dapp/builder/ubuntu1404.rb +0 -20
- data/lib/dapp/builder/ubuntu1604.rb +0 -20
- data/lib/dapp/docker.rb +0 -207
- data/lib/dapp/git_repo/chronicler.rb +0 -44
@@ -0,0 +1,19 @@
|
|
1
|
+
module Dapp
|
2
|
+
module Build
|
3
|
+
module Stage
|
4
|
+
# AppInstall
|
5
|
+
class AppInstall < Base
|
6
|
+
def initialize(application, next_stage)
|
7
|
+
@prev_stage = Source1.new(application, self)
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
def image
|
12
|
+
super do |image|
|
13
|
+
application.builder.app_install(image)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end # AppInstall
|
17
|
+
end # Stage
|
18
|
+
end # Build
|
19
|
+
end # Dapp
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Dapp
|
2
|
+
module Build
|
3
|
+
module Stage
|
4
|
+
# AppSetup
|
5
|
+
class AppSetup < Base
|
6
|
+
def initialize(application, next_stage)
|
7
|
+
@prev_stage = Source3.new(application, self)
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
def image
|
12
|
+
super do |image|
|
13
|
+
application.builder.app_setup(image)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end # AppSetup
|
17
|
+
end # Stage
|
18
|
+
end # Build
|
19
|
+
end # Dapp
|
@@ -0,0 +1,106 @@
|
|
1
|
+
module Dapp
|
2
|
+
module Build
|
3
|
+
module Stage
|
4
|
+
# Base of all stages
|
5
|
+
class Base
|
6
|
+
include Helper::Sha256
|
7
|
+
include Helper::Trivia
|
8
|
+
|
9
|
+
attr_accessor :prev_stage, :next_stage
|
10
|
+
attr_reader :application
|
11
|
+
|
12
|
+
def initialize(application, next_stage)
|
13
|
+
@application = application
|
14
|
+
|
15
|
+
@next_stage = next_stage
|
16
|
+
@next_stage.prev_stage = self
|
17
|
+
end
|
18
|
+
|
19
|
+
# rubocop:disable Metrics/AbcSize
|
20
|
+
def build!
|
21
|
+
return if image.tagged? && !application.log_verbose?
|
22
|
+
prev_stage.build! if prev_stage
|
23
|
+
begin
|
24
|
+
if image.tagged?
|
25
|
+
application.log_state(name, state: application.t(code: 'state.using_cache'))
|
26
|
+
elsif application.dry_run?
|
27
|
+
application.log_state(name, state: application.t(code: 'state.build'), styles: { status: :success })
|
28
|
+
else
|
29
|
+
application.log_process(name, process: application.t(code: 'status.process.building'), short: should_be_not_detailed?) do
|
30
|
+
image_build!
|
31
|
+
end
|
32
|
+
end
|
33
|
+
ensure
|
34
|
+
log_build
|
35
|
+
end
|
36
|
+
end
|
37
|
+
# rubocop:enable Metrics/AbcSize
|
38
|
+
|
39
|
+
def save_in_cache!
|
40
|
+
return if image.tagged?
|
41
|
+
prev_stage.save_in_cache! if prev_stage
|
42
|
+
image.tag!(log_verbose: application.log_verbose?, log_time: application.log_time?) unless application.dry_run?
|
43
|
+
end
|
44
|
+
|
45
|
+
def signature
|
46
|
+
hashsum prev_stage.signature
|
47
|
+
end
|
48
|
+
|
49
|
+
def image
|
50
|
+
@image ||= begin
|
51
|
+
StageImage.new(name: image_name, from: from_image).tap do |image|
|
52
|
+
image.add_volume "#{application.build_path}:#{application.container_build_path}"
|
53
|
+
yield image if block_given?
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
protected
|
59
|
+
|
60
|
+
def name
|
61
|
+
class_to_lowercase.to_sym
|
62
|
+
end
|
63
|
+
|
64
|
+
def should_be_not_detailed?
|
65
|
+
image.send(:bash_commands).empty?
|
66
|
+
end
|
67
|
+
|
68
|
+
def image_build!
|
69
|
+
image.build!(log_verbose: application.log_verbose?, log_time: application.log_time?)
|
70
|
+
end
|
71
|
+
|
72
|
+
def from_image
|
73
|
+
prev_stage.image if prev_stage || begin
|
74
|
+
fail Error::Build, code: :from_image_required
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def image_name
|
79
|
+
"dapp:#{signature}"
|
80
|
+
end
|
81
|
+
|
82
|
+
def image_info
|
83
|
+
date, bytesize = image.info
|
84
|
+
_date, from_bytesize = from_image.info
|
85
|
+
[date, (from_bytesize.to_i - bytesize.to_i).abs]
|
86
|
+
end
|
87
|
+
|
88
|
+
def format_image_info
|
89
|
+
date, bytesize = image_info
|
90
|
+
application.t(code: 'image.info', data: { date: Time.parse(date).localtime, size: to_mb(bytesize.to_i)})
|
91
|
+
end
|
92
|
+
|
93
|
+
def log_build
|
94
|
+
application.with_log_indent do
|
95
|
+
application.log_info application.t(code: 'image.signature', data: { signature: image_name})
|
96
|
+
application.log_info format_image_info if image.tagged?
|
97
|
+
unless (bash_commands = image.send(:bash_commands)).empty?
|
98
|
+
application.log_info application.t(code: 'image.commands')
|
99
|
+
application.with_log_indent { application.log_info bash_commands.join("\n") }
|
100
|
+
end
|
101
|
+
end if application.log? && application.log_verbose?
|
102
|
+
end
|
103
|
+
end # Base
|
104
|
+
end # Stage
|
105
|
+
end # Build
|
106
|
+
end # Dapp
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Dapp
|
2
|
+
module Build
|
3
|
+
module Stage
|
4
|
+
# From
|
5
|
+
class From < Base
|
6
|
+
def signature
|
7
|
+
hashsum [from_image_name,
|
8
|
+
application.config._docker._from_cache_version,
|
9
|
+
Dapp::BUILD_CACHE_VERSION]
|
10
|
+
end
|
11
|
+
|
12
|
+
def save_in_cache!
|
13
|
+
from_image.untag! if from_image.pulled?
|
14
|
+
super
|
15
|
+
end
|
16
|
+
|
17
|
+
protected
|
18
|
+
|
19
|
+
def image_build!
|
20
|
+
from_image.pull!(log_verbose: application.log_verbose?, log_time: application.log_time?)
|
21
|
+
super
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def from_image_name
|
27
|
+
application.config._docker._from
|
28
|
+
end
|
29
|
+
|
30
|
+
def from_image
|
31
|
+
StageImage.new(name: from_image_name)
|
32
|
+
end
|
33
|
+
|
34
|
+
def image_info
|
35
|
+
image.info
|
36
|
+
end
|
37
|
+
end # Prepare
|
38
|
+
end # Stage
|
39
|
+
end # Build
|
40
|
+
end # Dapp
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Dapp
|
2
|
+
module Build
|
3
|
+
module Stage
|
4
|
+
# InfraInstall
|
5
|
+
class InfraInstall < Base
|
6
|
+
def initialize(application, next_stage)
|
7
|
+
@prev_stage = From.new(application, self)
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
def signature
|
12
|
+
hashsum [prev_stage.signature, *application.builder.infra_install_checksum]
|
13
|
+
end
|
14
|
+
|
15
|
+
def image
|
16
|
+
super do |image|
|
17
|
+
application.builder.infra_install(image)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end # InfraInstall
|
21
|
+
end # Stage
|
22
|
+
end # Build
|
23
|
+
end # Dapp
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Dapp
|
2
|
+
module Build
|
3
|
+
module Stage
|
4
|
+
# InfraSetup
|
5
|
+
class InfraSetup < Base
|
6
|
+
def initialize(application, next_stage)
|
7
|
+
@prev_stage = Source2.new(application, self)
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
def image
|
12
|
+
super do |image|
|
13
|
+
application.builder.infra_setup(image)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end # InfraSetup
|
17
|
+
end # Stage
|
18
|
+
end # Build
|
19
|
+
end # Dapp
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Dapp
|
2
|
+
module Build
|
3
|
+
module Stage
|
4
|
+
# Source1
|
5
|
+
class Source1 < SourceBase
|
6
|
+
def initialize(application, next_stage)
|
7
|
+
@prev_stage = Source1Archive.new(application, self)
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
def prev_source_stage
|
12
|
+
prev_stage
|
13
|
+
end
|
14
|
+
|
15
|
+
protected
|
16
|
+
|
17
|
+
def dependencies_checksum
|
18
|
+
hashsum [prev_stage.signature,
|
19
|
+
app_install_files_checksum,
|
20
|
+
*application.builder.app_install_checksum]
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def app_install_files_checksum
|
26
|
+
@app_install_files_checksum ||= dependency_files_checksum(application.config._app_install_dependencies)
|
27
|
+
end
|
28
|
+
end # Source1
|
29
|
+
end # Stage
|
30
|
+
end # Build
|
31
|
+
end # Dapp
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Dapp
|
2
|
+
module Build
|
3
|
+
module Stage
|
4
|
+
# Source1Archive
|
5
|
+
class Source1Archive < SourceBase
|
6
|
+
def initialize(application, next_stage)
|
7
|
+
@prev_stage = InfraInstall.new(application, self)
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
def prev_source_stage
|
12
|
+
nil
|
13
|
+
end
|
14
|
+
|
15
|
+
def next_source_stage
|
16
|
+
next_stage
|
17
|
+
end
|
18
|
+
|
19
|
+
def container_archive_path(git_artifact)
|
20
|
+
application.container_build_path git_artifact.filename '.tar.gz'
|
21
|
+
end
|
22
|
+
|
23
|
+
protected
|
24
|
+
|
25
|
+
def apply_command_method
|
26
|
+
:archive_apply_command
|
27
|
+
end
|
28
|
+
end # Source1Archive
|
29
|
+
end # Stage
|
30
|
+
end # Build
|
31
|
+
end # Dapp
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Dapp
|
2
|
+
module Build
|
3
|
+
module Stage
|
4
|
+
# Source2
|
5
|
+
class Source2 < SourceBase
|
6
|
+
def initialize(application, next_stage)
|
7
|
+
@prev_stage = AppInstall.new(application, self)
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
protected
|
12
|
+
|
13
|
+
def dependencies_checksum
|
14
|
+
hashsum [prev_stage.signature,
|
15
|
+
*application.builder.infra_setup_checksum]
|
16
|
+
end
|
17
|
+
end # Source2
|
18
|
+
end # Stage
|
19
|
+
end # Build
|
20
|
+
end # Dapp
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Dapp
|
2
|
+
module Build
|
3
|
+
module Stage
|
4
|
+
# Source3
|
5
|
+
class Source3 < SourceBase
|
6
|
+
def initialize(application, next_stage)
|
7
|
+
@prev_stage = InfraSetup.new(application, self)
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
protected
|
12
|
+
|
13
|
+
def dependencies_checksum
|
14
|
+
hashsum [prev_stage.signature,
|
15
|
+
app_setup_files_checksum,
|
16
|
+
*application.builder.app_setup_checksum]
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def app_setup_files_checksum
|
22
|
+
@app_setup_files_checksum ||= dependency_files_checksum(application.config._app_setup_dependencies)
|
23
|
+
end
|
24
|
+
end # Source3
|
25
|
+
end # Stage
|
26
|
+
end # Build
|
27
|
+
end # Dapp
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Dapp
|
2
|
+
module Build
|
3
|
+
module Stage
|
4
|
+
# Source4
|
5
|
+
class Source4 < SourceBase
|
6
|
+
MAX_PATCH_SIZE = 1024 * 1024
|
7
|
+
|
8
|
+
def initialize(application, next_stage)
|
9
|
+
@prev_stage = AppSetup.new(application, self)
|
10
|
+
super
|
11
|
+
end
|
12
|
+
|
13
|
+
def next_source_stage
|
14
|
+
next_stage
|
15
|
+
end
|
16
|
+
|
17
|
+
def dependencies_checksum
|
18
|
+
hashsum [super, (changes_size_since_source3 / MAX_PATCH_SIZE).to_i]
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def changes_size_since_source3
|
24
|
+
application.git_artifacts.map do |git_artifact|
|
25
|
+
git_artifact.patch_size(prev_source_stage.layer_commit(git_artifact), git_artifact.latest_commit)
|
26
|
+
end.reduce(0, :+)
|
27
|
+
end
|
28
|
+
end # Source4
|
29
|
+
end # Stage
|
30
|
+
end # Build
|
31
|
+
end # Dapp
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module Dapp
|
2
|
+
module Build
|
3
|
+
module Stage
|
4
|
+
# Source5
|
5
|
+
class Source5 < SourceBase
|
6
|
+
def initialize(application)
|
7
|
+
@prev_stage = Source4.new(application, self)
|
8
|
+
@application = application
|
9
|
+
end
|
10
|
+
|
11
|
+
def prev_source_stage
|
12
|
+
prev_stage
|
13
|
+
end
|
14
|
+
|
15
|
+
def next_source_stage
|
16
|
+
nil
|
17
|
+
end
|
18
|
+
|
19
|
+
def signature
|
20
|
+
hashsum [super, *exposes]
|
21
|
+
end
|
22
|
+
|
23
|
+
def image
|
24
|
+
super do |image|
|
25
|
+
image.add_expose(exposes) unless exposes.empty?
|
26
|
+
image.add_env(envs) unless envs.empty?
|
27
|
+
image.add_workdir(workdir) unless workdir.nil?
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
protected
|
32
|
+
|
33
|
+
def exposes
|
34
|
+
application.config._docker._expose
|
35
|
+
end
|
36
|
+
|
37
|
+
def envs
|
38
|
+
application.config._docker._env
|
39
|
+
end
|
40
|
+
|
41
|
+
def workdir
|
42
|
+
application.config._docker._workdir
|
43
|
+
end
|
44
|
+
|
45
|
+
def layers_commits_write!
|
46
|
+
nil
|
47
|
+
end
|
48
|
+
end # Source5
|
49
|
+
end # Stage
|
50
|
+
end # Build
|
51
|
+
end # Dapp
|
@@ -0,0 +1,109 @@
|
|
1
|
+
module Dapp
|
2
|
+
module Build
|
3
|
+
module Stage
|
4
|
+
# Base of source stages
|
5
|
+
class SourceBase < Base
|
6
|
+
attr_accessor :prev_source_stage, :next_source_stage
|
7
|
+
|
8
|
+
GITARTIFACT_IMAGE = 'dappdeps/gitartifact:0.1.3'.freeze
|
9
|
+
|
10
|
+
def prev_source_stage
|
11
|
+
prev_stage.prev_stage
|
12
|
+
end
|
13
|
+
|
14
|
+
def next_source_stage
|
15
|
+
next_stage.next_stage
|
16
|
+
end
|
17
|
+
|
18
|
+
def save_in_cache!
|
19
|
+
super
|
20
|
+
layers_commits_write!
|
21
|
+
end
|
22
|
+
|
23
|
+
def signature
|
24
|
+
hashsum [dependencies_checksum, *commit_list]
|
25
|
+
end
|
26
|
+
|
27
|
+
def image
|
28
|
+
super do |image|
|
29
|
+
if application.git_artifacts.any?
|
30
|
+
image.add_volumes_from(gitartifact_container)
|
31
|
+
image.add_commands 'export PATH=/.dapp/deps/gitartifact/bin:$PATH'
|
32
|
+
end
|
33
|
+
|
34
|
+
application.git_artifacts.each do |git_artifact|
|
35
|
+
image.add_volume "#{git_artifact.repo.dir_path}:#{git_artifact.repo.container_build_dir_path}"
|
36
|
+
image.add_commands git_artifact.send(apply_command_method, self)
|
37
|
+
end
|
38
|
+
yield image if block_given?
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def dependencies_checksum
|
43
|
+
hashsum [prev_stage.signature]
|
44
|
+
end
|
45
|
+
|
46
|
+
def layer_commit(git_artifact)
|
47
|
+
commits[git_artifact] ||= begin
|
48
|
+
if layer_commit_file_path(git_artifact).exist?
|
49
|
+
layer_commit_file_path(git_artifact).read.strip
|
50
|
+
else
|
51
|
+
git_artifact.latest_commit
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
protected
|
57
|
+
|
58
|
+
def gitartifact_container_name # FIXME: hashsum(image) or dockersafe()
|
59
|
+
GITARTIFACT_IMAGE.tr('/', '_').tr(':', '_')
|
60
|
+
end
|
61
|
+
|
62
|
+
def gitartifact_container
|
63
|
+
@gitartifact_container ||= begin
|
64
|
+
if application.shellout("docker inspect #{gitartifact_container_name}").exitstatus != 0
|
65
|
+
application.log_secondary_process(application.t(code: 'process.git_artifact_loading'), short: true) do
|
66
|
+
application.shellout ['docker run',
|
67
|
+
'--restart=no',
|
68
|
+
"--name #{gitartifact_container_name}",
|
69
|
+
"--volume /.dapp/deps/gitartifact #{GITARTIFACT_IMAGE}",
|
70
|
+
'2>/dev/null'].join(' ')
|
71
|
+
end
|
72
|
+
end
|
73
|
+
gitartifact_container_name
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def should_be_not_detailed?
|
78
|
+
true
|
79
|
+
end
|
80
|
+
|
81
|
+
def apply_command_method
|
82
|
+
:apply_patch_command
|
83
|
+
end
|
84
|
+
|
85
|
+
def commit_list
|
86
|
+
application.git_artifacts.map { |git_artifact| layer_commit(git_artifact) }
|
87
|
+
end
|
88
|
+
|
89
|
+
def layers_commits_write!
|
90
|
+
application.git_artifacts.each { |git_artifact| layer_commit_file_path(git_artifact).write(layer_commit(git_artifact)) }
|
91
|
+
end
|
92
|
+
|
93
|
+
def layer_commit_file_path(git_artifact)
|
94
|
+
application.build_path git_artifact.filename ".#{name}.#{git_artifact.paramshash}.#{dependencies_checksum}.commit"
|
95
|
+
end
|
96
|
+
|
97
|
+
def dependency_files_checksum(regs)
|
98
|
+
hashsum(regs.map { |reg| Dir[File.join(application.home_path, reg)].map { |f| File.read(f) if File.file?(f) } })
|
99
|
+
end
|
100
|
+
|
101
|
+
private
|
102
|
+
|
103
|
+
def commits
|
104
|
+
@commits ||= {}
|
105
|
+
end
|
106
|
+
end # SourceBase
|
107
|
+
end # Stage
|
108
|
+
end # Build
|
109
|
+
end # Dapp
|