kuber_kit 0.9.0 → 0.9.1

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
2
  SHA256:
3
- metadata.gz: 6eb3dda64697fc3174d3ae031a7eba5be1f57e80d0c8c43829ff3b36edca38b2
4
- data.tar.gz: 85a77edc9bdc91c09c6ba6f3e677df032168c66a69a563ddd9087734fa9636bc
3
+ metadata.gz: 74747b7166c91e6a78919e9888e8a643a0b199d4e3457015d902e7d12be0df1f
4
+ data.tar.gz: e292c750666b58996116cd1eb01a43f9472120346235eeec2cd3d7434770b381
5
5
  SHA512:
6
- metadata.gz: 1696812c543f40ec81cb7c4c7804f4f02e739cf7ccff6820f37b884f7965a0822ceb1b2dbc42e7ca9d696f7d539d5b0e44ff6142991178bd9316bdd98276ca09
7
- data.tar.gz: 8887273eba2ca2b3f714249d4da29dfb826477e08da4f09d06ab9974c5a32e8b698bbeb2f9b0bb7a6cbd75884aba3bedca6adc71ee7d7e53a1a8d3637b798d7f
6
+ metadata.gz: c06ee817240523fa6faec061d223337ed08d683a0ba15c671f4d65f1cdb1e3e8ce088ffb130f48d2c37a030f9200fde54b69ea6f6a542621266cb59ad6b7aa80
7
+ data.tar.gz: 989df85f77d4c8676def49566c8277172b8498f19798ce273704e3cd818176bd8fce4efe5bf208db88441d2d1ab38257c7d45ad6cc5895a95b9de10056eb9ff8
data/CHANGELOG.md CHANGED
@@ -1,7 +1,7 @@
1
- **0.9.0**
1
+ **0.9.0-0.9.1**
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
+ - Do not expand image compile directory path in default config
5
5
 
6
6
  **0.8.4-0.8.8**
7
7
  - Added initial services support, to deploy before all other servies
@@ -35,10 +35,12 @@ 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'
43
+ # do not use absolute path for compile dir, compilation could be done on remote server
42
44
  set :image_compile_dir, File.join(home_kuber_kit_path, "image_builds")
43
45
  set :docker_ignore_list, DOCKER_IGNORE_LIST
44
46
  set :kuber_kit_dirname, "kuber_kit"
@@ -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
@@ -29,4 +29,8 @@ class KuberKit::Shell::AbstractShell
29
29
  def sync(local_path, remote_path, exclude: nil)
30
30
  raise KuberKit::NotImplementedError, "must be implemented"
31
31
  end
32
+
33
+ def expand_path(relative_path)
34
+ raise KuberKit::NotImplementedError, "must be implemented"
35
+ end
32
36
  end
@@ -1,25 +1,35 @@
1
1
  class KuberKit::Shell::Commands::BashCommands
2
2
  def rm(shell, path)
3
- shell.exec!(%Q{rm "#{path}"})
3
+ absolute_path = shell.expand_path(path)
4
+ shell.exec!(%Q{rm "#{absolute_path}"})
4
5
  end
5
6
 
6
7
  def rm_rf(shell, path)
7
- shell.exec!(%Q{rm -rf "#{path}"})
8
+ absolute_path = shell.expand_path(path)
9
+ shell.exec!(%Q{rm -rf "#{absolute_path}"})
8
10
  end
9
11
 
10
12
  def cp(shell, source_path, dest_path)
11
- shell.exec!(%Q{cp "#{source_path}" "#{dest_path}"})
13
+ abs_source_path = shell.expand_path(source_path)
14
+ abs_dest_path = shell.expand_path(dest_path)
15
+
16
+ shell.exec!(%Q{cp "#{abs_source_path}" "#{abs_dest_path}"})
12
17
  end
13
18
 
14
19
  def cp_r(shell, source_path, dest_path)
15
- shell.exec!(%Q{cp -r "#{source_path}" "#{dest_path}"})
20
+ abs_source_path = shell.expand_path(source_path)
21
+ abs_dest_path = shell.expand_path(dest_path)
22
+
23
+ shell.exec!(%Q{cp -r "#{abs_source_path}" "#{abs_dest_path}"})
16
24
  end
17
25
 
18
26
  def mkdir(shell, path)
19
- shell.exec!(%Q{mkdir "#{path}"})
27
+ absolute_path = shell.expand_path(path)
28
+ shell.exec!(%Q{mkdir "#{absolute_path}"})
20
29
  end
21
30
 
22
31
  def mkdir_p(shell, path)
23
- shell.exec!(%Q{mkdir -p "#{path}"})
32
+ absolute_path = shell.expand_path(path)
33
+ shell.exec!(%Q{mkdir -p "#{absolute_path}"})
24
34
  end
25
35
  end
@@ -127,6 +127,10 @@ class KuberKit::Shell::LocalShell < KuberKit::Shell::AbstractShell
127
127
  "KIT=#{Process.pid} #{command}"
128
128
  end
129
129
 
130
+ def expand_path(relative_path)
131
+ File.expand_path(relative_path)
132
+ end
133
+
130
134
  private
131
135
  def system_exec(command)
132
136
  exec(command)
@@ -71,6 +71,10 @@ class KuberKit::Shell::SshShell < KuberKit::Shell::LocalShell
71
71
  true
72
72
  end
73
73
 
74
+ def expand_path(relative_path)
75
+ exec!("readlink -f #{relative_path}")
76
+ end
77
+
74
78
  private
75
79
  def ssh_session
76
80
  unless connected?
@@ -1,3 +1,3 @@
1
1
  module KuberKit
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
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.1
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