Class: KubeDeployTools::Push::Optparser::PushOptions
- Defined in:
- lib/kube_deploy_tools/push/options.rb
Instance Attribute Summary collapse
-
#images ⇒ Object
Returns the value of attribute images.
-
#local_prefix ⇒ Object
Returns the value of attribute local_prefix.
-
#manifest_file ⇒ Object
Returns the value of attribute manifest_file.
-
#registries ⇒ Object
Returns the value of attribute registries.
-
#tag ⇒ Object
Returns the value of attribute tag.
Instance Method Summary collapse
- #define_options(parser) ⇒ Object
-
#initialize ⇒ PushOptions
constructor
A new instance of PushOptions.
Constructor Details
#initialize ⇒ PushOptions
Returns a new instance of PushOptions.
11 12 13 14 15 |
# File 'lib/kube_deploy_tools/push/options.rb', line 11 def initialize self.local_prefix = 'local-registry' self.registries = Set.new self.tag = KubeDeployTools::tag_from_local_env end |
Instance Attribute Details
#images ⇒ Object
Returns the value of attribute images.
9 10 11 |
# File 'lib/kube_deploy_tools/push/options.rb', line 9 def images @images end |
#local_prefix ⇒ Object
Returns the value of attribute local_prefix.
9 10 11 |
# File 'lib/kube_deploy_tools/push/options.rb', line 9 def local_prefix @local_prefix end |
#manifest_file ⇒ Object
Returns the value of attribute manifest_file.
9 10 11 |
# File 'lib/kube_deploy_tools/push/options.rb', line 9 def manifest_file @manifest_file end |
#registries ⇒ Object
Returns the value of attribute registries.
9 10 11 |
# File 'lib/kube_deploy_tools/push/options.rb', line 9 def registries @registries end |
#tag ⇒ Object
Returns the value of attribute tag.
9 10 11 |
# File 'lib/kube_deploy_tools/push/options.rb', line 9 def tag @tag end |
Instance Method Details
#define_options(parser) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/kube_deploy_tools/push/options.rb', line 17 def (parser) parser.on('-lPREFIX', '--local-prefix PREFIX', 'The local Docker prefix to strip to get to the base image name') do |f| self.local_prefix = f end parser.on('-tTAG', '--tag TAG', 'Tag Docker images with TAG') do |t| self.tag = t end parser.on('-mMANIFEST', '--manifest MANIFEST', 'The configuration MANIFEST to render deploys with.') do |f| self.manifest_file = f end parser.on('-rPREFIX', '--registry REGISTRY', 'The remote Docker registry to push to (can specify multiple times). If not specified, then will push to all registries in config.') do |r| self.registries.add r end end |