Class: OsCtl::Image::Operations::Image::Deploy
- Defined in:
- lib/osctl/image/operations/image/deploy.rb
Instance Attribute Summary collapse
- #build ⇒ Operations::Image::Build readonly
- #repo_dir ⇒ String readonly
- #tags ⇒ Array<String> readonly
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(build, repo_dir, tags: []) ⇒ Deploy
constructor
A new instance of Deploy.
Methods inherited from Base
Constructor Details
#initialize(build, repo_dir, tags: []) ⇒ Deploy
Returns a new instance of Deploy.
17 18 19 20 21 22 |
# File 'lib/osctl/image/operations/image/deploy.rb', line 17 def initialize(build, repo_dir, tags: []) super() @build = build @repo_dir = repo_dir @tags = end |
Instance Attribute Details
#build ⇒ Operations::Image::Build (readonly)
6 7 8 |
# File 'lib/osctl/image/operations/image/deploy.rb', line 6 def build @build end |
#repo_dir ⇒ String (readonly)
9 10 11 |
# File 'lib/osctl/image/operations/image/deploy.rb', line 9 def repo_dir @repo_dir end |
#tags ⇒ Array<String> (readonly)
12 13 14 |
# File 'lib/osctl/image/operations/image/deploy.rb', line 12 def @tags end |
Instance Method Details
#execute ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/osctl/image/operations/image/deploy.rb', line 24 def execute Operations::Repository::Create.run(repo_dir) t = build.image Operations::Repository::AddImage.run( repo_dir, { tar: build.output_tar, zfs: build.output_stream }, { distribution: t.distribution, version: t.version, arch: t.arch, vendor: t.vendor, variant: t.variant }, ) end |