minfra-cli 1.8.0 → 1.9.0

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: 852b56a96bf9ed6edf769a5ab0f3543a41d0759d81c1bf99b4ecd488ed0467a4
4
- data.tar.gz: badd1560a02911fa7a1b15de36eb6ae59abb584f29824247948899ae33ec11a2
3
+ metadata.gz: f850f6ee46b5749af756bfb223e38836a3bc538dc8bcbe4b1f2fb3bc2c3a131a
4
+ data.tar.gz: e5b4b5b317c1ead81fedae5d78021003c31a55858fe36e040fad59c61d8e8c23
5
5
  SHA512:
6
- metadata.gz: d57dfbd9ac19d4a982ab32f418100ab9f8cdde0419ba20a59a34f0d519a1d9b7ca6f6dfcbb5a4203d659fc3e3ced737454f115668aac796dc44041a9f4062dc3
7
- data.tar.gz: 2190a697f7044c2ee18ee722b2ab1a6497d5f90506d084145644e927404328203e8dd80481419a308e597ecc65d041e844d969aff41403baf4a1836b4d187f56
6
+ metadata.gz: 26036eb5236bedf5a6cf6f3a39b8ceb272d8242938bf1730c20b0385facb0c1c9c1c8c92335c670562b5bd3dc946eae7e5891963b38643e0144f2b5ed5b8d3d3
7
+ data.tar.gz: 47cba9834d267496e5411d9d326a3a5d8899cb8a06119bbcafa790fdef48fd22ee620eea43725b706627efc59bdfb0db03fa93a0950de5f913476a81a46054eb
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 1.9.0
2
+ * helm template now called with --debug
3
+ * added "file" to service
4
+ * ready for ruby 3.2
5
+ * fixing project build "loading int " typo
6
+ * changing init sequence (first load minfrarc)
7
+ * STDERR of external commands is now written as INFO
8
+
1
9
  # 1.8.0
2
10
  * more output which "require" failed when loading dependencies
3
11
  * catching closed stream errors in Minfra::Cli::Runner
@@ -40,7 +40,7 @@ module Minfra
40
40
  ARGV.delete('project') # ARGV is passed along to `rspec` call
41
41
  ARGV.delete('test')
42
42
 
43
- if File.exists?('./bin/run_tests')
43
+ if File.exist?('./bin/run_tests')
44
44
  # config = Config.load('staging')
45
45
  project = ProjectInfo.load(Pathname.pwd)
46
46
  # Minfra::Cli::Document.document(config, "Using project specific ./bin/run_tests in #{project.name}")
@@ -68,7 +68,7 @@ module Minfra
68
68
  exit(1) if res.error?
69
69
 
70
70
  unless options[:noload]
71
- debug("loading int KIND")
71
+ debug("loading image into KIND's registry")
72
72
  Runner.run(%{kind load docker-image #{p.repo_name}:latest --name #{minfra_config.name}})
73
73
  end
74
74
  end
@@ -24,7 +24,7 @@ module Minfra
24
24
  debug line
25
25
  else
26
26
  @stderr_lines << line
27
- error line
27
+ info line
28
28
  end
29
29
  end
30
30
 
@@ -1,5 +1,5 @@
1
1
  module Minfra
2
2
  module Cli
3
- VERSION = '1.8.0'.freeze
3
+ VERSION = '1.9.0'.freeze
4
4
  end
5
5
  end
data/lib/minfra/cli.rb CHANGED
@@ -47,6 +47,12 @@ module Minfra
47
47
 
48
48
  @logger=Logger.new(STDERR)
49
49
  logger.level=ENV["MINFRA_LOGGING_LEVEL"] || @config.project.minfra.logging_level || 'warn'
50
+
51
+ project_minfrarc_path = @config.base_path.join("config",'minfrarc.rb')
52
+ require project_minfrarc_path if project_minfrarc_path.exist?
53
+ me_minfrarc_path = @config.me_path.join('minfrarc.rb')
54
+ require @me_minfrarc_path if me_minfrarc_path.exist?
55
+
50
56
  @logger.debug("Minfra: loglevel: #{@logger.level}, env: #{@config.orch_env}")
51
57
 
52
58
  hiera_init
@@ -58,10 +64,7 @@ module Minfra
58
64
  require_relative 'cli/main_command'
59
65
  Minfra::Cli.resolve
60
66
 
61
- project_minfrarc_path = @config.base_path.join("config",'minfrarc.rb')
62
- require project_minfrarc_path if project_minfrarc_path.exist?
63
- me_minfrarc_path = @config.me_path.join('minfrarc.rb')
64
- require @me_minfrarc_path if me_minfrarc_path.exist?
67
+
65
68
 
66
69
  end
67
70
 
@@ -331,6 +331,7 @@ module Orchparty
331
331
 
332
332
  def initialize(name, type)
333
333
  super AST.service(name: name, _type: type)
334
+ @node.files = {}
334
335
  end
335
336
 
336
337
  # 1. rememebring the secrets in environment_secrets (so these environments can be created differentyly
@@ -340,6 +341,18 @@ module Orchparty
340
341
  @node.environment_secrets = result
341
342
  self
342
343
  end
344
+
345
+ def file(name, volume, &block)
346
+ result = FileBuilder.build(name, volume, block)
347
+ @node.files[name]=result
348
+ self
349
+ end
350
+ end
351
+
352
+ class FileBuilder < CommonBuilder
353
+ def initialize(name, volume)
354
+ super AST.service(filename: name, volume: volume)
355
+ end
343
356
  end
344
357
 
345
358
  class ServiceMixinBuilder < CommonBuilder
@@ -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} --kube-context #{cluster_name} #{chart.name} #{chart_path}"
166
+ cmd="helm template --namespace #{namespace} --debug --kube-context #{cluster_name} #{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.8.0
4
+ version: 1.9.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-02-23 00:00:00.000000000 Z
11
+ date: 2023-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -237,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
237
  - !ruby/object:Gem::Version
238
238
  version: '0'
239
239
  requirements: []
240
- rubygems_version: 3.1.6
240
+ rubygems_version: 3.4.6
241
241
  signing_key:
242
242
  specification_version: 4
243
243
  summary: A cli framework for k8s based development and deployment.