Sha256: d7dbec026b187aa85e2649ca471f340e8f20058793eb93f4e5f7ecdd0c2514ab
Contents?: true
Size: 937 Bytes
Versions: 15
Compression:
Stored size: 937 Bytes
Contents
# takelage docker image module module DockerImageModule # Backend method for docker image update. def docker_image_update exit false unless configured? %w(docker_repo docker_image docker_tagsurl) tag_latest_local = docker_image_tag_latest_local if tag_latest_local.to_s.strip.empty? log.error "Unable to get latest local tag" exit false end tag_latest_remote = docker_image_tag_latest_remote if tag_latest_remote.to_s.strip.empty? log.error "Unable to get latest remote tag" exit false end if Gem::Version.new(tag_latest_local) >= Gem::Version.new(tag_latest_remote) log.info 'Already up to date.' exit end cmd_docker_pull_latest = "docker pull #{@docker_repo}/#{@docker_image}:#{tag_latest_remote}" log.info "Updating to docker image \"#{@docker_repo}/#{@docker_image}:#{tag_latest_remote}\"" run_and_exit cmd_docker_pull_latest end end
Version data entries
15 entries across 15 versions & 1 rubygems