dapp 0.24.10 → 0.24.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dapp/cli.rb +1 -2
- data/lib/dapp/dimg/build/stage/base.rb +3 -1
- data/lib/dapp/dimg/build/stage/ga_base.rb +1 -1
- data/lib/dapp/dimg/build/stage/ga_latest_patch.rb +3 -1
- data/lib/dapp/dimg/docker_registry/base.rb +0 -10
- data/lib/dapp/dimg/git_repo/base.rb +2 -2
- data/lib/dapp/dimg/git_repo/local.rb +2 -2
- data/lib/dapp/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab5f1416a3b72c5370481e3914376cda65a70425
|
4
|
+
data.tar.gz: bc529abc6f79c25d38170b3ad1834ade2f5048b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5b709c15a81c2c2b337e53a2035ee54304652406d985d9948997db830d6c4bc78ec7b58bc5c6e2b42c0d6dd9419f9c25bfea3fec515ec828a260f343f892e28
|
7
|
+
data.tar.gz: 2779a600fbc19528f2fccc7d3828770572a858bee09ea3849188689253d1743bd40dff85fe0c4de35b74990145ae2a6d96a4df3c7325df5081ed51fa2d47afd7
|
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
|
@@ -189,8 +189,10 @@ module Dapp
|
|
189
189
|
commits[git_artifact] ||= begin
|
190
190
|
if image.built?
|
191
191
|
image.labels[dimg.dapp.dimgstage_g_a_commit_label(git_artifact.paramshash)]
|
192
|
-
|
192
|
+
elsif g_a_stage? && !empty?
|
193
193
|
git_artifact.latest_commit
|
194
|
+
elsif prev_stage
|
195
|
+
prev_stage.layer_commit(git_artifact)
|
194
196
|
end
|
195
197
|
end
|
196
198
|
end
|
@@ -10,7 +10,7 @@ module Dapp
|
|
10
10
|
image.add_volume "#{dimg.tmp_path('patches')}:#{dimg.container_tmp_path('patches')}:ro"
|
11
11
|
|
12
12
|
dimg.git_artifacts.each do |git_artifact|
|
13
|
-
image.add_service_change_label(dimg.dapp.dimgstage_g_a_commit_label(git_artifact.paramshash).to_sym => git_artifact
|
13
|
+
image.add_service_change_label(dimg.dapp.dimgstage_g_a_commit_label(git_artifact.paramshash).to_sym => layer_commit(git_artifact))
|
14
14
|
image.add_command git_artifact.send(apply_command_method, self)
|
15
15
|
end
|
16
16
|
end
|
@@ -28,7 +28,9 @@ module Dapp
|
|
28
28
|
private
|
29
29
|
|
30
30
|
def commit_list
|
31
|
-
dimg.git_artifacts
|
31
|
+
dimg.git_artifacts
|
32
|
+
.select { |ga| ga.repo.commit_exists?(prev_stage.layer_commit(ga)) && ga.patch_any_changes?(self) }
|
33
|
+
.map(&method(:layer_commit))
|
32
34
|
end
|
33
35
|
|
34
36
|
def git_artifacts_dev_patch_hashes
|
@@ -35,7 +35,6 @@ module Dapp
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def image_delete(tag)
|
38
|
-
image_blobs(tag).each { |hash| blob_delete(hash.values.first) }
|
39
38
|
api_request(repo_suffix, "/manifests/#{image_digest(tag)}",
|
40
39
|
method: :delete,
|
41
40
|
expects: [202, 404],
|
@@ -54,10 +53,6 @@ module Dapp
|
|
54
53
|
headers: { Accept: 'application/vnd.docker.distribution.manifest.v2+json' }).headers['Docker-Content-Digest']
|
55
54
|
end
|
56
55
|
|
57
|
-
def image_blobs(tag)
|
58
|
-
manifest_v1(tag)['fsLayers']
|
59
|
-
end
|
60
|
-
|
61
56
|
def manifest_v1(tag)
|
62
57
|
api_request(repo_suffix, "/manifests/#{tag}")
|
63
58
|
end
|
@@ -67,11 +62,6 @@ module Dapp
|
|
67
62
|
headers: { Accept: 'application/vnd.docker.distribution.manifest.v2+json' })
|
68
63
|
end
|
69
64
|
|
70
|
-
def blob_delete(id)
|
71
|
-
api_request(repo_suffix, "/blobs/#{id}",
|
72
|
-
method: :delete, expects: [202, 404])
|
73
|
-
end
|
74
|
-
|
75
65
|
def api_request(*uri, **options)
|
76
66
|
JSON.load(raw_api_request(*uri, **options).body)
|
77
67
|
end
|
@@ -104,12 +104,12 @@ module Dapp
|
|
104
104
|
|
105
105
|
def patches(from, to, paths: [], exclude_paths: [], **kwargs)
|
106
106
|
diff(from, to, **kwargs).patches.select do |patch|
|
107
|
-
ignore_patch?(patch, paths: paths, exclude_paths: exclude_paths)
|
107
|
+
!ignore_patch?(patch, paths: paths, exclude_paths: exclude_paths)
|
108
108
|
end
|
109
109
|
end
|
110
110
|
|
111
111
|
def ignore_patch?(patch, paths: [], exclude_paths: [])
|
112
|
-
|
112
|
+
ignore_path?(patch.delta.new_file[:path], paths: paths, exclude_paths: exclude_paths)
|
113
113
|
end
|
114
114
|
|
115
115
|
def entries(commit, paths: [], exclude_paths: [])
|
@@ -48,9 +48,9 @@ module Dapp
|
|
48
48
|
delta_new_file = patch.delta.new_file
|
49
49
|
args = [delta_new_file[:path], paths: paths, exclude_paths: exclude_paths]
|
50
50
|
if nested_git_repository_mode?(delta_new_file[:mode])
|
51
|
-
|
51
|
+
ignore_directory?(*args)
|
52
52
|
else
|
53
|
-
|
53
|
+
ignore_path?(*args)
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
data/lib/dapp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.24.
|
4
|
+
version: 0.24.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Stolyarov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-shellout
|
@@ -723,7 +723,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
723
723
|
version: 2.5.0
|
724
724
|
requirements: []
|
725
725
|
rubyforge_project:
|
726
|
-
rubygems_version: 2.
|
726
|
+
rubygems_version: 2.6.11
|
727
727
|
signing_key:
|
728
728
|
specification_version: 4
|
729
729
|
summary: Build docker packaged apps using chef or shell
|