Sha256: 304b4dc850b3c6ef56c642dc7d0d20d6fc11e21533082302b91b5775fb903973

Contents?: true

Size: 963 Bytes

Versions: 24

Compression:

Stored size: 963 Bytes

Contents

# frozen_string_literal: true

# takelage docker image tag check remote
module DockerImageTagCheckRemote
  # Backend method for docker image check tag remote.
  # @return [Boolean] does remote docker image tag exist?
  def docker_image_tag_check_remote(tag)
    log.debug "Check if remote image tag \"#{tag}\" exists"

    return false unless docker_check_running

    if tag.to_s.strip.empty?
      log.warn 'No remote docker image tag specified'
      return false
    end

    image = "#{@docker_user}/#{@docker_repo}:#{tag}"

    return false unless _docker_iamge_check_remote_image? image, tag

    log.debug "Found remote docker image \"#{image}\""
    true
  end

  private

  # Check if remote image exists.
  def _docker_iamge_check_remote_image?(image, tag)
    tags = docker_image_tag_list_remote

    unless tags != false && tags.include?(tag)
      log.debug "No remote docker image \"#{image}\" found"
      return false
    end

    true
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
takelage-0.22.2 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.22.1 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.22.0 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.21.1 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.21.0 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.20.2 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.20.1 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.20.0 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.19.2 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.19.1 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.19.0 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.18.1 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.18.0 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.17.1 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.17.0 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.16.0 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.15.1 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.15.0 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.14.5 lib/takelage/docker/image/tag/check/remote.rb
takelage-0.14.4 lib/takelage/docker/image/tag/check/remote.rb