Class: Helmsnap::Env

Inherits:
Object
  • Object
show all
Defined in:
lib/helmsnap/env.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Env

Returns a new instance of Env.



6
7
8
# File 'lib/helmsnap/env.rb', line 6

def initialize(name)
  self.name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/helmsnap/env.rb', line 4

def name
  @name
end

Instance Method Details

#release_pathsObject



10
11
12
13
14
15
# File 'lib/helmsnap/env.rb', line 10

def release_paths
  @release_paths ||= begin
    json = Helmsnap.run_cmd("helmfile", "--environment", name, "list", "--output", "json").output
    YAML.load(json).map { |x| Pathname.new(x.fetch("chart")) }
  end
end