Class: Packer::PostProcessor
- Inherits:
-
DataObject
show all
- Defined in:
- lib/packer/postprocessor.rb,
lib/packer/postprocessors/docker.rb,
lib/packer/postprocessors/vagrant.rb
Defined Under Namespace
Classes: DockerImport, DockerPush, UnrecognizedPostProcessorTypeError, Vagrant
Constant Summary
collapse
- DOCKER_IMPORT =
'docker-import'
- DOCKER_PUSH =
'docker-push'
- VAGRANT =
'vagrant'
- VALID_POST_PROCESSOR_TYPES =
[
DOCKER_IMPORT,
DOCKER_PUSH,
VAGRANT
]
Instance Attribute Summary
Attributes inherited from DataObject
#data, #required
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from DataObject
#__add_array_of_array_of_strings, #__add_array_of_hashes, #__add_array_of_strings, #__add_boolean, #__add_hash, #__add_integer, #__add_string, #__exclusive_key_error, #add_required, #deep_copy, #validate
Constructor Details
Returns a new instance of PostProcessor.
48
49
50
51
|
# File 'lib/packer/postprocessor.rb', line 48
def initialize
super
self.add_required('type')
end
|
Class Method Details
.get_postprocessor(type) ⇒ Object
Instance Method Details
#except(buildname) ⇒ Object
60
61
62
63
64
65
|
# File 'lib/packer/postprocessor.rb', line 60
def except(buildname)
unless self.data.has_key? 'except'
self.data['except'] = []
end
self.data['except'] << buildname.to_s
end
|
67
68
69
|
# File 'lib/packer/postprocessor.rb', line 67
def keep_input_artifact(bool)
self.__add_boolean('keep_input_artifact', bool)
end
|
#only(buildname) ⇒ Object
53
54
55
56
57
58
|
# File 'lib/packer/postprocessor.rb', line 53
def only(buildname)
unless self.data.has_key? 'only'
self.data['only'] = []
end
self.data['only'] << buildname.to_s
end
|