Sha256: f33c50e9e43e00ca0b6f21b6b7590215016015c5a5476330051e48fad4ecfff9
Contents?: true
Size: 1.03 KB
Versions: 37
Compression:
Stored size: 1.03 KB
Contents
module CC module CLI module Engines class Install < EngineCommand SHORT_HELP = "Pull the latest images for enabled engines in your codeclimate.yml.".freeze ImagePullFailure = Class.new(StandardError) def run require_codeclimate_yml say "Pulling docker images." pull_docker_images end private def pull_docker_images engine_names.each do |name| if engine_registry.exists?(name) images = engine_registry[name]["channels"].values images.each { |image| pull_engine_image(image) } else warn("unknown engine name: #{name}") end end end def engine_names @engine_names ||= parsed_yaml.engine_names end def pull_engine_image(engine_image) unless system("docker pull #{engine_image}") raise ImagePullFailure, "unable to pull image #{engine_image}" end end end end end end
Version data entries
37 entries across 37 versions & 1 rubygems