Class: Takelage::DockerImageTagLatest

Inherits:
SubCommandBase show all
Includes:
ConfigModule, DockerCheckRunning, DockerImageTagLatestLocal, DockerImageTagLatestRemote, DockerImageTagListLocal, DockerImageTagListRemote, LoggingModule, SystemModule
Defined in:
lib/takelage/docker/image/tag/latest/cli.rb

Overview

takelage docker image tag latest

Instance Method Summary collapse

Methods included from DockerImageTagLatestRemote

#docker_image_tag_latest_remote

Methods included from DockerImageTagLatestLocal

#docker_image_tag_latest_local

Methods included from DockerImageTagListRemote

#docker_image_tag_list_remote

Methods included from DockerImageTagListLocal

#docker_image_tag_list_local

Methods included from DockerCheckRunning

#docker_check_running

Methods included from ConfigModule

#config, #configured?, #initialize_config

Methods included from SystemModule

#hash_to_yaml, #read_yaml_file, #rm_fr, #run, #run_and_exit, #run_and_fork, #try

Methods included from LoggingModule

#initialize_logging, #log

Methods inherited from SubCommandBase

banner, subcommand_prefix

Constructor Details

#initialize(args = [], local_options = {}, configuration = {}) ⇒ DockerImageTagLatest

Initialize takelage docker image tag latest



16
17
18
19
20
21
22
23
# File 'lib/takelage/docker/image/tag/latest/cli.rb', line 16

def initialize(args = [], local_options = {}, configuration = {})
  # initialize thor parent class
  super args, local_options, configuration

  @docker_user = config.active['docker_user']
  @docker_repo = config.active['docker_repo']
  @docker_registry = config.active['docker_registry']
end

Instance Method Details

#localObject

Print latest local docker image tag.



34
35
36
37
38
39
# File 'lib/takelage/docker/image/tag/latest/cli.rb', line 34

def local
  tag_latest_local = docker_image_tag_latest_local
  exit false if tag_latest_local == false
  say tag_latest_local
  true
end

#remoteObject

Print latest remote docker image tag.



50
51
52
53
54
55
# File 'lib/takelage/docker/image/tag/latest/cli.rb', line 50

def remote
  tag_latest_remote = docker_image_tag_latest_remote
  exit false if tag_latest_remote == false
  say tag_latest_remote
  true
end