Sha256: 6b120e448a3cab1c449c02bbe5707ca6e12f879804e67e5bf88ab76383d77759
Contents?: true
Size: 967 Bytes
Versions: 40
Compression:
Stored size: 967 Bytes
Contents
# frozen_string_literal: true # tau docker image tag check module DockerImageTagCheck # Backend method for docker image tag check. # @return [Boolean] does docker image tag exist? def docker_image_tag_check(tag) log.debug "Check if docker image tag \"#{tag}\" exists" if tag.to_s.chomp.empty? log.warn 'No docker image tag specified' return false end image = "#{@docker_user}/#{@docker_repo}:#{tag}" return false unless _docker_image_check_image? image log.debug "Found docker image \"#{image}\"" true end private # Check if image exists. def _docker_image_check_image?(image) cmd_docker_images = format( config.active['cmd_docker_image_tag_check_docker_images'], docker: config.active['cmd_docker'], image: image ) if (run cmd_docker_images).to_s.chomp.empty? log.debug "No docker image \"#{image}\" found" return false end true end end
Version data entries
40 entries across 40 versions & 1 rubygems