avm-tools 0.88.0 → 0.89.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avm/eac_webapp_base0/deploy.rb +16 -4
- data/lib/avm/eac_webapp_base0/deploy/appended_directories.rb +1 -1
- data/lib/avm/eac_webapp_base0/deploy/git_info.rb +1 -1
- data/lib/avm/eac_webapp_base0/instance.rb +2 -0
- data/lib/avm/eac_webapp_base0/runner/deploy.rb +13 -21
- data/lib/avm/tools/runner/eac_webapp_base0.rb +14 -0
- data/lib/avm/tools/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9acbf7ad72627c97018d603c65da21c1875efea79caa7569059d5fd1aeb083e2
|
4
|
+
data.tar.gz: 8d0bb06826ece8223ed806348cf91f36c8117ebba3ceb05247b6947b54da44f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f249739403ccc5346e161f6481acd020d369a02b00b01da1b6c80addc6bcce58d2dc7724cf923929e146e3cac1b8e5e557e82f66cb9f501da8e44f30f358b5c8
|
7
|
+
data.tar.gz: a47f7c215bedfe5f870ba8a6bbbaf2e579c0c31b017546894c43e0421d75362b366dace3cfcd2bb9f72df7a3037866385b9c928e9389d558d0c39c1939928ea1
|
@@ -17,10 +17,16 @@ module Avm
|
|
17
17
|
|
18
18
|
enable_console_speaker
|
19
19
|
enable_simple_cache
|
20
|
-
|
20
|
+
enable_listable
|
21
|
+
lists.add_symbol :option, :appended_directories, :no_request_test, :reference
|
22
|
+
common_constructor :instance, :options, default: [{}] do
|
23
|
+
self.options = ::Avm::EacWebappBase0::Deploy.lists.option
|
24
|
+
.hash_keys_validate!(options.symbolize_keys)
|
25
|
+
end
|
21
26
|
|
22
|
-
|
23
|
-
|
27
|
+
REQUEST_TEST_JOB = 'request_test'
|
28
|
+
JOBS = (%w[create_build_dir build_content append_instance_content write_on_target
|
29
|
+
setup_files_units assert_instance_branch] + [REQUEST_TEST_JOB]).freeze
|
24
30
|
define_callbacks(*JOBS)
|
25
31
|
|
26
32
|
def run
|
@@ -67,8 +73,14 @@ module Avm
|
|
67
73
|
|
68
74
|
private
|
69
75
|
|
76
|
+
def jobs
|
77
|
+
r = JOBS.dup
|
78
|
+
r.delete(REQUEST_TEST_JOB) if options[OPTION_NO_REQUEST_TEST]
|
79
|
+
r
|
80
|
+
end
|
81
|
+
|
70
82
|
def run_jobs
|
71
|
-
|
83
|
+
jobs.each do |job|
|
72
84
|
run_callbacks job do
|
73
85
|
send(job)
|
74
86
|
end
|
@@ -2,34 +2,25 @@
|
|
2
2
|
|
3
3
|
require 'avm/instances/runner'
|
4
4
|
require 'avm/path_string'
|
5
|
-
require '
|
6
|
-
require 'eac_ruby_utils/console/speaker'
|
5
|
+
require 'eac_cli/core_ext'
|
7
6
|
|
8
7
|
module Avm
|
9
8
|
module EacWebappBase0
|
10
9
|
class Runner < ::Avm::Instances::Runner
|
11
|
-
class Deploy
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
__PROGRAM__ [options]
|
19
|
-
__PROGRAM__ -h | --help
|
20
|
-
|
21
|
-
Options:
|
22
|
-
-h --help Show this screen.
|
23
|
-
-r --reference=<git-reference> Git reference to deploy.
|
24
|
-
-a --append-dirs=<append-dirs> Append directories to deploy (List separated by ":").
|
25
|
-
DOCOPT
|
10
|
+
class Deploy
|
11
|
+
runner_with :help do
|
12
|
+
desc 'Deploy for instance.'
|
13
|
+
arg_opt '-r', '--reference', 'Git reference to deploy.'
|
14
|
+
arg_opt '-a', '--append-dirs', 'Append directories to deploy (List separated by ":").'
|
15
|
+
bool_opt '-T', '--no-request-test', 'Do not test web interface after deploy.'
|
16
|
+
end
|
26
17
|
|
27
18
|
def deploy_class
|
28
|
-
|
19
|
+
runner_context.call(:stereotype_module).const_get('Deploy')
|
29
20
|
end
|
30
21
|
|
31
22
|
def run
|
32
|
-
result = deploy_class.new(
|
23
|
+
result = deploy_class.new(runner_context.call(:instance), deploy_options).run
|
33
24
|
if result.error?
|
34
25
|
fatal_error result.to_s
|
35
26
|
else
|
@@ -38,8 +29,9 @@ module Avm
|
|
38
29
|
end
|
39
30
|
|
40
31
|
def deploy_options
|
41
|
-
{ reference:
|
42
|
-
appended_directories: ::Avm::PathString.paths(
|
32
|
+
{ reference: parsed.reference,
|
33
|
+
appended_directories: ::Avm::PathString.paths(parsed.append_dirs),
|
34
|
+
no_request_test: parsed.no_request_test? }
|
43
35
|
end
|
44
36
|
end
|
45
37
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_webapp_base0/runner'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Tools
|
8
|
+
class Runner
|
9
|
+
class EacWebappBase0 < ::Avm::EacWebappBase0::Runner
|
10
|
+
require_sub __FILE__
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/avm/tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avm-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.89.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -504,6 +504,7 @@ files:
|
|
504
504
|
- lib/avm/tools/runner/eac_redmine_base0/core_update.rb
|
505
505
|
- lib/avm/tools/runner/eac_redmine_base0/docker.rb
|
506
506
|
- lib/avm/tools/runner/eac_redmine_base0/project_rename.rb
|
507
|
+
- lib/avm/tools/runner/eac_webapp_base0.rb
|
507
508
|
- lib/avm/tools/runner/eac_wordpress_base0.rb
|
508
509
|
- lib/avm/tools/runner/eac_writings_base0.rb
|
509
510
|
- lib/avm/tools/runner/eac_writings_base1.rb
|