dapp 0.26.11 → 0.26.12
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/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/dapp/command/common.rb +1 -0
- 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 +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 150f425d2a33e65251409283bc05c659364f7b06
|
4
|
+
data.tar.gz: 6e41c8fb2e4bc849a2bbad4eec88ca47fe49d9ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e46039d285fd2c158dc3d4e1370133660385d4b4936c4fca865692ccad3ae125ca9176e4efd073b260b36e71da080eef0f51fa44063f40281aba230402ed7ab5
|
7
|
+
data.tar.gz: 94a3d4ee06c7a99963709b760593e69814fe0feb58d61ba60b12102ac5e8656cb6b01bc64b45b9105b034575fbf3664f440857aadb42a4bf81802b8196f52d5b
|
@@ -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
|
@@ -125,6 +125,7 @@ module Dapp
|
|
125
125
|
end
|
126
126
|
|
127
127
|
def remove_base(query_format, ids, force: false)
|
128
|
+
return if ids.empty?
|
128
129
|
force_option = force ? ' -f' : ''
|
129
130
|
log(ids.join("\n")) if log_verbose? || dry_run?
|
130
131
|
run_command(format(query_format, force_option: force_option, ids: ids.join(' ')))
|
@@ -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.26.
|
4
|
+
version: 0.26.12
|
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-03-
|
11
|
+
date: 2018-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-shellout
|