dapp 0.27.1 → 0.27.2
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/lib/dapp/cli/command/base.rb +8 -4
- data/lib/dapp/cli/command/slug.rb +5 -1
- data/lib/dapp/cli.rb +1 -2
- data/lib/dapp/dimg/build/stage/artifact_base.rb +2 -1
- data/lib/dapp/dimg/build/stage/ga_latest_patch.rb +2 -2
- data/lib/dapp/dimg/cli/command/dimg/list.rb +3 -0
- data/lib/dapp/dimg/cli/command/dimg/run.rb +5 -1
- data/lib/dapp/dimg/cli/command/dimg/stage_image.rb +9 -0
- data/lib/dapp/dimg/cli/command/dimg/stages/base.rb +2 -2
- data/lib/dapp/dimg/dapp/command/stages/common.rb +1 -1
- data/lib/dapp/dimg/dimg/stages.rb +1 -1
- data/lib/dapp/dimg/dimg.rb +5 -3
- data/lib/dapp/kube/cli/command/kube/lint.rb +5 -1
- data/lib/dapp/kube/cli/command/kube/render.rb +5 -1
- data/lib/dapp/kube/cli/command/kube/secret_edit.rb +5 -1
- data/lib/dapp/kube/cli/command/kube/secret_extract.rb +5 -1
- data/lib/dapp/kube/cli/command/kube/secret_generate.rb +5 -1
- data/lib/dapp/kube/cli/command/kube/secret_key_generate.rb +2 -2
- data/lib/dapp/kube/cli/command/kube/secret_regenerate.rb +5 -1
- data/lib/dapp/kube/cli/command/kube/value_get.rb +4 -1
- data/lib/dapp/kube/helm/values.rb +1 -1
- data/lib/dapp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b89b8d4526cea7d52e65da52a8f820d57b2c8b3d
|
4
|
+
data.tar.gz: cf18d0448c6bb51ada30b15d38c3ace94d36196d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9366275d1b264accbb4b261d7571597d91b0a00a0dc23ae851f79071e80b3118d31debe6709ddcc896cae1a0c69d93451971da3f470299707476233972dd49c
|
7
|
+
data.tar.gz: 676e2185ce05f47b0d2e85ac8a345f9a4df91bb90df4bf5fadc96ce5e1cac433aa2a05831b4268fb6c911a471eaeb5f94579ade04dcb1aa1c1feeee60d476ef3
|
@@ -56,10 +56,10 @@ module Dapp
|
|
56
56
|
super()
|
57
57
|
end
|
58
58
|
|
59
|
-
def run_dapp_command(run_method, options: {},
|
59
|
+
def run_dapp_command(run_method, options: {}, try_host_docker_login: false)
|
60
60
|
dapp = ::Dapp::Dapp.new(options: options)
|
61
61
|
|
62
|
-
log_dapp_running_time(dapp
|
62
|
+
log_dapp_running_time(dapp) do
|
63
63
|
begin
|
64
64
|
dapp.try_host_docker_login if try_host_docker_login
|
65
65
|
|
@@ -74,8 +74,8 @@ module Dapp
|
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
77
|
-
def log_dapp_running_time(dapp
|
78
|
-
return yield
|
77
|
+
def log_dapp_running_time(dapp)
|
78
|
+
return yield unless log_running_time
|
79
79
|
|
80
80
|
begin
|
81
81
|
start_time = Time.now
|
@@ -85,6 +85,10 @@ module Dapp
|
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
88
|
+
def log_running_time
|
89
|
+
true
|
90
|
+
end
|
91
|
+
|
88
92
|
def run(_argv = ARGV)
|
89
93
|
raise
|
90
94
|
end
|
@@ -12,10 +12,14 @@ BANNER
|
|
12
12
|
def run(argv = ARGV)
|
13
13
|
self.class.parse_options(self, argv)
|
14
14
|
str = self.class.required_argument(self, 'string')
|
15
|
-
run_dapp_command(nil, options: cli_options
|
15
|
+
run_dapp_command(nil, options: cli_options) do |dapp|
|
16
16
|
dapp.slug([cli_arguments, str].flatten.join(' '))
|
17
17
|
end
|
18
18
|
end
|
19
|
+
|
20
|
+
def log_running_time
|
21
|
+
false
|
22
|
+
end
|
19
23
|
end
|
20
24
|
end
|
21
25
|
end
|
data/lib/dapp/cli.rb
CHANGED
@@ -5,7 +5,7 @@ module Dapp
|
|
5
5
|
extend Helper::Cli
|
6
6
|
include Helper::Trivia
|
7
7
|
|
8
|
-
SUBCOMMANDS = ['dimg', '
|
8
|
+
SUBCOMMANDS = ['dimg', 'kube', 'update', 'slug'].freeze
|
9
9
|
|
10
10
|
banner <<BANNER.freeze
|
11
11
|
Usage: dapp subcommand [subcommand options]
|
@@ -13,7 +13,6 @@ Usage: dapp subcommand [subcommand options]
|
|
13
13
|
Available subcommands: (for details, dapp SUB-COMMAND --help)
|
14
14
|
|
15
15
|
dapp dimg
|
16
|
-
dapp deployment
|
17
16
|
dapp kube
|
18
17
|
dapp update
|
19
18
|
dapp slug STRING
|
@@ -23,7 +23,8 @@ module Dapp
|
|
23
23
|
@artifacts ||= begin
|
24
24
|
dimg.config.public_send("_#{name}").map do |artifact|
|
25
25
|
artifact_dimg = dimg.dapp.artifact_dimg(config: artifact._config,
|
26
|
-
ignore_git_fetch: dimg.ignore_git_fetch
|
26
|
+
ignore_git_fetch: dimg.ignore_git_fetch,
|
27
|
+
ignore_signature_auto_calculation: dimg.ignore_signature_auto_calculation)
|
27
28
|
{ options: artifact._artifact_options, dimg: artifact_dimg }
|
28
29
|
end
|
29
30
|
end
|
@@ -29,8 +29,8 @@ module Dapp
|
|
29
29
|
|
30
30
|
def commit_list
|
31
31
|
dimg.git_artifacts
|
32
|
-
.
|
33
|
-
.
|
32
|
+
.select { |ga| ga.repo.commit_exists?(prev_stage.layer_commit(ga)) && ga.patch_any_changes?(self) }
|
33
|
+
.map(&method(:layer_commit))
|
34
34
|
end
|
35
35
|
|
36
36
|
def git_artifacts_dev_patch_hashes
|
@@ -64,10 +64,14 @@ BANNER
|
|
64
64
|
|
65
65
|
stage_name = config.delete(:stage)
|
66
66
|
|
67
|
-
run_dapp_command(nil, options: cli_options(dimgs_patterns: patterns)
|
67
|
+
run_dapp_command(nil, options: cli_options(dimgs_patterns: patterns)) do |dapp|
|
68
68
|
dapp.run(stage_name, docker_options, command)
|
69
69
|
end
|
70
70
|
end
|
71
|
+
|
72
|
+
def log_running_time
|
73
|
+
false
|
74
|
+
end
|
71
75
|
end
|
72
76
|
end
|
73
77
|
end
|
@@ -18,6 +18,15 @@ BANNER
|
|
18
18
|
in: [:from, :before_install, :before_install_artifact, :g_a_archive, :g_a_pre_install_patch, :install,
|
19
19
|
:g_a_post_install_patch, :after_install_artifact, :before_setup, :before_setup_artifact, :g_a_pre_setup_patch,
|
20
20
|
:setup, :g_a_post_setup_patch, :after_setup_artifact, :g_a_latest_patch, :docker_instructions]
|
21
|
+
def log_running_time
|
22
|
+
false
|
23
|
+
end
|
24
|
+
|
25
|
+
def cli_options(**kwargs)
|
26
|
+
super.tap do |config|
|
27
|
+
config[:quiet] ||= !config[:verbose]
|
28
|
+
end
|
29
|
+
end
|
21
30
|
end
|
22
31
|
end
|
23
32
|
end
|
@@ -3,8 +3,8 @@ module Dapp::Dimg::CLI
|
|
3
3
|
class Dimg < ::Dapp::CLI
|
4
4
|
class Stages < ::Dapp::CLI
|
5
5
|
class Base < Base
|
6
|
-
def run_dapp_command(run_command, options: {},
|
7
|
-
super(run_command, options: options.merge(verbose: true),
|
6
|
+
def run_dapp_command(run_command, options: {}, **extra_options)
|
7
|
+
super(run_command, options: options.merge(verbose: true), **extra_options)
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
@@ -56,7 +56,7 @@ module Dapp
|
|
56
56
|
def dapp_git_repositories
|
57
57
|
@dapp_git_repositories ||= begin
|
58
58
|
{}.tap do |repositories|
|
59
|
-
dimgs = build_configs.map { |config| dimg(config: config, ignore_git_fetch: true) }
|
59
|
+
dimgs = build_configs.map { |config| dimg(config: config, ignore_git_fetch: true, ignore_signature_auto_calculation: true) }
|
60
60
|
dimgs.each do |dimg|
|
61
61
|
[dimg, dimg.artifacts]
|
62
62
|
.flatten
|
@@ -36,7 +36,7 @@ module Dapp
|
|
36
36
|
(self.last_stage = last_stage_class.new(self)).tap do |stage|
|
37
37
|
dapp.log_secondary_process("#{name || 'nameless'}: calculating stages signatures") do
|
38
38
|
stage.signature
|
39
|
-
end
|
39
|
+
end unless ignore_signature_auto_calculation
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
data/lib/dapp/dimg/dimg.rb
CHANGED
@@ -10,15 +10,17 @@ module Dapp
|
|
10
10
|
|
11
11
|
attr_reader :config
|
12
12
|
attr_reader :ignore_git_fetch
|
13
|
+
attr_reader :ignore_signature_auto_calculation
|
13
14
|
attr_reader :should_be_built
|
14
15
|
attr_reader :dapp
|
15
16
|
|
16
|
-
def initialize(config:, dapp:, should_be_built: false, ignore_git_fetch: false)
|
17
|
+
def initialize(config:, dapp:, should_be_built: false, ignore_git_fetch: false, ignore_signature_auto_calculation: false)
|
17
18
|
@config = config
|
18
19
|
@dapp = dapp
|
19
20
|
|
20
|
-
@ignore_git_fetch
|
21
|
-
@
|
21
|
+
@ignore_git_fetch = ignore_git_fetch
|
22
|
+
@ignore_signature_auto_calculation = ignore_signature_auto_calculation
|
23
|
+
@should_be_built = should_be_built
|
22
24
|
|
23
25
|
@dapp._terminate_dimg_on_terminate(self)
|
24
26
|
|
@@ -38,7 +38,7 @@ BANNER
|
|
38
38
|
def run(argv = ARGV)
|
39
39
|
self.class.parse_options(self, argv)
|
40
40
|
|
41
|
-
run_dapp_command(nil, options: cli_options
|
41
|
+
run_dapp_command(nil, options: cli_options) do |dapp|
|
42
42
|
repo = if not cli_arguments[0].nil?
|
43
43
|
self.class.required_argument(self, 'repo')
|
44
44
|
else
|
@@ -50,6 +50,10 @@ BANNER
|
|
50
50
|
dapp.public_send(run_method)
|
51
51
|
end
|
52
52
|
end
|
53
|
+
|
54
|
+
def log_running_time
|
55
|
+
false
|
56
|
+
end
|
53
57
|
end
|
54
58
|
end
|
55
59
|
end
|
@@ -53,7 +53,7 @@ BANNER
|
|
53
53
|
|
54
54
|
def run(argv = ARGV)
|
55
55
|
self.class.parse_options(self, argv)
|
56
|
-
run_dapp_command(nil, options: cli_options
|
56
|
+
run_dapp_command(nil, options: cli_options) do |dapp|
|
57
57
|
repo = if not cli_arguments[0].nil?
|
58
58
|
self.class.required_argument(self, 'repo')
|
59
59
|
else
|
@@ -65,6 +65,10 @@ BANNER
|
|
65
65
|
dapp.public_send(run_method)
|
66
66
|
end
|
67
67
|
end
|
68
|
+
|
69
|
+
def log_running_time
|
70
|
+
false
|
71
|
+
end
|
68
72
|
end
|
69
73
|
end
|
70
74
|
end
|
@@ -17,10 +17,14 @@ BANNER
|
|
17
17
|
def run(argv = ARGV)
|
18
18
|
self.class.parse_options(self, argv)
|
19
19
|
file_path = self.class.required_argument(self, 'FILE_PATH')
|
20
|
-
run_dapp_command(nil, options: cli_options
|
20
|
+
run_dapp_command(nil, options: cli_options) do |dapp|
|
21
21
|
dapp.public_send(run_method, file_path)
|
22
22
|
end
|
23
23
|
end
|
24
|
+
|
25
|
+
def log_running_time
|
26
|
+
false
|
27
|
+
end
|
24
28
|
end
|
25
29
|
end
|
26
30
|
end
|
@@ -26,10 +26,14 @@ BANNER
|
|
26
26
|
self.class.required_argument(self, 'FILE_PATH')
|
27
27
|
end
|
28
28
|
end
|
29
|
-
run_dapp_command(nil, options: cli_options
|
29
|
+
run_dapp_command(nil, options: cli_options) do |dapp|
|
30
30
|
dapp.public_send(run_method, file_path)
|
31
31
|
end
|
32
32
|
end
|
33
|
+
|
34
|
+
def log_running_time
|
35
|
+
false
|
36
|
+
end
|
33
37
|
end
|
34
38
|
end
|
35
39
|
end
|
@@ -21,10 +21,14 @@ BANNER
|
|
21
21
|
def run(argv = ARGV)
|
22
22
|
self.class.parse_options(self, argv)
|
23
23
|
file_path = cli_arguments.empty? ? nil : cli_arguments.first
|
24
|
-
run_dapp_command(nil, options: cli_options
|
24
|
+
run_dapp_command(nil, options: cli_options) do |dapp|
|
25
25
|
dapp.public_send(run_method, file_path)
|
26
26
|
end
|
27
27
|
end
|
28
|
+
|
29
|
+
def log_running_time
|
30
|
+
false
|
31
|
+
end
|
28
32
|
end
|
29
33
|
end
|
30
34
|
end
|
@@ -8,8 +8,8 @@ Usage:
|
|
8
8
|
|
9
9
|
Options:
|
10
10
|
BANNER
|
11
|
-
def
|
12
|
-
|
11
|
+
def log_running_time
|
12
|
+
false
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -16,10 +16,14 @@ BANNER
|
|
16
16
|
|
17
17
|
def run(argv = ARGV)
|
18
18
|
self.class.parse_options(self, argv)
|
19
|
-
run_dapp_command(nil, options: cli_options
|
19
|
+
run_dapp_command(nil, options: cli_options) do |dapp|
|
20
20
|
dapp.public_send(run_method, *cli_arguments)
|
21
21
|
end
|
22
22
|
end
|
23
|
+
|
24
|
+
def log_running_time
|
25
|
+
false
|
26
|
+
end
|
23
27
|
end
|
24
28
|
end
|
25
29
|
end
|
@@ -29,7 +29,7 @@ BANNER
|
|
29
29
|
def run(argv = ARGV)
|
30
30
|
self.class.parse_options(self, argv)
|
31
31
|
|
32
|
-
run_dapp_command(nil, options: cli_options
|
32
|
+
run_dapp_command(nil, options: cli_options) do |dapp|
|
33
33
|
repo = if not cli_arguments[1].nil?
|
34
34
|
self.class.required_argument(self, "repo")
|
35
35
|
else
|
@@ -42,7 +42,10 @@ BANNER
|
|
42
42
|
dapp.public_send(run_method, value_key)
|
43
43
|
end
|
44
44
|
end
|
45
|
+
end
|
45
46
|
|
47
|
+
def log_running_time
|
48
|
+
false
|
46
49
|
end
|
47
50
|
end
|
48
51
|
end
|
data/lib/dapp/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.27.
|
4
|
+
version: 0.27.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Stolyarov
|
@@ -741,7 +741,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
741
741
|
version: 2.5.0
|
742
742
|
requirements: []
|
743
743
|
rubyforge_project:
|
744
|
-
rubygems_version: 2.
|
744
|
+
rubygems_version: 2.6.11
|
745
745
|
signing_key:
|
746
746
|
specification_version: 4
|
747
747
|
summary: Build docker packaged apps using chef or shell
|