Class: Pipedawg::Job::Helm::Copy

Inherits:
Pipedawg::Job::Helm show all
Defined in:
lib/pipedawg/job/helm/copy.rb

Overview

Pipedawg::Job::Helm::Copy class

Instance Attribute Summary

Attributes inherited from Pipedawg::Job

#name, #opts

Instance Method Summary collapse

Methods inherited from Pipedawg::Job

#to_hash

Constructor Details

#initialize(name, opts = {}) ⇒ Copy

Returns a new instance of Copy.



8
9
10
11
12
13
14
15
16
# File 'lib/pipedawg/job/helm/copy.rb', line 8

def initialize(name, opts = {})
  opts = {
    chart: name,
    destinations: [{ user: nil, password: nil, url: nil }],
    password: nil, url: nil, user: nil, version: nil
  }.merge(opts)
  super name, opts
  update
end

Instance Method Details

#updateObject



18
19
20
# File 'lib/pipedawg/job/helm/copy.rb', line 18

def update
  opts[:script] = debug + pull + (opts[:destinations].map { |d| push(d) }).flatten(1)
end