dapp 0.6.17 → 0.7.1
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 +4 -4
- data/config/en/common.yml +2 -2
- data/config/en/net_status.yml +25 -23
- data/lib/dapp.rb +24 -16
- data/lib/dapp/artifact.rb +1 -1
- data/lib/dapp/build/stage/after_install_artifact.rb +2 -2
- data/lib/dapp/build/stage/after_setup_artifact.rb +4 -4
- data/lib/dapp/build/stage/artifact_base.rb +25 -25
- data/lib/dapp/build/stage/artifact_default.rb +16 -16
- data/lib/dapp/build/stage/base.rb +36 -31
- data/lib/dapp/build/stage/before_install.rb +8 -8
- data/lib/dapp/build/stage/before_install_artifact.rb +2 -2
- data/lib/dapp/build/stage/before_setup.rb +8 -8
- data/lib/dapp/build/stage/before_setup_artifact.rb +2 -2
- data/lib/dapp/build/stage/build_artifact.rb +10 -10
- data/lib/dapp/build/stage/docker_instructions.rb +3 -3
- data/lib/dapp/build/stage/from.rb +7 -3
- data/lib/dapp/build/stage/ga_archive.rb +2 -2
- data/lib/dapp/build/stage/ga_archive_dependencies.rb +3 -3
- data/lib/dapp/build/stage/ga_artifact_patch.rb +2 -2
- data/lib/dapp/build/stage/ga_base.rb +2 -2
- data/lib/dapp/build/stage/ga_dependencies_base.rb +2 -2
- data/lib/dapp/build/stage/ga_latest_patch.rb +3 -3
- data/lib/dapp/build/stage/import_artifact.rb +19 -19
- data/lib/dapp/build/stage/install/ga_post_install_patch.rb +2 -2
- data/lib/dapp/build/stage/install/ga_post_install_patch_dependencies.rb +2 -2
- data/lib/dapp/build/stage/install/ga_pre_install_patch.rb +2 -2
- data/lib/dapp/build/stage/install/ga_pre_install_patch_dependencies.rb +2 -2
- data/lib/dapp/build/stage/install/install.rb +9 -9
- data/lib/dapp/build/stage/mod/group.rb +2 -2
- data/lib/dapp/build/stage/mod/logging.rb +19 -19
- data/lib/dapp/build/stage/setup/chef_cookbooks.rb +4 -4
- data/lib/dapp/build/stage/setup/ga_post_setup_patch.rb +2 -2
- data/lib/dapp/build/stage/setup/ga_post_setup_patch_dependencies.rb +3 -3
- data/lib/dapp/build/stage/setup/ga_pre_setup_patch.rb +2 -2
- data/lib/dapp/build/stage/setup/ga_pre_setup_patch_dependencies.rb +2 -2
- data/lib/dapp/build/stage/setup/setup.rb +9 -9
- data/lib/dapp/builder/base.rb +4 -4
- data/lib/dapp/builder/chef.rb +65 -64
- data/lib/dapp/builder/none.rb +45 -0
- data/lib/dapp/builder/shell.rb +3 -3
- data/lib/dapp/cli.rb +9 -10
- data/lib/dapp/cli/base.rb +6 -1
- data/lib/dapp/cli/bp.rb +2 -2
- data/lib/dapp/cli/build.rb +2 -2
- data/lib/dapp/cli/cleanup.rb +2 -2
- data/lib/dapp/cli/list.rb +2 -2
- data/lib/dapp/cli/mrproper.rb +0 -4
- data/lib/dapp/cli/push.rb +3 -3
- data/lib/dapp/cli/run.rb +3 -3
- data/lib/dapp/cli/spush.rb +2 -2
- data/lib/dapp/cli/stage_image.rb +2 -2
- data/lib/dapp/cli/stages/cleanup_local.rb +3 -3
- data/lib/dapp/cli/stages/cleanup_repo.rb +3 -3
- data/lib/dapp/cli/stages/flush_local.rb +3 -3
- data/lib/dapp/cli/stages/flush_repo.rb +3 -3
- data/lib/dapp/cli/stages/pull.rb +3 -3
- data/lib/dapp/cli/stages/push.rb +3 -3
- data/lib/dapp/config/artifact_dimg.rb +18 -0
- data/lib/dapp/config/artifact_group.rb +54 -0
- data/lib/dapp/config/base.rb +19 -0
- data/lib/dapp/config/dimg.rb +23 -0
- data/lib/dapp/config/dimg/instance_methods.rb +179 -0
- data/lib/dapp/config/dimg/validation.rb +124 -0
- data/lib/dapp/config/dimg_group.rb +56 -0
- data/lib/dapp/config/dimg_group_base.rb +36 -0
- data/lib/dapp/config/dimg_group_main.rb +21 -0
- data/lib/dapp/config/directive/artifact.rb +29 -54
- data/lib/dapp/config/directive/artifact_base.rb +92 -0
- data/lib/dapp/config/directive/base.rb +22 -0
- data/lib/dapp/config/directive/chef.rb +23 -61
- data/lib/dapp/config/directive/docker/artifact.rb +3 -14
- data/lib/dapp/config/directive/docker/base.rb +3 -78
- data/lib/dapp/config/directive/docker/dimg.rb +81 -0
- data/lib/dapp/config/directive/git_artifact_local.rb +13 -0
- data/lib/dapp/config/directive/git_artifact_remote.rb +55 -0
- data/lib/dapp/config/directive/mount.rb +25 -0
- data/lib/dapp/config/directive/shell/artifact.rb +3 -24
- data/lib/dapp/config/directive/shell/dimg.rb +68 -0
- data/lib/dapp/{application.rb → dimg.rb} +12 -33
- data/lib/dapp/{application → dimg}/git_artifact.rb +3 -3
- data/lib/dapp/{application → dimg}/path.rb +9 -5
- data/lib/dapp/{application → dimg}/stages.rb +8 -8
- data/lib/dapp/{application → dimg}/tags.rb +6 -6
- data/lib/dapp/docker_registry.rb +11 -15
- data/lib/dapp/error/dimg.rb +6 -0
- data/lib/dapp/git_artifact.rb +19 -20
- data/lib/dapp/git_repo/base.rb +6 -6
- data/lib/dapp/git_repo/own.rb +4 -4
- data/lib/dapp/git_repo/remote.rb +5 -5
- data/lib/dapp/image/docker.rb +0 -15
- data/lib/dapp/image/stage.rb +12 -22
- data/lib/dapp/project.rb +14 -18
- data/lib/dapp/project/command/build.rb +2 -2
- data/lib/dapp/project/command/cleanup.rb +9 -11
- data/lib/dapp/project/command/common.rb +8 -20
- data/lib/dapp/project/command/list.rb +7 -1
- data/lib/dapp/project/command/mrproper.rb +12 -22
- data/lib/dapp/project/command/push.rb +3 -4
- data/lib/dapp/project/command/run.rb +2 -2
- data/lib/dapp/project/command/spush.rb +3 -4
- data/lib/dapp/project/command/stage_image.rb +2 -2
- data/lib/dapp/project/command/stages/cleanup_local.rb +20 -24
- data/lib/dapp/project/command/stages/cleanup_repo.rb +3 -3
- data/lib/dapp/project/command/stages/common.rb +2 -3
- data/lib/dapp/project/command/stages/flush_local.rb +5 -7
- data/lib/dapp/project/command/stages/flush_repo.rb +2 -2
- data/lib/dapp/project/command/stages/pull.rb +3 -4
- data/lib/dapp/project/command/stages/push.rb +3 -4
- data/lib/dapp/project/dappfile.rb +9 -26
- data/lib/dapp/project/logging/base.rb +14 -0
- data/lib/dapp/project/logging/process.rb +1 -1
- data/lib/dapp/project/shellout/system.rb +2 -4
- data/lib/dapp/version.rb +1 -1
- metadata +25 -17
- data/lib/dapp/cli/tag.rb +0 -24
- data/lib/dapp/config/application.rb +0 -288
- data/lib/dapp/config/artifact.rb +0 -20
- data/lib/dapp/config/directive/build_dir.rb +0 -9
- data/lib/dapp/config/directive/git_artifact.rb +0 -59
- data/lib/dapp/config/directive/shell/base.rb +0 -85
- data/lib/dapp/config/directive/tmp_dir.rb +0 -36
- data/lib/dapp/config/main.rb +0 -20
- data/lib/dapp/error/application.rb +0 -6
- data/lib/dapp/project/command/tag.rb +0 -18
@@ -3,26 +3,26 @@ module Dapp
|
|
3
3
|
module Stage
|
4
4
|
# BeforeInstall
|
5
5
|
class BeforeInstall < Base
|
6
|
-
def initialize(
|
7
|
-
@prev_stage = From.new(
|
6
|
+
def initialize(dimg, next_stage)
|
7
|
+
@prev_stage = From.new(dimg, self)
|
8
8
|
super
|
9
9
|
end
|
10
10
|
|
11
11
|
def empty?
|
12
|
-
super && !
|
13
|
-
end
|
14
|
-
|
15
|
-
def builder_checksum
|
16
|
-
application.builder.before_install_checksum
|
12
|
+
super && !dimg.builder.before_install?
|
17
13
|
end
|
18
14
|
|
19
15
|
def context
|
20
16
|
[builder_checksum]
|
21
17
|
end
|
22
18
|
|
19
|
+
def builder_checksum
|
20
|
+
dimg.builder.before_install_checksum
|
21
|
+
end
|
22
|
+
|
23
23
|
def prepare_image
|
24
24
|
super
|
25
|
-
|
25
|
+
dimg.builder.before_install(image)
|
26
26
|
end
|
27
27
|
|
28
28
|
alias dependencies context
|
@@ -3,8 +3,8 @@ module Dapp
|
|
3
3
|
module Stage
|
4
4
|
# BeforeInstallArtifact
|
5
5
|
class BeforeInstallArtifact < ArtifactDefault
|
6
|
-
def initialize(
|
7
|
-
@prev_stage = BeforeInstall.new(
|
6
|
+
def initialize(dimg, next_stage)
|
7
|
+
@prev_stage = BeforeInstall.new(dimg, self)
|
8
8
|
super
|
9
9
|
end
|
10
10
|
end # BeforeInstallArtifact
|
@@ -3,26 +3,26 @@ module Dapp
|
|
3
3
|
module Stage
|
4
4
|
# BeforeSetup
|
5
5
|
class BeforeSetup < Base
|
6
|
-
def initialize(
|
7
|
-
@prev_stage = AfterInstallArtifact.new(
|
6
|
+
def initialize(dimg, next_stage)
|
7
|
+
@prev_stage = AfterInstallArtifact.new(dimg, self)
|
8
8
|
super
|
9
9
|
end
|
10
10
|
|
11
11
|
def empty?
|
12
|
-
!
|
13
|
-
end
|
14
|
-
|
15
|
-
def builder_checksum
|
16
|
-
application.builder.before_setup_checksum
|
12
|
+
!dimg.builder.before_setup?
|
17
13
|
end
|
18
14
|
|
19
15
|
def context
|
20
16
|
[builder_checksum]
|
21
17
|
end
|
22
18
|
|
19
|
+
def builder_checksum
|
20
|
+
dimg.builder.before_setup_checksum
|
21
|
+
end
|
22
|
+
|
23
23
|
def prepare_image
|
24
24
|
super
|
25
|
-
|
25
|
+
dimg.builder.before_setup(image)
|
26
26
|
end
|
27
27
|
end # BeforeSetup
|
28
28
|
end # Stage
|
@@ -3,8 +3,8 @@ module Dapp
|
|
3
3
|
module Stage
|
4
4
|
# BeforeSetupArtifact
|
5
5
|
class BeforeSetupArtifact < ArtifactDefault
|
6
|
-
def initialize(
|
7
|
-
@prev_stage = BeforeSetup.new(
|
6
|
+
def initialize(dimg, next_stage)
|
7
|
+
@prev_stage = BeforeSetup.new(dimg, self)
|
8
8
|
super
|
9
9
|
end
|
10
10
|
end # BeforeSetupArtifact
|
@@ -3,32 +3,32 @@ module Dapp
|
|
3
3
|
module Stage
|
4
4
|
# BuildArtifact
|
5
5
|
class BuildArtifact < Base
|
6
|
-
def initialize(
|
7
|
-
@prev_stage = GAArtifactPatch.new(
|
8
|
-
@
|
6
|
+
def initialize(dimg)
|
7
|
+
@prev_stage = GAArtifactPatch.new(dimg, self)
|
8
|
+
@dimg = dimg
|
9
9
|
end
|
10
10
|
|
11
11
|
def empty?
|
12
|
-
!
|
13
|
-
end
|
14
|
-
|
15
|
-
def builder_checksum
|
16
|
-
application.builder.build_artifact_checksum
|
12
|
+
!dimg.builder.build_artifact?
|
17
13
|
end
|
18
14
|
|
19
15
|
def context
|
20
16
|
[artifact_dependencies_files_checksum, builder_checksum]
|
21
17
|
end
|
22
18
|
|
19
|
+
def builder_checksum
|
20
|
+
dimg.builder.build_artifact_checksum
|
21
|
+
end
|
22
|
+
|
23
23
|
def prepare_image
|
24
24
|
super
|
25
|
-
|
25
|
+
dimg.builder.build_artifact(image)
|
26
26
|
end
|
27
27
|
|
28
28
|
private
|
29
29
|
|
30
30
|
def artifact_dependencies_files_checksum
|
31
|
-
@artifact_files_checksum ||= dependencies_files_checksum(
|
31
|
+
@artifact_files_checksum ||= dependencies_files_checksum(dimg.config._artifact_dependencies)
|
32
32
|
end
|
33
33
|
end # BuildArtifact
|
34
34
|
end # Stage
|
@@ -3,9 +3,9 @@ module Dapp
|
|
3
3
|
module Stage
|
4
4
|
# DockerInstructions
|
5
5
|
class DockerInstructions < Base
|
6
|
-
def initialize(
|
7
|
-
@prev_stage = GALatestPatch.new(
|
8
|
-
@
|
6
|
+
def initialize(dimg)
|
7
|
+
@prev_stage = GALatestPatch.new(dimg, self)
|
8
|
+
@dimg = dimg
|
9
9
|
end
|
10
10
|
|
11
11
|
def dependencies
|
@@ -3,8 +3,12 @@ module Dapp
|
|
3
3
|
module Stage
|
4
4
|
# From
|
5
5
|
class From < Base
|
6
|
+
def signature
|
7
|
+
hashsum [*dependencies.flatten]
|
8
|
+
end
|
9
|
+
|
6
10
|
def dependencies
|
7
|
-
[from_image_name,
|
11
|
+
[from_image_name, dimg.config._docker._from_cache_version, Dapp::BUILD_CACHE_VERSION]
|
8
12
|
end
|
9
13
|
|
10
14
|
protected
|
@@ -22,11 +26,11 @@ module Dapp
|
|
22
26
|
private
|
23
27
|
|
24
28
|
def from_image_name
|
25
|
-
|
29
|
+
dimg.config._docker._from
|
26
30
|
end
|
27
31
|
|
28
32
|
def from_image
|
29
|
-
@from_image ||= Image::Stage.new(name: from_image_name, project:
|
33
|
+
@from_image ||= Image::Stage.new(name: from_image_name, project: dimg.project)
|
30
34
|
end
|
31
35
|
end # Prepare
|
32
36
|
end # Stage
|
@@ -3,8 +3,8 @@ module Dapp
|
|
3
3
|
module Stage
|
4
4
|
# GAArchive
|
5
5
|
class GAArchive < GABase
|
6
|
-
def initialize(
|
7
|
-
@prev_stage = GAArchiveDependencies.new(
|
6
|
+
def initialize(dimg, next_stage)
|
7
|
+
@prev_stage = GAArchiveDependencies.new(dimg, self)
|
8
8
|
super
|
9
9
|
end
|
10
10
|
|
@@ -3,13 +3,13 @@ module Dapp
|
|
3
3
|
module Stage
|
4
4
|
# GAArchiveDependencies
|
5
5
|
class GAArchiveDependencies < GADependenciesBase
|
6
|
-
def initialize(
|
7
|
-
@prev_stage = BeforeInstallArtifact.new(
|
6
|
+
def initialize(dimg, next_stage)
|
7
|
+
@prev_stage = BeforeInstallArtifact.new(dimg, self)
|
8
8
|
super
|
9
9
|
end
|
10
10
|
|
11
11
|
def dependencies
|
12
|
-
[
|
12
|
+
[dimg.git_artifacts.map(&:paramshash).join]
|
13
13
|
end
|
14
14
|
end # GAArchiveDependencies
|
15
15
|
end # Stage
|
@@ -3,8 +3,8 @@ module Dapp
|
|
3
3
|
module Stage
|
4
4
|
# GAArtifactPatch
|
5
5
|
class GAArtifactPatch < GALatestPatch
|
6
|
-
def initialize(
|
7
|
-
@prev_stage = SetupGroup::ChefCookbooks.new(
|
6
|
+
def initialize(dimg, next_stage)
|
7
|
+
@prev_stage = SetupGroup::ChefCookbooks.new(dimg, self)
|
8
8
|
super
|
9
9
|
end
|
10
10
|
|
@@ -19,9 +19,9 @@ module Dapp
|
|
19
19
|
|
20
20
|
def prepare_image
|
21
21
|
super
|
22
|
-
image.add_volumes_from
|
22
|
+
image.add_volumes_from dimg.project.gitartifact_container
|
23
23
|
|
24
|
-
|
24
|
+
dimg.git_artifacts.each do |git_artifact|
|
25
25
|
image.add_volume "#{git_artifact.repo.path}:#{git_artifact.repo.container_path}:ro"
|
26
26
|
image.add_command git_artifact.send(apply_command_method, self)
|
27
27
|
end
|
@@ -5,13 +5,13 @@ module Dapp
|
|
5
5
|
class GADependenciesBase < Base
|
6
6
|
def prepare_image
|
7
7
|
super
|
8
|
-
|
8
|
+
dimg.git_artifacts.each do |git_artifact|
|
9
9
|
image.add_service_change_label(git_artifact.full_name.to_sym => git_artifact.latest_commit)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
13
|
def empty?
|
14
|
-
|
14
|
+
dimg.git_artifacts.empty? ? true : false
|
15
15
|
end
|
16
16
|
end # GADependenciesBase
|
17
17
|
end # Stage
|
@@ -3,8 +3,8 @@ module Dapp
|
|
3
3
|
module Stage
|
4
4
|
# GALatestPatch
|
5
5
|
class GALatestPatch < GABase
|
6
|
-
def initialize(
|
7
|
-
@prev_stage = AfterSetupArtifact.new(
|
6
|
+
def initialize(dimg, next_stage)
|
7
|
+
@prev_stage = AfterSetupArtifact.new(dimg, self)
|
8
8
|
super
|
9
9
|
end
|
10
10
|
|
@@ -37,7 +37,7 @@ module Dapp
|
|
37
37
|
private
|
38
38
|
|
39
39
|
def commit_list
|
40
|
-
|
40
|
+
dimg.git_artifacts.map { |git_artifact| layer_commit(git_artifact) }
|
41
41
|
end
|
42
42
|
end # GALatestPatch
|
43
43
|
end # Stage
|
@@ -3,8 +3,8 @@ module Dapp
|
|
3
3
|
module Stage
|
4
4
|
# ImportArtifact
|
5
5
|
class ImportArtifact < ArtifactBase
|
6
|
-
def initialize(
|
7
|
-
@
|
6
|
+
def initialize(dimg)
|
7
|
+
@dimg = dimg
|
8
8
|
end
|
9
9
|
|
10
10
|
def signature
|
@@ -12,10 +12,10 @@ module Dapp
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def image
|
15
|
-
@image ||= Image::Scratch.new(name: image_name, project:
|
15
|
+
@image ||= Image::Scratch.new(name: image_name, project: dimg.project)
|
16
16
|
end
|
17
17
|
|
18
|
-
def
|
18
|
+
def image_add_volumes
|
19
19
|
end
|
20
20
|
|
21
21
|
def prepare_image
|
@@ -29,36 +29,36 @@ module Dapp
|
|
29
29
|
|
30
30
|
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
31
31
|
def apply_artifact(artifact, image)
|
32
|
-
return if
|
32
|
+
return if dimg.project.dry_run?
|
33
33
|
|
34
34
|
artifact_name = artifact[:name]
|
35
|
-
|
35
|
+
artifact_dimg = artifact[:dimg]
|
36
36
|
cwd = artifact[:options][:cwd]
|
37
|
-
|
37
|
+
include_paths = artifact[:options][:include_paths]
|
38
38
|
owner = artifact[:options][:owner]
|
39
39
|
group = artifact[:options][:group]
|
40
|
-
|
40
|
+
to = artifact[:options][:to]
|
41
41
|
|
42
|
-
sudo =
|
42
|
+
sudo = dimg.project.sudo_command(owner: Process.uid, group: Process.gid)
|
43
43
|
|
44
44
|
credentials = ''
|
45
45
|
credentials += "--owner=#{owner} " if owner
|
46
46
|
credentials += "--group=#{group} " if group
|
47
47
|
credentials += '--numeric-owner'
|
48
48
|
|
49
|
-
archive_path =
|
50
|
-
container_archive_path = File.join(
|
49
|
+
archive_path = dimg.tmp_path('artifact', artifact_name, 'archive.tar.gz')
|
50
|
+
container_archive_path = File.join(artifact_dimg.container_tmp_path(artifact_name), 'archive.tar.gz')
|
51
51
|
|
52
52
|
exclude_paths = artifact[:options][:exclude_paths].map { |path| "--exclude=#{path}" }.join(' ')
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
53
|
+
include_paths = if include_paths.empty?
|
54
|
+
[File.join(to, cwd, '*')]
|
55
|
+
else
|
56
|
+
include_paths.map { |path| File.join(to, cwd, path, '*') }
|
57
|
+
end
|
58
|
+
include_paths.map! { |path| path[1..-1] } # relative path
|
59
59
|
|
60
|
-
command = "#{sudo} #{
|
61
|
-
|
60
|
+
command = "#{sudo} #{dimg.project.tar_path} -czf #{container_archive_path} #{exclude_paths} #{include_paths.join(' ')} #{credentials}"
|
61
|
+
run_artifact_dimg(artifact_dimg, artifact_name, command)
|
62
62
|
|
63
63
|
image.add_archive archive_path
|
64
64
|
end
|
@@ -6,8 +6,8 @@ module Dapp
|
|
6
6
|
class GAPostInstallPatch < GABase
|
7
7
|
include Mod::Group
|
8
8
|
|
9
|
-
def initialize(
|
10
|
-
@prev_stage = GAPostInstallPatchDependencies.new(
|
9
|
+
def initialize(dimg, next_stage)
|
10
|
+
@prev_stage = GAPostInstallPatchDependencies.new(dimg, self)
|
11
11
|
super
|
12
12
|
end
|
13
13
|
|
@@ -6,8 +6,8 @@ module Dapp
|
|
6
6
|
class GAPostInstallPatchDependencies < GADependenciesBase
|
7
7
|
include Mod::Group
|
8
8
|
|
9
|
-
def initialize(
|
10
|
-
@prev_stage = Install.new(
|
9
|
+
def initialize(dimg, next_stage)
|
10
|
+
@prev_stage = Install.new(dimg, self)
|
11
11
|
super
|
12
12
|
end
|
13
13
|
|
@@ -6,8 +6,8 @@ module Dapp
|
|
6
6
|
class GAPreInstallPatch < GABase
|
7
7
|
include Mod::Group
|
8
8
|
|
9
|
-
def initialize(
|
10
|
-
@prev_stage = GAPreInstallPatchDependencies.new(
|
9
|
+
def initialize(dimg, next_stage)
|
10
|
+
@prev_stage = GAPreInstallPatchDependencies.new(dimg, self)
|
11
11
|
super
|
12
12
|
end
|
13
13
|
|
@@ -6,8 +6,8 @@ module Dapp
|
|
6
6
|
class GAPreInstallPatchDependencies < GADependenciesBase
|
7
7
|
include Mod::Group
|
8
8
|
|
9
|
-
def initialize(
|
10
|
-
@prev_stage = GAArchive.new(
|
9
|
+
def initialize(dimg, next_stage)
|
10
|
+
@prev_stage = GAArchive.new(dimg, self)
|
11
11
|
super
|
12
12
|
end
|
13
13
|
|
@@ -6,32 +6,32 @@ module Dapp
|
|
6
6
|
class Install < Base
|
7
7
|
include Mod::Group
|
8
8
|
|
9
|
-
def initialize(
|
10
|
-
@prev_stage = GAPreInstallPatch.new(
|
9
|
+
def initialize(dimg, next_stage)
|
10
|
+
@prev_stage = GAPreInstallPatch.new(dimg, self)
|
11
11
|
super
|
12
12
|
end
|
13
13
|
|
14
14
|
def empty?
|
15
|
-
!
|
16
|
-
end
|
17
|
-
|
18
|
-
def builder_checksum
|
19
|
-
application.builder.install_checksum
|
15
|
+
!dimg.builder.install?
|
20
16
|
end
|
21
17
|
|
22
18
|
def context
|
23
19
|
[install_dependencies_files_checksum, builder_checksum]
|
24
20
|
end
|
25
21
|
|
22
|
+
def builder_checksum
|
23
|
+
dimg.builder.install_checksum
|
24
|
+
end
|
25
|
+
|
26
26
|
def prepare_image
|
27
27
|
super
|
28
|
-
|
28
|
+
dimg.builder.install(image)
|
29
29
|
end
|
30
30
|
|
31
31
|
private
|
32
32
|
|
33
33
|
def install_dependencies_files_checksum
|
34
|
-
@install_dependencies_files_checksum ||= dependencies_files_checksum(
|
34
|
+
@install_dependencies_files_checksum ||= dependencies_files_checksum(dimg.config._install_dependencies)
|
35
35
|
end
|
36
36
|
end # Install
|
37
37
|
end
|
@@ -8,11 +8,11 @@ module Dapp
|
|
8
8
|
def log_image_build
|
9
9
|
return super if should_be_quiet?
|
10
10
|
log_group_name if group_should_be_opened?
|
11
|
-
|
11
|
+
dimg.project.with_log_indent { super }
|
12
12
|
end
|
13
13
|
|
14
14
|
def log_group_name
|
15
|
-
|
15
|
+
dimg.project.log_step(dimg.project.t(code: group_name, context: :group))
|
16
16
|
end
|
17
17
|
|
18
18
|
def group_name
|