Sha256: f912559c13f396f5b31cefe51d4ab31a0e2062ccd269903b43cfd7a01b31f77f

Contents?: true

Size: 1.7 KB

Versions: 39

Compression:

Stored size: 1.7 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

      @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

39 entries across 39 versions & 1 rubygems

Version Path
takeltau-0.46.9 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.46.8 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.46.5 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.46.1 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.46.0 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.45.27 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.45.26 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.45.24 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.45.23 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.45.22 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.45.21 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.45.19 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.45.17 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.45.16 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.45.14 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.45.13 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.45.12 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.45.11 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.45.10 lib/takeltau/docker/image/tag/cli.rb
takeltau-0.45.9 lib/takeltau/docker/image/tag/cli.rb