Sha256: cfffaba2bb833f8400bacca66c6cb8f3c88655243c298c32899f406193f387d4

Contents?: true

Size: 1.13 KB

Versions: 8

Compression:

Stored size: 1.13 KB

Contents

module Takelage

  # takelage docker image check
  class DockerImageCheck < SubCommandBase

    include LoggingModule
    include SystemModule
    include ConfigModule
    include DockerCheckModule
    include DockerImageTagListModule
    include DockerImageTagLatestModule
    include DockerImageCheckModule

    # Initialize takelage docker image 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']
      @docker_tag = config.active['docker_tag']
    end

    #
    # docker image check outdated
    #
    desc 'outdated', 'Check if a docker image is outdated'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Check if a docker image is outdated
    LONGDESC
    # Check if a docker image is outdated.
    def outdated
      outdated = docker_image_check_outdated @docker_tag
      say "Your takelage version \"#{@docker_tag}\" is outdated" if outdated
      exit outdated
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
takelage-0.13.2 lib/takelage/docker/image/check/cli.rb
takelage-0.13.1 lib/takelage/docker/image/check/cli.rb
takelage-0.13.0 lib/takelage/docker/image/check/cli.rb
takelage-0.12.2 lib/takelage/docker/image/check/cli.rb
takelage-0.12.1 lib/takelage/docker/image/check/cli.rb
takelage-0.12.0 lib/takelage/docker/image/check/cli.rb
takelage-0.11.1 lib/takelage/docker/image/check/cli.rb
takelage-0.11.0 lib/takelage/docker/image/check/cli.rb