avm-tools 0.60.0 → 0.62.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 +4 -4
- data/lib/avm/cached_download.rb +39 -0
- data/lib/avm/eac_redmine_base0/core_update.rb +110 -0
- data/lib/avm/eac_redmine_base0/data_unit.rb +27 -0
- data/lib/avm/eac_redmine_base0/deploy.rb +36 -0
- data/lib/avm/eac_redmine_base0/instance.rb +38 -0
- data/lib/avm/launcher/context/instance_manager.rb +76 -0
- data/lib/avm/launcher/context/instance_manager/cached_instance.rb +37 -0
- data/lib/avm/launcher/context/instance_manager/cached_instances.rb +35 -0
- data/lib/avm/launcher/errors/base.rb +10 -0
- data/lib/avm/launcher/errors/non_project.rb +15 -0
- data/lib/avm/launcher/instances/base.rb +94 -0
- data/lib/avm/launcher/instances/base/cache.rb +43 -0
- data/lib/avm/projects/stereotypes/git_subrepo/warp.rb +5 -4
- data/lib/avm/stereotypes/eac_webapp_base0/runner/deploy.rb +3 -1
- data/lib/avm/sync.rb +94 -0
- data/lib/avm/tools/runner/eac_redmine_base0.rb +2 -2
- data/lib/avm/tools/runner/eac_redmine_base0/core_update.rb +67 -0
- data/lib/avm/tools/runner/eac_redmine_base0/deploy.rb +1 -1
- data/lib/avm/tools/runner/git/issue.rb +43 -4
- data/lib/avm/tools/version.rb +1 -1
- data/lib/eac_launcher/context.rb +2 -2
- data/lib/eac_launcher/context/instance_discovery.rb +2 -2
- data/lib/eac_launcher/git/base/dirty_files.rb +1 -1
- data/lib/eac_launcher/git/sub_warp_base.rb +3 -2
- data/lib/eac_launcher/instances.rb +2 -2
- data/lib/eac_launcher/instances/error.rb +7 -3
- data/lib/eac_launcher/paths/logical.rb +2 -2
- data/lib/eac_launcher/publish/base.rb +2 -2
- data/template/avm/{stereotypes/eac_redmine_base0 → eac_redmine_base0}/deploy/config/install.sh.template +0 -0
- data/template/avm/{stereotypes/eac_redmine_base0 → eac_redmine_base0}/deploy/config/secrets.yml +0 -0
- metadata +19 -11
- data/lib/avm/stereotypes/eac_redmine_base0/data_unit.rb +0 -29
- data/lib/avm/stereotypes/eac_redmine_base0/deploy.rb +0 -38
- data/lib/avm/stereotypes/eac_redmine_base0/instance.rb +0 -40
- data/lib/eac_launcher/context/instance_manager.rb +0 -95
- data/lib/eac_launcher/instances/base.rb +0 -91
- data/lib/eac_launcher/instances/base/cache.rb +0 -41
@@ -1,91 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative 'base/cache'
|
4
|
-
|
5
|
-
module EacLauncher
|
6
|
-
module Instances
|
7
|
-
module Base
|
8
|
-
class << self
|
9
|
-
def extend_object(object)
|
10
|
-
object.extend ::EacRubyUtils::SimpleCache
|
11
|
-
object.extend ::EacRubyUtils::Console::Speaker
|
12
|
-
object.extend ::EacLauncher::Instances::Base::Cache
|
13
|
-
super
|
14
|
-
end
|
15
|
-
|
16
|
-
def instanciate(path, parent)
|
17
|
-
unless path.is_a?(::EacLauncher::Instances::Base)
|
18
|
-
raise "#{path} is not a project" unless path.project?
|
19
|
-
|
20
|
-
path.extend(::EacLauncher::Instances::Base)
|
21
|
-
path.parent = parent
|
22
|
-
end
|
23
|
-
path
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
attr_accessor :parent
|
28
|
-
|
29
|
-
def name
|
30
|
-
logical
|
31
|
-
end
|
32
|
-
|
33
|
-
def stereotype?(stereotype)
|
34
|
-
stereotypes.include?(stereotype)
|
35
|
-
end
|
36
|
-
|
37
|
-
def to_parent_path
|
38
|
-
return self unless @parent
|
39
|
-
|
40
|
-
logical.gsub(/\A#{Regexp.quote(@parent.logical)}/, '')
|
41
|
-
end
|
42
|
-
|
43
|
-
def project?
|
44
|
-
stereotypes.any?
|
45
|
-
end
|
46
|
-
|
47
|
-
def publish_run
|
48
|
-
stereotypes.each do |s|
|
49
|
-
next unless publish?(s)
|
50
|
-
|
51
|
-
infov(name, "publishing #{s.label}")
|
52
|
-
s.publish_class.new(self).run
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
def publish_check
|
57
|
-
stereotypes.each do |s|
|
58
|
-
next unless publish?(s)
|
59
|
-
|
60
|
-
puts "#{name.to_s.cyan}|#{s.label}|" \
|
61
|
-
"#{s.publish_class.new(self).check}"
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
def project_name
|
66
|
-
::File.basename(logical)
|
67
|
-
end
|
68
|
-
|
69
|
-
def included?
|
70
|
-
!::EacLauncher::Context.current.settings.excluded_projects.include?(project_name)
|
71
|
-
end
|
72
|
-
|
73
|
-
def to_h
|
74
|
-
super.to_h.merge(parent: parent ? parent.logical : nil)
|
75
|
-
end
|
76
|
-
|
77
|
-
private
|
78
|
-
|
79
|
-
def publish?(stereotype)
|
80
|
-
return false unless stereotype.publish_class
|
81
|
-
|
82
|
-
filter = ::EacLauncher::Context.current.publish_options[:stereotype]
|
83
|
-
filter.blank? ? true : filter == stereotype.name.demodulize
|
84
|
-
end
|
85
|
-
|
86
|
-
def options_uncached
|
87
|
-
::EacLauncher::Context.current.settings.instance_settings(self)
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
91
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module EacLauncher
|
4
|
-
module Instances
|
5
|
-
module Base
|
6
|
-
module Cache
|
7
|
-
def cache_path(subpath)
|
8
|
-
File.join(cache_root, subpath)
|
9
|
-
end
|
10
|
-
|
11
|
-
def cache_key(key, &block)
|
12
|
-
v = cache_key_get(key)
|
13
|
-
return v if v.present? || block.nil?
|
14
|
-
|
15
|
-
v = yield
|
16
|
-
cache_key_write(key, v)
|
17
|
-
v
|
18
|
-
end
|
19
|
-
|
20
|
-
private
|
21
|
-
|
22
|
-
def cache_key_get(key)
|
23
|
-
File.file?(cache_key_path(key)) ? File.read(cache_key_path(key)) : nil
|
24
|
-
end
|
25
|
-
|
26
|
-
def cache_key_write(key, value)
|
27
|
-
FileUtils.mkdir_p(File.dirname(cache_key_path(key)))
|
28
|
-
File.write(cache_key_path(key), value)
|
29
|
-
end
|
30
|
-
|
31
|
-
def cache_key_path(key)
|
32
|
-
File.join(cache_root, 'keys', key.parameterize)
|
33
|
-
end
|
34
|
-
|
35
|
-
def cache_root
|
36
|
-
File.join(::EacLauncher::Context.current.cache_root, name.parameterize)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|