kuber_kit 0.9.0 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6eb3dda64697fc3174d3ae031a7eba5be1f57e80d0c8c43829ff3b36edca38b2
4
- data.tar.gz: 85a77edc9bdc91c09c6ba6f3e677df032168c66a69a563ddd9087734fa9636bc
3
+ metadata.gz: e67c6edb93aac9bbbcfe41d4d12df62b77f657fdc5b8d6144c24fe50c49da8c6
4
+ data.tar.gz: 4f17809d73a86012bf45b072f054a171cfdf35268140019e6aa64ff87de871d1
5
5
  SHA512:
6
- metadata.gz: 1696812c543f40ec81cb7c4c7804f4f02e739cf7ccff6820f37b884f7965a0822ceb1b2dbc42e7ca9d696f7d539d5b0e44ff6142991178bd9316bdd98276ca09
7
- data.tar.gz: 8887273eba2ca2b3f714249d4da29dfb826477e08da4f09d06ab9974c5a32e8b698bbeb2f9b0bb7a6cbd75884aba3bedca6adc71ee7d7e53a1a8d3637b798d7f
6
+ metadata.gz: dbd934839a2584a8cd3b428a5c44de9b3356b9bfc6e211d16095cc10e78785cf8ad90bff2898855a7b66722e9f471a35234a11c4422cfc378a0812463e2b66a1
7
+ data.tar.gz: febd3b1e27c4a14da1bf6e1d8a15a5c238d0fb182f9ea4b31368f0474abdfb27ac64c311385ad6aefb26bf4407255a0b4138d17ca9b9fcd8041d4a9a63e1a68a
data/CHANGELOG.md CHANGED
@@ -1,7 +1,7 @@
1
- **0.9.0**
1
+ **0.9.0-0.9.3**
2
2
  - Allow skipping confirmation during deployment
3
3
  - Added `kit sh` command to create a new shell
4
- - Do not expand directory path in config
4
+ - Use tmp dir as image builds parent dir for remote compilation
5
5
 
6
6
  **0.8.4-0.8.8**
7
7
  - Added initial services support, to deploy before all other servies
@@ -2,7 +2,7 @@
2
2
 
3
3
  class KuberKit::Configs
4
4
  AVAILABLE_CONFIGS = [
5
- :image_dockerfile_name, :image_build_context_dir, :image_tag, :docker_ignore_list, :image_compile_dir,
5
+ :image_dockerfile_name, :image_build_context_dir, :image_tag, :docker_ignore_list, :image_compile_dir, :remote_image_compile_dir,
6
6
  :kuber_kit_dirname, :kuber_kit_min_version, :images_dirname, :services_dirname, :infra_dirname, :configurations_dirname,
7
7
  :artifact_clone_dir, :service_config_dir, :deployer_strategy, :compile_simultaneous_limit, :deploy_simultaneous_limit,
8
8
  :additional_images_paths, :deprecation_warnings_disabled, :log_file_path, :env_file_compile_dir, :shell_launcher_strategy
@@ -35,11 +35,13 @@ class KuberKit::Configs
35
35
 
36
36
  def add_default_configs
37
37
  home_kuber_kit_path = File.join("~", ".kuber_kit")
38
+ absolute_kuber_kit_path = File.expand_path(home_kuber_kit_path)
38
39
 
39
40
  set :image_dockerfile_name, "Dockerfile"
40
41
  set :image_build_context_dir, "build_context"
41
42
  set :image_tag, 'latest'
42
- set :image_compile_dir, File.join(home_kuber_kit_path, "image_builds")
43
+ set :image_compile_dir, File.join(absolute_kuber_kit_path, "image_builds")
44
+ set :remote_image_compile_dir, File.join("tmp", "kuber_kit", "image_builds")
43
45
  set :docker_ignore_list, DOCKER_IGNORE_LIST
44
46
  set :kuber_kit_dirname, "kuber_kit"
45
47
  set :kuber_kit_min_version, KuberKit::VERSION
@@ -47,16 +49,16 @@ class KuberKit::Configs
47
49
  set :services_dirname, "services"
48
50
  set :infra_dirname, "infrastructure"
49
51
  set :configurations_dirname, "configurations"
50
- set :artifact_clone_dir, File.join(home_kuber_kit_path, "artifacts")
51
- set :service_config_dir, File.join(home_kuber_kit_path, "services")
52
+ set :artifact_clone_dir, File.join(absolute_kuber_kit_path, "artifacts")
53
+ set :service_config_dir, File.join(absolute_kuber_kit_path, "services")
52
54
  set :deployer_strategy, :kubernetes
53
55
  set :shell_launcher_strategy, :kubernetes
54
56
  set :compile_simultaneous_limit, 5
55
57
  set :deploy_simultaneous_limit, 5
56
58
  set :additional_images_paths, []
57
59
  set :deprecation_warnings_disabled, false
58
- set :log_file_path, File.join(home_kuber_kit_path, "deploy.log")
59
- set :env_file_compile_dir, File.join(home_kuber_kit_path, "env_files")
60
+ set :log_file_path, File.join(absolute_kuber_kit_path, "deploy.log")
61
+ set :env_file_compile_dir, File.join(absolute_kuber_kit_path, "env_files")
60
62
  end
61
63
 
62
64
  def items
@@ -8,17 +8,27 @@ class KuberKit::ImageCompiler::ActionHandler
8
8
 
9
9
  Contract KuberKit::Shell::AbstractShell, Symbol, String => Any
10
10
  def call(shell, image_name, build_id)
11
+ parent_dir = get_image_compile_parent_dir_for_shell(shell)
12
+
11
13
  image = image_store.get_image(image_name)
12
14
 
13
- build_dir_cleaner.call(parent_dir: configs.image_compile_dir)
15
+ build_dir_cleaner.call(parent_dir: parent_dir)
14
16
 
15
- compile_dir = generate_compile_dir(build_id: build_id)
17
+ compile_dir = generate_compile_dir(parent_dir: parent_dir, build_id: build_id)
16
18
 
17
19
  compiler.compile(shell, image, compile_dir)
18
20
  end
19
21
 
20
22
  private
21
- def generate_compile_dir(build_id:)
22
- File.join(configs.image_compile_dir, build_id)
23
+ def generate_compile_dir(parent_dir:, build_id:)
24
+ File.join(parent_dir, build_id)
25
+ end
26
+
27
+ def get_image_compile_parent_dir_for_shell(shell)
28
+ if shell.is_a?(KuberKit::Shell::SshShell)
29
+ configs.remote_image_compile_dir
30
+ else
31
+ configs.image_compile_dir
32
+ end
23
33
  end
24
34
  end
@@ -1,3 +1,3 @@
1
1
  module KuberKit
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kuber_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iskander Khaziev
@@ -364,9 +364,6 @@ files:
364
364
  - lib/kuber_kit/ui/interactive.rb
365
365
  - lib/kuber_kit/ui/simple.rb
366
366
  - lib/kuber_kit/version.rb
367
- - "~/.kuber_kit/deploy.log"
368
- - "~/.kuber_kit/env_files/env_files-test_env"
369
- - "~/.kuber_kit/services/auth_app.yml"
370
367
  homepage: https://github.com/ArtStation/kuber_kit
371
368
  licenses:
372
369
  - MIT