Sha256: 0f3a76e4b217e731093e16e33b0cafc16cbf986c56c374747b0ffbb318e6155e
Contents?: true
Size: 1.1 KB
Versions: 1
Compression:
Stored size: 1.1 KB
Contents
require 'rake_factory' require_relative '../container' module RakeDocker module Tasks class Provision < RakeFactory::Task default_name :provision default_description RakeFactory::DynamicValue.new { |t| "Provision #{t.container_name ? "#{t.container_name} " : ""}container." } parameter :container_name, :required => true parameter :image, :required => true parameter :ports parameter :environment parameter :ready_check parameter :reporter, default: Container::PrintingReporter.new action do |t| puts "Provisioning #{t.container_name} container" puts t.container_name puts t.image puts t.ports puts t.environment puts t.ready_check puts t.reporter provisioner = Container::Provisioner.new( t.container_name, t.image, ports: t.ports, environment: t.environment, ready?: t.ready_check, reporter: t.reporter) puts "Construction successful. Executing." provisioner.execute end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rake_docker-2.4.0.pre.3 | lib/rake_docker/tasks/provision.rb |