Sha256: 3c7a730b2fb027f1e8d3dddf4e4b1b18a098288992df1e12b748a6995d34855f

Contents?: true

Size: 1.73 KB

Versions: 53

Compression:

Stored size: 1.73 KB

Contents

# frozen_string_literal: true

module Takeltau
  # tau docker image tag
  class DockerImageTag < SubCommandBase
    include LoggingModule
    include SystemModule
    include ConfigModule
    include DockerCheckDaemon
    include DockerImageTagList
    include DockerImageTagList
    include DockerImageTagLatest
    include DockerImageTagCheck

    # Initialize takelage docker image tag check
    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

    #
    # docker image tag check
    #
    desc 'check [TAG]', 'Check if docker image [TAG] exists'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Check if docker image tag exists
    LONGDESC
    # Check if docker image tag exists.
    def check(tag)
      exit docker_image_tag_check tag
    end

    #
    # docker image tag latest
    #
    desc 'latest', 'Print latest docker image tag'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Print latest docker image tag
    Print the tag of the docker image with the highest tag.
    LONGDESC
    # Print latest docker image tag.
    def latest
      tag_latest = docker_image_tag_latest
      exit false if tag_latest == false
      say tag_latest
      true
    end

    #
    # docker image tag list
    #
    desc 'list', 'Print docker image tags'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Print docker image tags
    LONGDESC
    # Print docker image tags.
    def list
      tag_list = docker_image_tag_list
      exit false if tag_list == false
      say tag_list
      true
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
takeltau-0.44.15 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.44.14 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.44.12 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.44.11 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.44.8 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.44.2 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.43.23 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.43.21 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.43.19 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.43.16 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.43.15 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.43.14 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.43.10 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.43.6 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.43.4 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.43.2 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.43.1 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.42.7 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.42.5 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.42.4 lib/takeltau/docker/image/tag/cli.rb