avm-tools 0.74.0 → 0.76.1
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_rails_base0/instance.rb +2 -5
- data/lib/avm/{rails/runners.rb → eac_rails_base1.rb} +2 -4
- data/lib/avm/{rails → eac_rails_base1}/instance.rb +8 -3
- data/lib/avm/eac_rails_base1/runner.rb +12 -0
- data/lib/avm/eac_rails_base1/runner/bundle.rb +28 -0
- data/lib/avm/eac_rails_base1/runner/code_runner.rb +28 -0
- data/lib/avm/eac_rails_base1/runner_with/bundle.rb +57 -0
- data/lib/avm/eac_redmine_base0/instance.rb +2 -4
- data/lib/avm/{stereotypes/eac_ubuntu_base0.rb → eac_ubuntu_base0.rb} +1 -3
- data/lib/avm/eac_webapp_base0/deploy.rb +17 -40
- data/lib/avm/eac_webapp_base0/deploy/build.rb +48 -0
- data/lib/avm/eac_webapp_base0/deploy/git_info.rb +13 -0
- data/lib/avm/eac_webapp_base0/deploy/version.rb +4 -0
- data/lib/avm/eac_webapp_base0/deploy/write_on_target.rb +18 -0
- data/lib/avm/eac_webapp_base0/instance.rb +2 -2
- data/lib/avm/eac_webapp_base0/runner.rb +12 -0
- data/lib/avm/eac_webapp_base0/runner/apache_host.rb +2 -3
- data/lib/avm/eac_webapp_base0/runner/data.rb +1 -1
- data/lib/avm/eac_webapp_base0/runner/data/dump.rb +1 -1
- data/lib/avm/eac_webapp_base0/runner/data/load.rb +1 -1
- data/lib/avm/eac_webapp_base0/runner/deploy.rb +4 -16
- data/lib/avm/eac_wordpress_base0.rb +9 -0
- data/lib/avm/eac_wordpress_base0/apache_host.rb +25 -0
- data/lib/avm/eac_wordpress_base0/deploy.rb +10 -0
- data/lib/avm/eac_wordpress_base0/instance.rb +24 -0
- data/lib/avm/eac_writings_base0/apache_host.rb +17 -0
- data/lib/avm/eac_writings_base0/deploy.rb +36 -0
- data/lib/avm/eac_writings_base0/instance.rb +11 -0
- data/lib/avm/files/appendable.rb +55 -0
- data/lib/avm/files/appendable/file_content.rb +24 -0
- data/lib/avm/files/appendable/plain_directory.rb +25 -0
- data/lib/avm/files/appendable/resource_base.rb +13 -0
- data/lib/avm/files/appendable/tar_output_command.rb +26 -0
- data/lib/avm/files/appendable/templatized_directory.rb +28 -0
- data/lib/avm/files/appender.rb +11 -0
- data/lib/avm/files/deploy.rb +72 -0
- data/lib/avm/files/formatter.rb +8 -4
- data/lib/avm/git/auto_commit_path.rb +2 -4
- data/lib/avm/git/auto_commit_path/ruby.rb +20 -0
- data/lib/avm/git/commit/deploy.rb +8 -61
- data/lib/avm/instances/runner.rb +40 -0
- data/lib/avm/{stereotypes/postgresql.rb → postgresql.rb} +1 -3
- data/lib/avm/postgresql/instance.rb +63 -0
- data/lib/avm/postgresql/instance/data_unit.rb +39 -0
- data/lib/avm/postgresql/instance_with.rb +18 -0
- data/lib/avm/tools/runner.rb +3 -3
- data/lib/avm/tools/runner/eac_rails_base0.rb +5 -18
- data/lib/avm/tools/runner/eac_rails_base0/apache_path.rb +1 -1
- data/lib/avm/tools/runner/eac_rails_base0/rails_server.rb +7 -12
- data/lib/avm/tools/runner/eac_rails_base0/runner.rb +3 -3
- data/lib/avm/tools/runner/eac_redmine_base0.rb +5 -23
- data/lib/avm/tools/runner/eac_redmine_base0/core_update.rb +1 -1
- data/lib/avm/tools/runner/eac_redmine_base0/docker.rb +1 -1
- data/lib/avm/tools/runner/eac_redmine_base0/project_rename.rb +9 -18
- data/lib/avm/tools/runner/eac_wordpress_base0.rb +5 -24
- data/lib/avm/tools/runner/{eac_rails_base0/data.rb → eac_writings_base0.rb} +4 -4
- data/lib/avm/tools/runner/files/format.rb +3 -2
- data/lib/avm/tools/runner/git/auto_commit.rb +11 -0
- data/lib/avm/tools/runner/git/deploy.rb +1 -1
- data/lib/avm/tools/version.rb +1 -1
- data/template/avm/{stereotypes/eac_ubuntu_base0 → eac_ubuntu_base0}/docker_image/Dockerfile +0 -0
- data/template/avm/{stereotypes/eac_wordpress_base0 → eac_wordpress_base0}/deploy/wp-config.php.template +0 -0
- data/template/avm/eac_writings_base0/deploy/index.html.template +9 -0
- data/vendor/eac_cli/eac_cli.gemspec +1 -1
- data/vendor/eac_cli/lib/eac_cli/definition.rb +35 -3
- data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +17 -1
- data/vendor/eac_cli/lib/eac_cli/definition/help_formatter.rb +76 -0
- data/vendor/eac_cli/lib/eac_cli/definition/positional_argument.rb +21 -4
- data/vendor/eac_cli/lib/eac_cli/docopt/runner_extension.rb +1 -0
- data/vendor/eac_cli/lib/eac_cli/parser/collector.rb +4 -0
- data/vendor/eac_cli/lib/eac_cli/parser/options_collection.rb +27 -64
- data/vendor/eac_cli/lib/eac_cli/parser/parse_result.rb +17 -0
- data/vendor/eac_cli/lib/eac_cli/parser/positional_collection.rb +47 -19
- data/vendor/eac_cli/lib/eac_cli/patches/object/runner_with.rb +2 -1
- data/vendor/eac_cli/lib/eac_cli/runner.rb +4 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with/subcommands.rb +96 -0
- data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
- data/vendor/eac_cli/spec/lib/eac_cli/docopt/runner_extension_spec.rb +25 -0
- data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +48 -40
- data/vendor/eac_cli/spec/lib/eac_cli/runner_with/subcommands_spec.rb +57 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb +4 -39
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs/read_entry_options.rb +41 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator.rb +4 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb +9 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb +14 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/debug.rb +17 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerator/current_spec.rb +26 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerator/stopped_spec.rb +32 -0
- metadata +48 -33
- data/lib/avm/git/commit/deploy/appended.rb +0 -37
- data/lib/avm/git/commit/deploy/appended/base.rb +0 -17
- data/lib/avm/git/commit/deploy/appended/directory.rb +0 -32
- data/lib/avm/git/commit/deploy/appended/file_content.rb +0 -28
- data/lib/avm/rails/runners/bundle.rb +0 -35
- data/lib/avm/rails/runners/runner.rb +0 -48
- data/lib/avm/stereotypes/eac_wordpress_base0/apache_host.rb +0 -27
- data/lib/avm/stereotypes/eac_wordpress_base0/deploy.rb +0 -12
- data/lib/avm/stereotypes/eac_wordpress_base0/instance.rb +0 -26
- data/lib/avm/stereotypes/postgresql/instance.rb +0 -65
- data/lib/avm/stereotypes/postgresql/instance/data_unit.rb +0 -41
- data/lib/avm/stereotypes/postgresql/instance_with.rb +0 -20
- data/lib/avm/stereotypes/rails.rb +0 -11
- data/lib/avm/tools/runner/eac_rails_base0/apache_host.rb +0 -16
- data/lib/avm/tools/runner/eac_rails_base0/bundle.rb +0 -14
- data/lib/avm/tools/runner/eac_rails_base0/deploy.rb +0 -15
- data/lib/avm/tools/runner/eac_redmine_base0/bundle.rb +0 -14
- data/lib/avm/tools/runner/eac_redmine_base0/data.rb +0 -27
- data/lib/avm/tools/runner/eac_redmine_base0/data/dump.rb +0 -16
- data/lib/avm/tools/runner/eac_redmine_base0/deploy.rb +0 -15
- data/lib/avm/tools/runner/eac_redmine_base0/runner.rb +0 -14
- data/lib/avm/tools/runner/eac_wordpress_base0/apache_host.rb +0 -17
- data/lib/avm/tools/runner/eac_wordpress_base0/data.rb +0 -15
- data/lib/avm/tools/runner/eac_wordpress_base0/deploy.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd41b3c790de4a2264c78b5daa5afbd469de6ba2e74b616f096619d0a7bc5460
|
4
|
+
data.tar.gz: 0a1890b253e90debb2951fe90193fef541df4c4d0701dcf82712696377b1adbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ebb73966071bb959e16f10f37b784971f65b3f2cfede241fe4b02c127f24d057bbaedec098e900b8b69edf55e5951637f905a07d5a242d0b7bfd7b51907a3be
|
7
|
+
data.tar.gz: 510d2e7625a10c523269684a6e269212a5d8b027d671dc38e337be9c1015d9c69d4ba8f78049ee13090a9e6c733fabfd6b5d40541b6ddbd1e86cd8b4e524ba7c
|
@@ -1,13 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/
|
4
|
-
require 'avm/rails/instance'
|
3
|
+
require 'avm/eac_rails_base1/instance'
|
5
4
|
|
6
5
|
module Avm
|
7
6
|
module EacRailsBase0
|
8
|
-
class Instance < ::Avm::
|
9
|
-
include ::Avm::Rails::Instance
|
10
|
-
|
7
|
+
class Instance < ::Avm::EacRailsBase1::Instance
|
11
8
|
FILES_UNITS = { uploads: 'public/uploads' }.freeze
|
12
9
|
end
|
13
10
|
end
|
@@ -1,10 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/eac_webapp_base0/instance'
|
4
|
+
require 'eac_ruby_gems_utils/gem'
|
5
|
+
|
3
6
|
module Avm
|
4
|
-
module
|
5
|
-
|
7
|
+
module EacRailsBase1
|
8
|
+
class Instance < ::Avm::EacWebappBase0::Instance
|
9
|
+
DEFAULT_RAILS_ENVIRONMENT = 'production'
|
10
|
+
|
6
11
|
def bundle(*args)
|
7
|
-
the_gem.bundle(*args).chdir_root.envvar('RAILS_ENV',
|
12
|
+
the_gem.bundle(*args).chdir_root.envvar('RAILS_ENV', DEFAULT_RAILS_ENVIRONMENT)
|
8
13
|
end
|
9
14
|
|
10
15
|
def rake(*args)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_rails_base1/runner_with/bundle'
|
4
|
+
require 'eac_cli/core_ext'
|
5
|
+
require 'eac_ruby_utils/console/docopt_runner'
|
6
|
+
require 'shellwords'
|
7
|
+
|
8
|
+
module Avm
|
9
|
+
module EacRailsBase1
|
10
|
+
class Runner < ::Avm::EacWebappBase0::Runner
|
11
|
+
class Bundle
|
12
|
+
runner_with ::Avm::EacRailsBase1::RunnerWith::Bundle
|
13
|
+
runner_definition do
|
14
|
+
desc 'Runs "bundle ...".'
|
15
|
+
pos_arg :'bundle-args', repeat: true, optional: true
|
16
|
+
end
|
17
|
+
|
18
|
+
def run
|
19
|
+
bundle_run
|
20
|
+
end
|
21
|
+
|
22
|
+
def bundle_args
|
23
|
+
parsed.bundle_args.reject { |arg| arg == '--' }
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_rails_base1/runner_with/bundle'
|
4
|
+
require 'eac_cli/core_ext'
|
5
|
+
require 'eac_ruby_utils/console/docopt_runner'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module EacRailsBase1
|
9
|
+
class Runner < ::Avm::EacWebappBase0::Runner
|
10
|
+
class CodeRunner
|
11
|
+
runner_with ::Avm::EacRailsBase1::RunnerWith::Bundle
|
12
|
+
runner_definition do
|
13
|
+
desc 'Runs a Ruby code with "rails runner".'
|
14
|
+
pos_arg :code
|
15
|
+
end
|
16
|
+
|
17
|
+
def run
|
18
|
+
infov 'Environment', runner_context.call(:instance).host_env
|
19
|
+
bundle_run
|
20
|
+
end
|
21
|
+
|
22
|
+
def bundle_args
|
23
|
+
%w[exec rails runner] + [parsed.code]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_rails_base1/instance'
|
4
|
+
require 'eac_cli/runner'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module EacRailsBase1
|
8
|
+
module RunnerWith
|
9
|
+
module Bundle
|
10
|
+
DEFAULT_RAILS_ENVIRONMENT_CONSTANT = 'DEFAULT_RAILS_ENVIRONMENT'
|
11
|
+
|
12
|
+
common_concern do
|
13
|
+
include ::EacCli::Runner
|
14
|
+
|
15
|
+
runner_definition do
|
16
|
+
arg_opt '-e', '--environment', 'Specifies the environment for the runner to operate' \
|
17
|
+
' (test/development/production). Default: "development".'
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
module ClassMethods
|
22
|
+
def default_rails_environment
|
23
|
+
const_get(DEFAULT_RAILS_ENVIRONMENT_CONSTANT)
|
24
|
+
rescue ::NameError
|
25
|
+
::Avm::EacRailsBase1::Instance::DEFAULT_RAILS_ENVIRONMENT
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def bundle_command
|
30
|
+
rails_instance.bundle(*bundle_args).envvar('RAILS_ENV', rails_environment)
|
31
|
+
end
|
32
|
+
|
33
|
+
def bundle_run
|
34
|
+
infov 'Bundle arguments', ::Shellwords.join(bundle_args)
|
35
|
+
infov 'Rails environment', rails_environment
|
36
|
+
bundle_command.system!
|
37
|
+
end
|
38
|
+
|
39
|
+
def default_rails_environment
|
40
|
+
self.class.default_rails_environment
|
41
|
+
end
|
42
|
+
|
43
|
+
def rails_instance
|
44
|
+
if respond_to?(:runner_context)
|
45
|
+
runner_context.call(:instance)
|
46
|
+
else
|
47
|
+
context(:instance)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def rails_environment
|
52
|
+
parsed.environment.presence || default_rails_environment
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -3,13 +3,11 @@
|
|
3
3
|
require 'avm/eac_redmine_base0/data_unit'
|
4
4
|
require 'avm/eac_ubuntu_base0/docker_image'
|
5
5
|
require 'avm/eac_webapp_base0/instance'
|
6
|
-
require 'avm/
|
6
|
+
require 'avm/eac_rails_base1/instance'
|
7
7
|
|
8
8
|
module Avm
|
9
9
|
module EacRedmineBase0
|
10
|
-
class Instance < ::Avm::
|
11
|
-
include ::Avm::Rails::Instance
|
12
|
-
|
10
|
+
class Instance < ::Avm::EacRailsBase1::Instance
|
13
11
|
FILES_UNITS = { files: 'files' }.freeze
|
14
12
|
|
15
13
|
def docker_image_class
|
@@ -1,11 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'active_support/callbacks'
|
4
|
-
require 'delegate'
|
5
|
-
require 'eac_ruby_utils/core_ext'
|
6
|
-
require 'eac_launcher/git/base'
|
7
4
|
require 'avm/git'
|
8
5
|
require 'avm/patches/object/template'
|
6
|
+
require 'eac_ruby_utils/core_ext'
|
7
|
+
require 'eac_launcher/git/base'
|
9
8
|
require 'net/http'
|
10
9
|
|
11
10
|
module Avm
|
@@ -18,34 +17,20 @@ module Avm
|
|
18
17
|
|
19
18
|
enable_console_speaker
|
20
19
|
enable_simple_cache
|
20
|
+
common_constructor :instance, :options, default: [{}]
|
21
21
|
|
22
|
-
JOBS = %w[
|
22
|
+
JOBS = %w[create_build_dir build_content append_instance_content write_on_target
|
23
|
+
setup_files_units assert_instance_branch request_test].freeze
|
23
24
|
define_callbacks(*JOBS)
|
24
25
|
|
25
|
-
attr_reader :instance, :options
|
26
|
-
|
27
|
-
def initialize(instance, options = {})
|
28
|
-
@instance = instance
|
29
|
-
@options = options
|
30
|
-
end
|
31
|
-
|
32
|
-
def build_git_commit
|
33
|
-
::Avm::Git::Commit.new(git, commit_sha1).deploy_to_env_path(
|
34
|
-
instance.host_env,
|
35
|
-
instance.read_entry(::Avm::Instances::EntryKeys::FS_PATH)
|
36
|
-
).variables_source_set(instance)
|
37
|
-
end
|
38
|
-
|
39
26
|
def run
|
40
27
|
start_banner
|
41
|
-
|
42
|
-
run_callbacks job do
|
43
|
-
send(job)
|
44
|
-
end
|
45
|
-
end
|
28
|
+
run_jobs
|
46
29
|
::Avm::Result.success('Deployed')
|
47
30
|
rescue ::Avm::Result::Error => e
|
48
31
|
e.to_result
|
32
|
+
ensure
|
33
|
+
remove_build_dir
|
49
34
|
end
|
50
35
|
|
51
36
|
def start_banner
|
@@ -57,15 +42,6 @@ module Avm
|
|
57
42
|
infov 'Appended directories', appended_directories
|
58
43
|
end
|
59
44
|
|
60
|
-
def git_deploy
|
61
|
-
infom 'Deploying source code and appended content...'
|
62
|
-
build_git_commit
|
63
|
-
.append_directory(template.path)
|
64
|
-
.append_directories(appended_directories)
|
65
|
-
.append_file_content(VERSION_TARGET_PATH, version)
|
66
|
-
.run
|
67
|
-
end
|
68
|
-
|
69
45
|
def setup_files_units
|
70
46
|
instance.class.const_get('FILES_UNITS').each do |data_key, fs_path_subpath|
|
71
47
|
FileUnit.new(self, data_key, fs_path_subpath).run
|
@@ -85,17 +61,18 @@ module Avm
|
|
85
61
|
fatal_error "Request to #{uri} failed" unless response.code.to_i == 200
|
86
62
|
end
|
87
63
|
|
88
|
-
def
|
89
|
-
|
64
|
+
def variables_source
|
65
|
+
instance
|
90
66
|
end
|
91
67
|
|
92
|
-
|
93
|
-
infom "Fetching remote \"#{git_remote_name}\" from \"#{git_repository_path}\"..."
|
94
|
-
git.fetch(git_remote_name)
|
95
|
-
end
|
68
|
+
private
|
96
69
|
|
97
|
-
def
|
98
|
-
|
70
|
+
def run_jobs
|
71
|
+
JOBS.each do |job|
|
72
|
+
run_callbacks job do
|
73
|
+
send(job)
|
74
|
+
end
|
75
|
+
end
|
99
76
|
end
|
100
77
|
end
|
101
78
|
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/files/appender'
|
4
|
+
require 'avm/files/deploy'
|
5
|
+
require 'eac_ruby_utils/envs'
|
6
|
+
require 'eac_ruby_utils/fs/temp'
|
7
|
+
|
8
|
+
module Avm
|
9
|
+
module EacWebappBase0
|
10
|
+
class Deploy
|
11
|
+
module Build
|
12
|
+
private
|
13
|
+
|
14
|
+
attr_accessor :build_dir
|
15
|
+
|
16
|
+
def append_instance_content
|
17
|
+
::Avm::Files::Appender
|
18
|
+
.new
|
19
|
+
.variables_source_set(variables_source)
|
20
|
+
.append_templatized_directory(template.path)
|
21
|
+
.append_templatized_directories(appended_directories)
|
22
|
+
.append_file_content(version_target_path, version)
|
23
|
+
.write_appended_on(build_dir)
|
24
|
+
end
|
25
|
+
|
26
|
+
def build_dir_env
|
27
|
+
::EacRubyUtils::Envs.local
|
28
|
+
end
|
29
|
+
|
30
|
+
def create_build_dir
|
31
|
+
self.build_dir = ::EacRubyUtils::Fs::Temp.directory
|
32
|
+
end
|
33
|
+
|
34
|
+
def remove_build_dir
|
35
|
+
build_dir&.remove
|
36
|
+
end
|
37
|
+
|
38
|
+
def build_content
|
39
|
+
infom 'Writing Git source code...'
|
40
|
+
::Avm::Git::Commit.new(git, commit_sha1).deploy_to_env_path(
|
41
|
+
build_dir_env,
|
42
|
+
build_dir
|
43
|
+
).variables_source_set(variables_source).run
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -12,6 +12,11 @@ module Avm
|
|
12
12
|
raise ::Avm::Result::Error, "No commit SHA1 found for \"#{git_reference_found}\""
|
13
13
|
end
|
14
14
|
|
15
|
+
def git_fetch_uncached
|
16
|
+
infom "Fetching remote \"#{git_remote_name}\" from \"#{git_repository_path}\"..."
|
17
|
+
git.fetch(git_remote_name)
|
18
|
+
end
|
19
|
+
|
15
20
|
def git_reference
|
16
21
|
options[:reference] || DEFAULT_REFERENCE
|
17
22
|
end
|
@@ -32,6 +37,14 @@ module Avm
|
|
32
37
|
::Avm::Git::DEFAULT_REMOTE_NAME
|
33
38
|
end
|
34
39
|
|
40
|
+
def git_repository_path
|
41
|
+
instance.source_instance.read_entry(::Avm::Instances::EntryKeys::FS_PATH)
|
42
|
+
end
|
43
|
+
|
44
|
+
def git_uncached
|
45
|
+
::EacLauncher::Git::Base.new(git_repository_path)
|
46
|
+
end
|
47
|
+
|
35
48
|
def instance_branch
|
36
49
|
remote_branch(instance.id)
|
37
50
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module EacWebappBase0
|
7
|
+
class Deploy
|
8
|
+
module WriteOnTarget
|
9
|
+
def write_on_target
|
10
|
+
::Avm::Files::Deploy.new(
|
11
|
+
instance.host_env,
|
12
|
+
instance.read_entry(::Avm::Instances::EntryKeys::FS_PATH)
|
13
|
+
).append_plain_directory(build_dir).run
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/instances/base'
|
4
|
-
require 'avm/
|
4
|
+
require 'avm/postgresql/instance_with'
|
5
5
|
require 'avm/data/instance/files_unit'
|
6
6
|
require 'avm/data/instance/package'
|
7
7
|
require 'avm/eac_webapp_base0/deploy/file_unit'
|
@@ -9,7 +9,7 @@ require 'avm/eac_webapp_base0/deploy/file_unit'
|
|
9
9
|
module Avm
|
10
10
|
module EacWebappBase0
|
11
11
|
class Instance < ::Avm::Instances::Base
|
12
|
-
include ::Avm::
|
12
|
+
include ::Avm::Postgresql::InstanceWith
|
13
13
|
|
14
14
|
def stereotype_name
|
15
15
|
self.class.name.desconstantize.demodulize
|