Class: HelmWrapper::Tasks::Validate

Inherits:
Rake::TaskLib
  • Object
show all
Includes:
Shared::Logging
Defined in:
lib/helm-wrapper/tasks/validate.rb

Instance Method Summary collapse

Methods included from Shared::Logging

configure_logger_for, logger_for

Constructor Details

#initialize(binary:, chart:) {|_self| ... } ⇒ Validate

Returns a new instance of Validate.

Yields:

  • (_self)

Yield Parameters:



24
25
26
27
28
29
30
31
# File 'lib/helm-wrapper/tasks/validate.rb', line 24

def initialize(binary:, chart:)
  @binary = binary
  @chart  = chart

  yield self if block_given?

  validate_task
end

Instance Method Details

#validate_taskObject



35
36
37
38
39
40
41
42
43
44
# File 'lib/helm-wrapper/tasks/validate.rb', line 35

def validate_task
  desc "Validates a Helm chart stored locally."
  task :validate => :binary do |t, args|
    runner = HelmWrapper::Shared::Runner.new(binary: @binary, chart: @chart)

    logger.info("Running Helm validate for path: #{@chart.path}...")

    runner.lint
  end
end