dapp 0.23.2 → 0.23.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bae0c6892f439eeb2733d7c3767b70769c94a492
|
4
|
+
data.tar.gz: 63a6652f3b687bc044c6a0312b9def251ba8f130
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0332c89d8ea89a0611f4cb10abcdd6af84ae81c0c5b75d8635f85e0880ad89ab2e0ac59e9ecff9e085c8334839924b42f8943c89dd2a0e640e2cab15dac4bcab
|
7
|
+
data.tar.gz: 8ae4bd3b958a1853d22e2424452dc8a9af548ff52443dc04972e0e799be4271d5302eb9f26196eebcb43fce2ec4f07958692e30cdddbabbc4705cfcaa07956f6
|
data/config/en/net_status.yml
CHANGED
@@ -39,7 +39,6 @@ en:
|
|
39
39
|
values_file_not_found: "Values file `%{path}` not found!"
|
40
40
|
secret_file_not_found: "Secret file `%{path}` not found!"
|
41
41
|
secret_file_empty: "Secret file `%{path}` can't be empty!"
|
42
|
-
user_containers_detected: "User containers are using these images:\n%{ids}"
|
43
42
|
incorrect_yaml_structure: "Incorrect YAML structure in `%{path}`!"
|
44
43
|
editor_not_found: "Editor not found!"
|
45
44
|
expected_only_one_tag: 'Expected only one tag (`%{tags}`)!'
|
@@ -54,7 +54,7 @@ module Dapp
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def update_project_images_cache(project_images)
|
57
|
-
dapp_project_images.delete_if { |image| project_images.include?(image) }
|
57
|
+
dapp_project_images.delete_if { |image| project_images.map { |i| i[:id] }.include?(image[:id]) }
|
58
58
|
end
|
59
59
|
|
60
60
|
def project_images_to_delete(project_images)
|
@@ -74,15 +74,19 @@ module Dapp
|
|
74
74
|
end
|
75
75
|
|
76
76
|
def remove_images(images_ids_or_names)
|
77
|
-
images_ids_or_names.uniq
|
78
|
-
check_user_containers!(images_ids_or_names)
|
77
|
+
images_ids_or_names = ignore_used_images(images_ids_or_names.uniq)
|
79
78
|
remove_base("#{host_docker} rmi%{force_option} %{ids}", images_ids_or_names, force: false)
|
80
79
|
end
|
81
80
|
|
82
|
-
def
|
83
|
-
|
84
|
-
|
85
|
-
|
81
|
+
def ignore_used_images(images_ids_or_names)
|
82
|
+
images_ids_or_names.select do |image_id_or_name|
|
83
|
+
res = run_command(%(#{host_docker} ps -a -q --filter=ancestor=#{image_id_or_name}))
|
84
|
+
if res && !res.stdout.strip.empty? && !dry_run?
|
85
|
+
log_info("Skip `#{image_id_or_name}` (used by containers: #{res.stdout.strip.split.join(' ')})")
|
86
|
+
false
|
87
|
+
else
|
88
|
+
true
|
89
|
+
end
|
86
90
|
end
|
87
91
|
end
|
88
92
|
|
@@ -19,7 +19,11 @@ module Dapp
|
|
19
19
|
def proper_cache
|
20
20
|
log_proper_cache do
|
21
21
|
lock("#{name}.images") do
|
22
|
-
remove_project_images
|
22
|
+
remove_project_images begin
|
23
|
+
dapp_project_dimgstages.select do |image|
|
24
|
+
!actual_cache_project_dimgstages.map { |dimgstage| dimgstage[:id] }.include?(image[:id])
|
25
|
+
end
|
26
|
+
end
|
23
27
|
end
|
24
28
|
end
|
25
29
|
end
|
@@ -39,8 +43,8 @@ module Dapp
|
|
39
43
|
|
40
44
|
# Удаление только образов старше 2ч
|
41
45
|
dimgstages.delete_if do |dimgstage|
|
42
|
-
Time.now - dimgstage[:created_at] < 2*60*60
|
43
|
-
end
|
46
|
+
Time.now - dimgstage[:created_at] < 2 * 60 * 60
|
47
|
+
end unless ENV['DAPP_STAGES_CLEANUP_LOCAL_DISABLED_DATE_POLICY']
|
44
48
|
|
45
49
|
remove_project_images(dimgstages)
|
46
50
|
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.23.
|
4
|
+
version: 0.23.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Stolyarov
|
@@ -721,7 +721,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
721
721
|
version: 2.5.0
|
722
722
|
requirements: []
|
723
723
|
rubyforge_project:
|
724
|
-
rubygems_version: 2.
|
724
|
+
rubygems_version: 2.5.1
|
725
725
|
signing_key:
|
726
726
|
specification_version: 4
|
727
727
|
summary: Build docker packaged apps using chef or shell
|