Class: Cnvrg::ImageCli
Instance Method Summary
collapse
banner, subcommand_prefix
Instance Method Details
#build_image_job ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/cnvrg/image_cli.rb', line 7
def build_image_job()
begin
@cli = Cnvrg::CLI.new
@cli.verify_logged_in(false)
@cli.log_start(__method__, args, options)
@cli.log_message("build image started", Thor::Shell::Color::BLUE)
image = Image.new(options["image_id"])
image.build
@cli.log_message("Image build completed successfully", Thor::Shell::Color::BLUE)
rescue => e
@cli.log_message("Image build completed with an error", Thor::Shell::Color::RED)
@cli.log_error(e)
exit(1)
end
end
|