Class: Pipedawg::Job::Skopeo::Copy
- Inherits:
-
Pipedawg::Job::Skopeo
- Object
- Pipedawg::Job
- Pipedawg::Job::Skopeo
- Pipedawg::Job::Skopeo::Copy
- Defined in:
- lib/pipedawg/job/skopeo/copy.rb
Overview
Pipedawg::Job::Skopeo::Copy class
Instance Attribute Summary
Attributes inherited from Pipedawg::Job
Instance Method Summary collapse
-
#initialize(name, opts = {}) ⇒ Copy
constructor
A new instance of Copy.
-
#update ⇒ Object
rubocop:disable Metrics/AbcSize.
Methods inherited from Pipedawg::Job
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/skopeo/copy.rb', line 8 def initialize(name, opts = {}) opts = { config: {}, copy_image: name, destinations: [{ copy_image: nil, flags: [], options: {} }], flags: [], logins: {}, options: {}, stage: '${CI_PROJECT_DIR}/stage', trusted_ca_cert_source_files: [], trusted_ca_cert_target_file: '/etc/docker/certs.d/ca.crt' }.merge(opts) super name, opts update end |
Instance Method Details
#update ⇒ Object
rubocop:disable Metrics/AbcSize
18 19 20 21 22 23 |
# File 'lib/pipedawg/job/skopeo/copy.rb', line 18 def update # rubocop:disable Metrics/AbcSize require 'json' opts[:script] = debug + config + cert_copies + login + mkstage + pull + ( opts[:destinations].map { |d| push(d) } ).flatten(1) end |