minfra-cli 1.10.0 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/minfra/cli/templater.rb +20 -0
- data/lib/minfra/cli/version.rb +1 -1
- data/lib/orchparty/kubernetes_application.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba7dd8c8775a7ecedd048d2a6e6288727f86791bb0e3c9a97df882d29d10ddd1
|
4
|
+
data.tar.gz: 5a416953d916aff78611c5dcca45300434a54abb172aad5a5ad4118b9cb3206e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a0ab85e07b00c652cf41b94cff07cc327801d55f19eefe97a0d7301a2e0a8262196df760785fc6ef7ccd3d56e44deed3441260a868d4916266cb143b8c9d68e
|
7
|
+
data.tar.gz: 36a5f383251c4e6ae0f583f99e08606f07c1c6df198c721718d5dea1b2b9f1fab4629c7b99ee5950dd18a823148226b10bea2e558bfb5ce02c08ce800be3f7a5
|
data/CHANGELOG.md
CHANGED
data/lib/minfra/cli/templater.rb
CHANGED
@@ -21,6 +21,26 @@ module Minfra
|
|
21
21
|
new(template).render(params)
|
22
22
|
end
|
23
23
|
|
24
|
+
def self.template_dir(src, dst, extensions)
|
25
|
+
destination = Pathname.new(dst)
|
26
|
+
destination.mkpath
|
27
|
+
source = Pathname.new(src)
|
28
|
+
|
29
|
+
source.glob('**/*') do |filename|
|
30
|
+
rel_path = filename.relative_path_from(source)
|
31
|
+
|
32
|
+
if File.directory?(filename) # check if it s file and extension is not .tf
|
33
|
+
FileUtils.mkdir_p("#{destination}/#{rel_path}")
|
34
|
+
elsif extensions.include?(File.extname(filename)) # a file
|
35
|
+
content = File.read(filename)
|
36
|
+
modified_content = Minfra::Cli::Templater.render(content, {})
|
37
|
+
File.write("#{destination}/#{rel_path}", modified_content)
|
38
|
+
else
|
39
|
+
FileUtils.cp(filename, destination.join(rel_path))
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
24
44
|
def initialize(template)
|
25
45
|
@erb = ERB.new(template)
|
26
46
|
@check_mode=false
|
data/lib/minfra/cli/version.rb
CHANGED
@@ -163,7 +163,7 @@ module Orchparty
|
|
163
163
|
def print_install(chart)
|
164
164
|
|
165
165
|
build_chart(chart) do |chart_path|
|
166
|
-
cmd="helm template --namespace #{namespace} --debug --kube-context #{cluster_name} #{chart.name} #{chart_path}"
|
166
|
+
cmd="helm template --namespace #{namespace} --debug --kube-context #{cluster_name} --output-dir #{chart_path.join('..','helm_expanded')} #{chart.name} #{chart_path}"
|
167
167
|
@out_io.puts `$cmd`
|
168
168
|
if system("#{cmd} > /dev/null")
|
169
169
|
info("helm template check: OK")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minfra-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Schrammel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|